Previously pm install ran on BOOT_COMPLETED, triggering idmap2d overlay
re-evaluation under load and causing repeated SIGKILL cycles.
New design:
- ACTION_BASE_PROVISION (BOOT_COMPLETED): applies settings from the
pre-installed config APK and configures the setup wizard state.
No network, no pm install, completes quickly.
- ACTION_OTA_UPDATE (USER_PRESENT): downloads the config APK URL and
installs it over the built-in copy if the OTA check interval has elapsed
(default 24 h, configurable via ota_check_interval_ms in vendor.cfg).
Attempt timestamp is recorded before download to prevent server-error
storms on repeated screen unlocks.
All shared helpers (applyConfigApkSettings, applyApns, configureSetupWizard,
downloadApk, installApk) moved to service level so both tasks share them.