Keep the displayed app order intact until the grid reuse comparison, and retain selection during rebuilds so D-pad rearranging visibly moves the chosen tile. Add Android-confirmed uninstall for user apps and a foreground-only Wi-Fi/Ethernet shortcut with separate TV-input spacing. Remove the duplicate Personalize footer. Use an explicitly authorized replacement signing identity after loss of the original key. Document the one-time reinstall and preserve signature verification. Add a portable build using ignored signing configuration and regression checks for movement, lifecycle, native network settings, and cancel/confirm uninstall. Validated on the authorized onn 4K Plus: original failing move reproduction now passes, HomeActions/GridReuse/WakeRegression/Navigation instrumentation passes, and native settings/uninstall checks pass. Input-header availability was simulated; physical Ethernet and input switching were not exercised. Restore prior visible settings and Home override; remove the disposable test APK.
33 lines
4.5 KiB
Markdown
33 lines
4.5 KiB
Markdown
# Repository guidance
|
|
|
|
Follow Android and Android TV best practices. Keep Luma portable across current and future devices, responsive on limited hardware, and economical with memory, GPU work, background CPU, and network use.
|
|
|
|
## Portability and configuration
|
|
|
|
- Do not select rendering paths or application behavior by device model, manufacturer, product name, serial number, IP address, or a list of known devices.
|
|
- Use documented platform APIs, API-level availability checks, measured capabilities, and resource limits when behavior needs to adapt. Provide a safe portable fallback. Make performance/quality tradeoffs explicit user settings when capability checks cannot reliably predict performance.
|
|
- Use the same defaults across devices unless a documented capability requires otherwise. Verify optimizations on both available test devices; record comparable workloads and distinguish measurements from assumptions. Never assume that an optimization on one GPU improves another.
|
|
- Keep deployment addresses, repository endpoints, and environment-specific values configurable or in deployment/test configuration. Do not embed a particular household's device addresses in production logic.
|
|
- Preserve installed launchers unless the user explicitly authorizes their removal. Preserve user preferences and accessibility configuration during development and testing. Restore temporary test changes.
|
|
|
|
## Keys and security
|
|
|
|
- Never hardcode, commit, or log private keys, signing keystores, passwords, access tokens, or other secrets. Use ignored local configuration, environment variables, Android's secure storage, or a suitable secret manager.
|
|
- Preserve the existing local APK signing identity so installed devices can accept updates. Never generate a replacement key merely to work around a build or update failure.
|
|
- Keep TLS, SSH host identity checks, APK signature verification, and update integrity checks enabled. Resolve trust failures explicitly; do not bypass verification.
|
|
- Public verification material and intentional public defaults may be included when required by the design; document their purpose and keep them separate from secrets and device-specific behavior.
|
|
|
|
## Implementation and validation
|
|
|
|
- Prefer maintained platform APIs and small, understandable changes. Bound image dimensions, caches, queues, downloads, and worker concurrency; cancel obsolete work and release resources when Home is hidden.
|
|
- Preserve D-pad navigation, accessibility, focus visibility, smooth scrolling, and lifecycle recovery. Test meaningful failure and recovery cases for changes affecting rendering, persistence, updates, or background work.
|
|
- Do not ship a claimed performance improvement based only on an isolated microbenchmark. Compare normal and rapid navigation on both available devices and disclose material tradeoffs or untested cases.
|
|
- Review the final diff for hardcoded device assumptions and secrets before committing. Document relevant behavior, settings, and validation alongside the change.
|
|
|
|
## Build and release
|
|
|
|
- Set `JAVA_HOME` (JDK 17) and `ANDROID_HOME` (Android SDK), then run `python scripts/build.py --tests`. On macOS/Linux `bash scripts/build.sh --tests` wraps the same build. Run device tests serially, with an explicit ADB serial; restore preferences and remove the test APK afterward.
|
|
- Version both `app/build.gradle` and `app/src/main/AndroidManifest.xml`, edit `docs/UPDATE_NOTES.md`, build, and commit **both** `output/Luma.apk` and `output/update.json` with source/docs to `main`. Push `main`, then verify the public feed and downloaded APK checksum. This branch feed is the release mechanism; no separate release upload is required.
|
|
- Signing uses ignored `.tools/luma-development.keystore` and `.tools/signing.json`, or `LUMA_KEYSTORE`, `LUMA_KEY_ALIAS`, and `LUMA_KEYSTORE_PASSWORD`. Back up the key and local signing configuration securely. Never regenerate them to fix a routine build failure.
|
|
- Version 1.1.13 intentionally begins a new signing identity after the old key was lost and replacement was authorized. Versions through 1.1.12 require a one-time uninstall/reinstall, which resets app data. Keep signature verification enabled; later releases must reuse the replacement key.
|
|
- Move mode must compare the actual displayed order with the requested order before rebuilding; do not mutate `visibleApps` before the reuse check. Keep selection stable while focused children are replaced. `HomeActionsInstrumentation` covers remote movement/save/cancel, network lifecycle, and simulated input-header layout.
|