chore: remove source comments and unused code, translate every missing string (#1965)

* chore(i18n): translate every missing string in all locales

Adds the 87 strings the bottom-screen Dashboard and in-game stats pages
introduced to all 32 locales, plus the 51 older settings strings Japanese
and the 50 Chinese locales were still missing. Every locale now has all
3456 translatable strings with the same placeholders as English.

Also translates 36 entries that were still English where the language
does not use the English word, and makes es-419 touch_app_id use the same
%1$s placeholder as English.

* chore(patches): drop comments from the lines downstream patches add

Removes comment lines and trailing comments from lines our patches add,
with hunk headers recounted. Lines that a later patch uses as context
and the upstream backport 0123 are left as they are.

The gamescope, FEX, proot and xodus series still apply to their pinned
sources, and the patched trees differ only in those comments.
test_hud_frames now finds the HUD writer by its first declaration.

* docs: credit Greenlight, Better xCloud, viture-v2, GameNative and DiRTTelemetryErrorFix

These were credited only in source headers and NOTICE files.

* chore: remove source comments and unused functions

Removes explanatory comments from first-party Kotlin, Java, C, C++,
Rust, TypeScript, Python, shell, Gradle, CMake and workflow files.
License and attribution headers stay, and vendored third-party trees,
generated files and license files are untouched. A shellcheck directive
is kept, and udevmon's fallthrough comments became fallthrough attributes.

Syntax trees and token streams match the previous sources apart from the
comments and Python docstrings. Module docstrings that argparse prints
are kept, and device-smoke.sh prints the same --help text from a heredoc.

Also removes 37 functions and 4 fields that nothing referenced.

* chore: remove comments from the Syncthing integration and the latest main sources

* docs: credit Syncthing and the syncthing-android fork

* chore(i18n): translate the Syncthing strings in all locales

The 107 strings the Syncthing integration added are now in all 32 locales.
sync_web_path_locked names the Syncthing tab by its label.

* docs: credit @xXJSONDeruloXx for the HUD metric readers

The CPU, GPU load, thermal and battery readers come from their
PerformanceHudView pull requests #777, #877, #991, #1406 and #1573.
The FusionHUD credit line is unchanged.

* docs: credit the HUD metric readers to @xXJSONDeruloXx's work
This commit is contained in:
MaxsTechReview authored and GitHub committed 2026-11-01 16:27:27 -05:00
1 parent d730f0fa8b
commit c5577478ca
511 files changed
+6813 -4068

No files matched your search

@@ -93,7 +93,6 @@ class GlassesDisplayTest {
@Test fun gtMaxSmartGlassesEdidUsesTheSameOutputSelectionAsViture() {
val panel = display("SmartGlasses", productName = "SmartGlasses", productId = "980")
assertEquals(panel.displayId, Glasses.selectGlassesDisplay(listOf(panel), usbPresent = true)?.displayId)
// The display remains usable while USB control reconnects during a mode switch.
assertEquals(panel.displayId, Glasses.selectGlassesDisplay(listOf(panel), usbPresent = false)?.displayId)
}
@@ -126,7 +125,6 @@ class GlassesDisplayTest {
}
}
// Robolectric exposes display names and flags, but has no product-metadata setter.
@Implements(Display::class)
class ProductMetadataDisplay : ShadowDisplay() {
var productMetadata: DeviceProductInfo? = null
@@ -63,7 +63,6 @@ class GlassesMenuProjectionTest {
private object GlassesMenuProjection {
data class Uv(val x: Float, val y: Float)
// Row-major head-to-anchor rotation; +Y is up, -Z is forward, output UV starts at the top left.
fun intersect(frame: GlassesMenuPose.Frame, rayX: Float, rayY: Float, eye: Float,
halfWidth: Float, distance: Float, aspect: Float): Uv? {
if (frame.rotation.size != 9 || frame.position.size != 3 || frame.rotation.any { !it.isFinite() } ||
@@ -30,7 +30,6 @@ class GlassesOutputHandoffTest {
private lateinit var screen: GlassesScreen
@Before fun setup() {
// Exercise the output lifecycle without starting the native Linux runtime.
activity = Robolectric.buildActivity(SessionActivity::class.java).get()
phone = SurfaceView(activity)
ReflectionHelpers.setField(activity, "surfaceView", phone)
@@ -46,7 +45,7 @@ class GlassesOutputHandoffTest {
@Test fun selectingGlassesDoesNotHidePhoneOrClaimOutputBeforeAttachment() {
assertFalse(active())
assertEquals(View.VISIBLE, phone.visibility)
attach(phone.holder) // A late phone callback must not complete the handoff.
attach(phone.holder)
assertFalse(active())
assertEquals(View.VISIBLE, phone.visibility)
}
@@ -183,11 +183,11 @@ class GlassesRenderingTest {
picture3d = GlassesSettings.PICTURE_SCREEN)
for (state in listOf(ultra.copy(displayId = -1), GlassesState())) {
val preview = GlassesRendering.cardboard(base, settings, state, false, true)
assertTrue(preview.enabled) // Published as headset proximity, preventing standby.
assertTrue(preview.enabled)
assertTrue(preview.mono)
assertEquals(Cardboard.SOURCE_SBS, preview.source)
assertEquals(Cardboard.Viewer.NONE.id, preview.viewer)
assertTrue(preview.headTracking) // Phone preference, not dormant glasses settings.
assertTrue(preview.headTracking)
assertFalse(base.enabled)
assertSame(base, GlassesRendering.cardboard(base, settings, state, false, false))
}
@@ -251,8 +251,6 @@ class GlassesSteamVrTest {
.set(activity, LoadingState(activity).apply { visible = false })
SessionState.steamVr = true
SessionState.mode = SessionService.MODE_STEAM
// Hold the external worker so status transitions can be exercised
// without launching a Linux runtime from the host test process.
val worker = SessionActivity::class.java.getDeclaredField("steamVrWorker")
.apply { isAccessible = true }.get(null) as ThreadPoolExecutor
val blocked = CountDownLatch(1)
@@ -115,8 +115,6 @@ class RayNeoCalibrationTest {
val upright = RayNeoOrientationFilter(profile.rotationXDeg, profile.gtMaxAxes, saved)
.update(sample(floatArrayOf(-0.02f, 8.819f, 4.106f), reading.gyroDps))
assertArrayEquals(floatArrayOf(1f, 0f, 0f, 0f), upright, 0.001f)
// This was the reported failure: the same physical pose cannot calibrate
// through the Max's permutation and 35-degree mounting correction.
assertNull(finish(RayNeoCalibrationCollector(RayNeoSensorAxes(35f, true), 0), sample = reading))
}
@@ -102,7 +102,6 @@ class RayNeoLinkTest {
val cmd = bytes[1].toInt() and 0xff
commands += cmd
if (gtTraffic && cmd in listOf(0, 1)) {
// Notifications and unrelated ACKs can precede the requested response.
for (other in listOf(0x08, 6, 7, 0x50)) {
responses += ByteArray(64).apply {
this[0] = 0x99.toByte(); this[1] = 0xc8.toByte(); this[2] = 64
@@ -79,8 +79,6 @@ class RayNeoOrientationFilterTest {
val first = screen(filter.update(sample(0, level)))
val ref = HeadPose.recenter(first)
var q = FloatArray(4)
// Physical 30-degree turn over one second, through the complete shared
// VITURE conversion and recenter pipeline. GT signs match device captures.
repeat(100) { i ->
val a = Math.toRadians((i + 1) * 0.3)
val accel = when (axis) {
@@ -116,7 +116,7 @@ class RayNeoProtocolTest {
@Test fun tickWrapDoesNotIntroduceOrientationJump() {
val filter = RayNeoOrientationFilter(0f)
filter.update(sample(0xfffffff0L, 90f))
val q = filter.update(sample(84, 90f)) // 100 ticks = 10ms across uint32 rollover.
val q = filter.update(sample(84, 90f))
assertEquals(kotlin.math.sin(Math.PI * 0.005).toFloat(), q[2], 1e-4f)
}
}
@@ -71,8 +71,8 @@ class VitureSdkTest {
val s = kotlin.math.sin(Math.PI / 12).toFloat()
val c = kotlin.math.cos(Math.PI / 12).toFloat()
for ((axis, expected) in listOf(
2 to floatArrayOf(-0.5f, 0f, -0.8660254f), // Observed left turn: positive Y.
1 to floatArrayOf(0f, 0.5f, -0.8660254f), // Observed upward look: positive X.
2 to floatArrayOf(-0.5f, 0f, -0.8660254f),
1 to floatArrayOf(0f, 0.5f, -0.8660254f),
3 to floatArrayOf(-0.5f, 0.8660254f, 0f),
)) {
val q = floatArrayOf(c, 0f, 0f, 0f).apply { this[axis] = s }
@@ -84,7 +84,6 @@ class VitureSdkTest {
@Test fun ultraOpenGlAxesMatchExistingGlassesHeadTracker() {
val a = sqrt(0.5f)
// OpenGL Y yaw maps to NWU Z; OpenGL X pitch maps to negative NWU Y.
assertArrayEquals(floatArrayOf(0f, 0f, a, a),
VitureSdkPose.toGlasses(floatArrayOf(a, 0f, a, 0f), true), 0.00001f)
assertArrayEquals(floatArrayOf(0f, -a, 0f, a),
@@ -1,5 +1,4 @@
// Fixtures adapted from elasticjava/viture-v2, MIT, Copyright (c) 2026 Holger Bartnick.
// Source: ece8c30485f7d357fefa362ae74f3eabac9b3899; see docs/third-party/viture-v2/.
// Fixtures adapted from elasticjava/viture-v2, MIT, Copyright (c) 2026 Holger Bartnick. Source: ece8c30485f7d357fefa362ae74f3eabac9b3899; see docs/third-party/viture-v2/.
package com.droiddeck.launcher.glasses
import org.junit.Assert.assertArrayEquals
@@ -63,10 +63,8 @@ class XrealOrientationFilterTest {
@Test fun capturedNeutralGravityStartsUprightBeforeRecenter() {
val pose = XrealOrientationFilter().update(sample(1000000,
accel = Vec3(-0.0909f, -9.6529f, -1.0731f)))!!
// An upright start must not contain the previous approximately 180-degree
// pitch correction. Check before recenter can hide a mounting error.
assertTrue(kotlin.math.abs(pose[3]) > 0.99f)
val screen = matrix(pose)
assertTrue(screen[7] > 0.99f) // Screen up points toward shared world +Z.
assertTrue(screen[7] > 0.99f)
}
}
@@ -93,7 +93,6 @@ class XrealProtocolTest {
assertEquals(0x2822, XrealProtocol.read(requests).command)
repeat(3) { assertEquals(0x275e, XrealProtocol.read(requests).command) }
assertEquals(0, requests.available())
// Actual 1S busy response remains an error, never a successful ack.
assertFalse(XrealProtocol.acknowledged(byteArrayOf(0x22, 3, 8, 0x89.toByte(), 0x27)))
}