Remove obsolete launcher integration and reduce navigation jank

This commit is contained in:
Elijah Kuntz 2026-10-19 14:48:08 -07:00
parent ac0a892c5f
commit 2739b278cd
21 changed files with 394 additions and 129 deletions

View file

@ -1 +1 @@
Reduces allocation when returning Home by reusing unchanged app tiles. Reuses Plex artwork that is already displayed and avoids redundant background rebuilds. Keeps the previous artwork while a replacement loads, cancels obsolete requests, and restores interrupted artwork loads after resume. Layout, image quality, and device-independent rendering defaults are unchanged.
Removes obsolete alternate-launcher shortcuts and routing integration. Avoids redundant window relayouts when remote input resets the screensaver timer. Background app-color transitions wait for a 250 ms pause in navigation and skip animations to an already displayed color. Tile focus stays immediate, with the same image quality and smooth final crossfade. No device-specific rendering paths.

View file

@ -12,7 +12,7 @@ Validated on the user’s onn. 4K Plus Streaming device over ADB, October 17, 20
- Scenic photo preview, single-button wake, and real one-minute idle activation passed. Idle timeout was restored to ten minutes, photo duration to thirty seconds, and mode to Scenic.
- NPS bird video downloaded to private device storage (about 40 MB), played locally in a loop, and stopped on leaving Luma. The local file remains available in Nature video mode; no ongoing stream/download is active.
- Home routing: Android reports Luma as HOME role holder but the OEM resolver still chooses Google Home. The enabled Luma accessibility service routes Home to Luma. Repeated Home presses, return from Android settings and SmartTube, and screensaver dismissal were checked.
- Projectivy fallback stays open when explicitly selected through its app tile or Settings. Back stays on Luma; from lower rows it returns to the first row. Home returns to Luma. Projectivy remains installed and enabled; only its competing “Override current launcher” preference is off. Its accessibility service and Button Mapper’s service are retained.
- The previous launcher fallback stays open when explicitly selected through its app tile or Settings. Back stays on Luma; from lower rows it returns to the first row. Home returns to Luma. The previous launcher remains installed and enabled; only its competing “Override current launcher” preference is off. Its accessibility service and Button Mapper’s service are retained.
- Luma’s override Off control removes only its own accessibility service. Re-enabling through Android’s actual Accessibility settings was verified. The service is system-bound in a separate `tv.luma.launcher:home` process. No view-content retrieval capability is requested.
## Wake regression — October 18, 2026
@ -62,7 +62,7 @@ A forced scheduled check against the real public HTTPS repository found a newer
Testing exposed a device-specific consequence of legacy APK/file installation: Android restricted settings reset the accessibility service list. The final flow uses a PackageInstaller session for a publisher-verified self-update (`PACKAGE_SOURCE_OTHER`), always requiring user confirmation. It does not claim to be an app store or request silent installation. Unlike a general APK file installer, Luma accepts only its own package signed by the installed key.
The final real upgrade, **1.1.4 → 1.1.5**, was downloaded from production Git and approved with the TV remote. The complete enabled-accessibility-service list matched before and after, including Luma Home, Projectivy, and Button Mapper. Restricted-settings authorization remained allowed, and the TV returned directly to Luma. No ADB install or accessibility repair was used for that final upgrade. Prior temporary configuration changes from failed installation-method tests were restored.
The final real upgrade, **1.1.4 → 1.1.5**, was downloaded from production Git and approved with the TV remote. The complete enabled-accessibility-service list matched before and after, including Luma Home, the previous launcher, and Button Mapper. Restricted-settings authorization remained allowed, and the TV returned directly to Luma. No ADB install or accessibility repair was used for that final upgrade. Prior temporary configuration changes from failed installation-method tests were restored.
The source classification follows Android's [PackageInstaller source definitions](https://developer.android.com/reference/android/content/pm/PackageInstaller#PACKAGE_SOURCE_OTHER); the platform's [file-source restriction implementation](https://android.googlesource.com/platform/frameworks/base/+/143db55921dd%5E%21/) explains the behavior encountered during the earlier file-install tests.
@ -134,16 +134,14 @@ GPU PixelCopy checks passed on both devices for wide opaque banners, portrait ce
Wake regression passed on both devices in both rendering modes: cold launch, interrupted loading/pause/resume, memory trim, existing-tile reuse, partial-grid recovery, bounded nonblank backgrounds, texture/queue release on stop, screensaver dismissal, and five stop/start cycles. Memory-saver checks also verified loading the saved preference and switching back and forth at runtime. Temporary preference changes were restored by the test runners. The first tile-comparison test had an uninitialized reference bitmap in the diagnostic overlay; fixing that test setup allowed the comparisons to pass without changing production rendering.
The final signed 1.1.8 APK was installed on both devices and retains the previous certificate. Final screenshots show the original five-column spacious layout, mountain background, rounded banners, and app-colored focused shadow. Temporary diagnostic packages were uninstalled. The onn Home helper was re-bound after instrumentation using its original enabled-service list, retaining Button Mapper; Home from Android settings and repeated Back returned/stayed in Luma. The TV's Home override remains off with its original empty service list. Projectivy remains installed and enabled.
The final signed 1.1.8 APK was installed on both devices and retains the previous certificate. Final screenshots show the original five-column spacious layout, mountain background, rounded banners, and app-colored focused shadow. Temporary diagnostic packages were uninstalled. The onn Home helper was re-bound after instrumentation using its original enabled-service list, retaining Button Mapper; Home from Android settings and repeated Back returned/stayed in Luma. The TV's Home override remains off with its original empty service list. The previous launcher remains installed and enabled.
With Android settings foreground, the onn UI and Home helper each consumed zero CPU ticks over five seconds. The TV initially consumed five CPU ticks over five seconds after installation; a later five-second sample after settling consumed zero. These short samples show idle behavior after pending work completes, rather than establishing overnight endurance. Both devices were returned to Luma after verification.
## Projectivy review and focus-color coalescing — October 19, 2026
## Focus-color coalescing — October 19, 2026
Reviewed the official [Projectivy repository](https://github.com/spocky/miproja1), its [4.70 release notes](https://github.com/spocky/miproja1/releases/tag/4.70), [4.72 release notes](https://github.com/spocky/miproja1/releases/tag/4.72), and public wallpaper-provider documentation. The main repository exposes configuration files, releases, and an issue tracker, rather than the launcher's core rendering implementation. There is no public renderer source there to inspect or port. Findings here come from the documented release behavior and Luma's own source/measurements, not assumptions about Projectivy's internals.
Applicable lessons from those notes include bounded image caches and content counts, image downsampling, limiting expensive wallpaper/color work, and stopping listeners when backgrounded. The published 50 MB image-cache cap does not establish an in-memory budget; it was not copied into Luma's RAM limits. Luma already bounds images/caches, samples wallpaper, debounces Plex artwork, and cancels background work. This review motivated testing fewer unnecessary accent transitions during rapid focus changes. It does not establish that Projectivy uses this particular implementation.
An earlier review of another launcher's public release notes motivated testing fewer unnecessary accent transitions. The available material did not expose that launcher's rendering source, so no implementation was copied or inferred. Luma's changes were validated against its own code and device measurements.
Version 1.1.9 retains immediate app-tile focus scale/glow/labels, but coalesces app accent changes until 160 ms without another different color. It then uses the existing 280 ms background transition. Reduced motion and initial rendering apply immediately. A single reusable callback retains only the latest color, is removed on pause/screensaver/stop, and restores the selected color when resumed. Both devices use the same code and behavior. Bitmap resolution, image quality, and the spacious layout are unchanged.
@ -161,7 +159,7 @@ On the TV, rapid-navigation median/p90 duration improved about 15%/14%; GPU p90
The new scheduling regression passed on both devices in both rendering modes. Three colors 60 ms apart produced exactly one final full-color composition (or reused the existing Memory-saver textures), retained the final selected color, canceled pending work on pause, restored on resume, and applied reduced-motion changes immediately. The complete wake regression also passed on both devices in both modes: interrupted loads, partial-grid recovery, memory trimming, image reuse, nonblank bounded scenes, release on stop, screensaver dismissal, five stop/start cycles, and runtime renderer switching. Diagnostic preference changes were restored.
The final signed 1.1.9 build was installed on both devices. Screenshots confirm the wallpaper, app banners, focus appearance, and original layout. After settling with Android settings foreground, both launcher UIs and the onn Home helper consumed zero CPU ticks over five seconds. Home/Back returned/stayed in Luma on the onn; the TV retained its original disabled Home override. The onn's original accessibility list was restored after instrumentation, including Button Mapper. Both diagnostic APKs and the round's temporary on-device reports/scripts were removed; Projectivy remains installed and enabled on both devices. Both devices were returned to Luma.
The final signed 1.1.9 build was installed on both devices. Screenshots confirm the wallpaper, app banners, focus appearance, and original layout. After settling with Android settings foreground, both launcher UIs and the onn Home helper consumed zero CPU ticks over five seconds. Home/Back returned/stayed in Luma on the onn; the TV retained its original disabled Home override. The onn's original accessibility list was restored after instrumentation, including Button Mapper. Both diagnostic APKs and the round's temporary on-device reports/scripts were removed; the previous launcher remains installed and enabled on both devices. Both devices were returned to Luma.
## Capability-based TV input button — October 19, 2026
@ -179,7 +177,7 @@ The enhanced wake regression passed on both devices, including interrupted-load
The platform interfaces are documented in [TvInputManager](https://developer.android.com/reference/android/media/tv/TvInputManager), [TvInputInfo](https://developer.android.com/reference/android/media/tv/TvInputInfo), and [TvView](https://developer.android.com/reference/android/media/tv/TvView).
Final 1.1.10 package/version checks passed on both devices, with the input button visible only on the TV. After settling with Android settings foreground, both UIs and the onn Home helper consumed zero CPU ticks over five seconds. The diagnostic APKs and temporary on-device files were removed. The onn's original Home/accessibility service list was restored after instrumentation; Home returned from Android settings, and Back stayed in Luma. The TV's existing Home override remains off. Projectivy remains installed/enabled on both devices, and both devices were returned to Luma. Raw local checks are in ignored `output/performance/input-switching/`.
Final 1.1.10 package/version checks passed on both devices, with the input button visible only on the TV. After settling with Android settings foreground, both UIs and the onn Home helper consumed zero CPU ticks over five seconds. The diagnostic APKs and temporary on-device files were removed. The onn's original Home/accessibility service list was restored after instrumentation; Home returned from Android settings, and Back stayed in Luma. The TV's existing Home override remains off. The previous launcher remains installed/enabled on both devices, and both devices were returned to Luma. Raw local checks are in ignored `output/performance/input-switching/`.
## Warm Home returns and Plex artwork reuse — October 19, 2026
@ -218,4 +216,47 @@ These show essentially unchanged navigation frame times rather than a consistent
The final 1.1.11 APK retains the existing signing certificate and was installed on both devices. The self-contained Plex fixture passes on both, including latest-request selection, failed-image retention, cancellation on pause, automatic focused-artwork retry on resume, rejection of obsolete selections, and image release/restoration across stop/start. Raw local reports are under ignored `output/performance/round4/`.
Final screenshots confirm wallpaper, app artwork, focus styling, and the original spacious layout on both devices. UI hierarchy checks show the input button on the TV only. With Android settings foreground after settling, each launcher process consumed zero CPU ticks over five seconds. Back from Luma stayed in Luma on both. Projectivy remains installed and enabled. The enabled accessibility lists match the start of this round: Button Mapper only on the onn, and null on the TV. Both system Home resolvers point to Google TV; the onn's Luma Home override was already off at this round's initial capture and remains off. This round preserves that configuration rather than enabling a helper that was absent initially. Both devices were returned to Luma. Temporary diagnostics, reverse ports, and this round's on-device APKs/scripts/reports were removed after validation.
Final screenshots confirm wallpaper, app artwork, focus styling, and the original spacious layout on both devices. UI hierarchy checks show the input button on the TV only. With Android settings foreground after settling, each launcher process consumed zero CPU ticks over five seconds. Back from Luma stayed in Luma on both. The previous launcher remains installed and enabled. The enabled accessibility lists match the start of this round: Button Mapper only on the onn, and null on the TV. Both system Home resolvers point to Google TV; the onn's Luma Home override was already off at this round's initial capture and remains off. This round preserves that configuration rather than enabling a helper that was absent initially. Both devices were returned to Luma. Temporary diagnostics, reverse ports, and this round's on-device APKs/scripts/reports were removed after validation.
## Launcher integration removal and current-jank investigation — October 19, 2026
At the user's request, the previous alternate launcher was uninstalled from both devices. Luma's dedicated shortcuts, special launch handling, explicit fallback broadcast/preferences, accessibility package subscription/redirect, and explanatory UI strings for that integration were removed. Home-key handling, Google Home redirection, Android settings access, and the user-controlled override remain. No other installed launcher or accessibility service was removed. Earlier validation entries above describe historical configurations, not a requirement to keep another launcher installed.
The supplied benchmark reports use Android's current `Janky frames` counter from gfxinfo. That differs from the legacy counter and from FrameMetrics total-duration thresholds used in prior development notes. The reported TCL gap was reproduced after uninstalling the other launcher; removal alone did not fix it. A neighboring-tile comparison also differed in workload: the onn's Plex/Plezy pair shares an accent, while the TV's Plex/Spotify pair changes it. A second comparison therefore used Plex/Spotify on both devices, the same Alpine theme and dim level, real alternating D-pad keys at a scheduled 200 ms cadence, and no Plex network/media rows.
`JankInstrumentation` resets gfxinfo immediately before each 60-key sequence and reads its current jank counter after settling. It temporarily changes only the test order, media-row setting and accent, restoring those keys in finally. Memory-saver isolations change the scene at runtime without changing the saved preference. Each trial executes once on-device and saves its report locally; retrieval does not replay navigation. The first two apps are asserted in matched tests. Tile contents elsewhere still differ. The test does not measure input-to-photon latency.
Three-trial baseline medians after the uninstall were 0.76% current jank on the onn's original neighboring tiles and 8.50% on the TV's original neighbors. With the same Plex/Spotify pair, medians were 0.14% and 8.36%. The workload difference matters, but does not explain away the TV gap. Removing the focus shadow left TV median jank at 8.25%, so the shadow was retained. Hiding the entire background gave a 0% median on both; that diagnostic loses the intended visual design and was not shipped. A fixed accent gave TV samples of 1.67%, 7.83%, and 0%, so it is not a consistently faster mode claim.
Perfetto captures included FrameTimeline, main/RenderThread slices, scheduling, and graphics events. In the retained old-delay trace window, mean RenderThread dequeueBuffer duration was 7.36 ms on the TV versus 3.36 ms on the onn. Mean DrawFrames duration was 13.42 versus 8.30 ms. Mean main-thread doFrame was 6.23 versus 1.85 ms, but included 4.75 versus 0.89 ms waiting in postAndWait; recording View drawing itself averaged roughly 0.25–0.30 ms. These are wall durations including waits, not CPU execution times.
The TV's retained FrameTimeline sample contained 573 buffer-stuffing/late-present frames finishing on time and one app-deadline-missed frame. Its retained SurfaceFlinger frames finished on time. The onn also had buffer stuffing with on-time app completion. Those states are not the same as gfxinfo's current-jank percentage: [Perfetto describes buffer stuffing as queued frames that can remain smooth while adding latency](https://perfetto.dev/docs/data-sources/frametimeline). This evidence points toward buffering/render-pipeline waits, rather than proving excessive Java UI work or a hard GPU-compute ceiling. Neither device exposed GPU render-stage slices in these captures, so the GPU/driver/display contribution cannot be completely separated. The initial 32 MiB ring traces retain only part of the input window; TV process-name metadata was incomplete and its target PID was verified against the corresponding gfxinfo report. A larger 64 MiB configuration with periodic process stats is included in `tests/device/jank-trace.pbtxt` for reproduction.
The retained software change extends the accent quiet period from 160 to 250 ms. It avoids starting full-screen transitions for passing selections at a 200 ms cadence, while preserving immediate 160 ms tile focus and the existing 280 ms final background crossfade. The explicit tradeoff is 90 ms more delay before an animated app-color change begins after focus settles. Initial rendering, reduced motion, image resolution, blur/composition quality, and all device-independent defaults are unchanged. Slower navigation can still trigger expensive background transitions; this does not establish universally stutter-free rendering.
Testing also exposed a redundant Memory-saver animation: coalescing a move away and back could animate a color to itself. The final build cancels an obsolete color animation and returns immediately if the displayed color already matches. The scheduling regression now uses 200 ms passing selections and verifies that returning to the displayed color starts neither composition nor a color animator, in both rendering modes.
The trace also exposed repeated window relayouts at remote input: the old timer reset reapplied FLAG_KEEP_SCREEN_ON even when unchanged. The final code checks the actual window flag before changing it. This removes redundant window-attribute dispatch from the per-key path and preserves real flag changes for timeout settings, screensaver entry/exit, and pause/resume. `WindowFlagsInstrumentation` wraps the Window callback and verifies twenty interactions produce zero attribute-change callbacks; switching the timer Off/On produces one change each, and pause/resume releases/restores the flag. It restores the original timer preference and callback.
A same-version diagnostic control APK containing the integration removal but the old 160 ms renderer was used to capture the control trace and three Memory-saver-On trials without downgrading an installed package. It was not published. The Memory-saver-Off baseline medians use the original 1.1.11 renderer. The final release was installed over all temporary controls. Profiling captures are separate from the untraced median trials.
Final untraced matched-pair results (three-trial medians, current gfxinfo jank):
| Device / Memory saver | Old rendering current jank → 1.1.12 | Reported duration p90, old → new |
| --- | ---: | ---: |
| onn / Off | 0.14% → 0.30% | 11 → 10 ms |
| onn / On | 0.14% → 0.76% | 13 → 12 ms |
| TV / Off | 8.36% → 0.00% | 24 → 9 ms |
| TV / On | 6.94% → 0.00% | 23 → 12 ms |
TV Off trials were 0.15%, 0%, and 0%; On trials were 0%, 0%, and 0%. onn Off trials were 0.45%, 0.30%, and 0.30%; On trials were 1.21%, 0.30%, and 0.76%. The onn current-jank counter increased slightly despite a lower duration p90; this is not a universal jank improvement. A preceding onn crossover with only the longer delay gave 0.14%/0.14% on the old delay and 0.76%/1.21% on the candidate, so the small onn increase is explicitly retained in the evidence. The final code also includes the window-update guard. It is retained for the large repeatable TV improvement and elimination of redundant work, while preserving the onn's existing Memory saver Off setting. These are short, ordered trials rather than a randomized endurance study. Zero measured janky frames does not promise zero stutter in other workloads.
The final 64 MiB traces cover startup and the complete input sequence. Only the initial window relayout remains on either device; the per-input relayout slices disappear. Mean dequeueBuffer time in these captures was about 0.24 ms on the TV and 0.18 ms on the onn, compared with 7.36/3.36 ms in the retained control samples. TV mean DrawFrames fell to 5.12 ms and mean doFrame to 1.39 ms; most app FrameTimeline slices were on-time rather than buffer-stuffed. Startup still contributes a few late frames in this trace, unlike the untraced counters reset after settling. Trace overhead and different retained windows prevent treating these means as exact speedup ratios, but they corroborate removal of the repeated window/queue work. The final UI-only subtitle correction does not change these rendering paths.
The broader 42-key normal/rapid navigation regression also passed on both devices. Final FrameMetrics median/p90 totals were onn 10.28/13.50 ms normal and 10.67/13.37 ms rapid; TV 12.50/13.58 ms normal and 23.92/24.45 ms rapid with its saved Memory-saver setting On. These totals include pipeline waits and are not the current gfxinfo jank counter. In particular, some rapid TV frames remain longer even though the matched 200 ms workload's current jank is much lower. All samples had zero dropped callbacks.
Both devices passed the final 200 ms accent/coalescing regression, same-color cancellation, reduced motion, pending-work cancellation on pause, full wake recovery, pause-only image reuse, memory trimming, screensaver dismissal, five stop/start cycles, and runtime renderer switching. The original app/timer/media/accent/order preferences were restored. The final signed version is 1.1.12, versionCode 15, using the existing certificate. Full raw reports, SQL summaries, and traces remain in ignored `output/performance/round5/`.
Final UI checks verified the removed package is absent on both devices, Settings and Default launcher contain no obsolete integration text/actions, Back stays in Luma, and physical-input controls remain visible only on the TV. The installed APK hashes match the final signed payload. Wallpaper, app art, original spacing, and focus behavior remain intact. Enabled accessibility lists remain Button Mapper only on the onn and null on the TV; the existing Home override remains Off on both. Memory saver remains Off on the onn and On on the TV. The supplied benchmark documents in the repository root were left untouched and untracked.
After settling with Android settings foreground, both launcher processes consumed zero CPU ticks over five seconds. This round's temporary diagnostic APKs, scripts, on-device reports, locks, and trace files were removed after archiving the reports locally. Both devices were returned to Luma. Android's stock launcher and unrelated apps/settings remain unchanged.