hex/android/app
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel b121550a72
Keep Labs › Diagnostics out of the Play release build (#2895)
The README says Labs › Diagnostics is in Hex Preview and debug builds only, and
the Labs entry was already behind BuildConfig.DIAGNOSTICS. But the launch extra
ly.anoma.hex.extra.page=diagnostics still opened the page in the release build:
on an API 36 emulator, `am start -n ly.anoma.hex/.MainActivity --es
ly.anoma.hex.extra.page diagnostics` showed the full Diagnostics page on 0.2.3
(6) built from 89dd9876b. MainActivity is exported, so any app could open it.

Three lines now check BuildConfig.DIAGNOSTICS, which is false only in the
release build type:
- HexSettings: the launch extra opens Diagnostics only then; otherwise it opens
  Home, as an unknown page name does.
- HexSettings: the page's `when` branch draws DiagnosticsPage only then.
- HexKeyboard: onStartInputView calls Diagnostics.keyboardShown only then (it
  already returned at once when the flag was false).
Hex Preview and debug builds set the flag true, so their behaviour is unchanged.

R8's mapping for the release build (minifyReleaseWithR8 on the Studio):
before, 22 ly.anoma.hex.diagnostics classes (the page, the report builder,
the speed test); gating only the launch extra left the same 22; the launch
extra plus the page branch left 3 (the Diagnostics object kept by the keyboard
call); all three lines leave 0, and the report strings ("none since Hex
started", "speed-test.wav", "Hex speed test") are gone from the DEX.

Verified: testReleaseUnitTest, 332 tests, 0 failures; mapping as above.
2026-11-26 09:07:35 -05:00
..
src Keep Labs › Diagnostics out of the Play release build (#2895) 2026-11-26 09:07:35 -05:00
build.gradle.kts Bump Hex Android to 0.2.3 (build 6) (#2894) 2026-11-26 09:07:23 -05:00
proguard-rules.pro Android: faster English dictation (Labs) (#2704) 2026-11-24 13:36:38 -05:00