Commit Graph
12 Commits
Author SHA1 Message Date
oxmc c1ec0ccee3 SetupWizard: OEM-contributed wizard pages from the config APK
A config APK can ship res/xml/oem_wizard.xml (declarative Rich schema:
section/text/image/toggle/choice/input/link, multi-page). ConfigProvisioner
emits Settings.Global pawlet.oem_wizard_pkg when it detects the file; the
wizard loads + parses it and appends the pages near the end of the flow.

- lib/oem: OemModels, OemWizardParser (pull-parser; text carried in a value
  attribute since compiled res/xml drops element text), OemWizardRepository
  (signal + default-package fallback), OemPendingStore (deferred secure/global
  writes).
- OemWizardScreen renders elements to Compose on the shared scaffold; toggle/
  choice/input selections are seeded with OEM defaults and recorded, then
  applied in finishSetupWizard.
- MainActivity appends OEM pages; no config-APK code runs (declarative only),
  link actions limited to explicit component:/intent:.
2026-07-18 07:40:06 -07:00
oxmc f636cd1a2a SetupWizard: hide + lock system UI during setup
Decouple the setup UI hiding from the managed kiosk lockdown:
- New WizardFlags.IMMERSIVE (default true): hide the status/nav bars during
  setup (sticky immersive) independent of KIOSK. KIOSK stays the aggressive
  managed lockdown (overlay window + non-sticky + future lock-task).
- BaseKioskActivity / MainActivity hide the bars when IMMERSIVE || KIOSK.
- Add StatusBarManager.setDisabledForSetup(true) on wizard start
  (EntryPoint + MainActivity) and setDisabledForSetup(false) in
  finishSetupWizard, so the shade/quick-settings/Home/Recents are actually
  locked during setup (matches LineageOS). Called via reflection so the
  module still builds under Gradle (the API is @SystemApi).
2026-07-18 02:20:18 -07:00
oxmc b328dbea85 SetupWizard: link okhttp3 + okio directly to fix R8 missing classes
coil-network-okhttp / coil-core declare okhttp3 and okio as static_libs,
but that transitive link (java_import jars through the Coil AAR imports)
does not reach this app's R8 program, so R8 reported okhttp3.*/okio.* as
missing and Coil's OkHttp fetcher would NoClassDefFoundError when loading
network images (device render from deviceInfo[4]). List okhttp3 and okio
directly in static_libs so their classes are in the dex.
2026-07-18 01:10:44 -07:00
oxmc 0453c772a7 SetupWizard: full step set, cleanup, theme, kiosk/deeplink off, OTA check
Steps: add Bluetooth, SIM-missing, Date/Time, Restore (auto-skip),
Location, microG, Screen-lock, Biometric, Navigation, Theme,
Privacy/Metrics, Device-specific, Recovery-update, and an OTA
update-check step, all on a shared WizardStepScaffold with DeviceProfile
gating. PartnerReceiver + SETUP_COMPLETE broadcast added.

microG: gate the step on microG's GmsCore being installed
(microGAvailable) rather than hasGMS(), which additionally requires
Google's setup wizard and is therefore always false on a microG build.

OTA: UpdateChecker mirrors the Updater's read-only check (server URL from
the Updater's own resources, same version/timestamp/release-type rules)
and delegates download + A/B install to the Updater (update_engine). Props
are read via reflection so the module still builds under Gradle.

Kiosk + deep links gated off via WizardFlags (immersive skipped entirely,
oxmc http/oxn VIEW filters removed from both manifests). Permissions gate
removed (platform-signed SETUP_WIZARD already holds what it needs).

Cleanup: purge Applebee's-mockup code (login/AuthManager, oxmcservers,
ManagerInfo/UserInfo, TemperatureUnit, SettingsScreen, weather + oxmc API
strings). Rework theme off the all-purple palette to neutral surfaces with
violet/pink/teal accents; fix white-on-primary button contrast.
2026-07-17 19:43:27 -07:00
oxmc ec943e82b9 SetupWizard: allowlist DOMAIN_VERIFICATION_AGENT privileged permission
The manifest declares android.permission.DOMAIN_VERIFICATION_AGENT
(signature|privileged) but it was missing from the privapp-permissions
allowlist. On enforcing builds PermissionManagerService.onSystemReady()
throws IllegalStateException for an unallowlisted privileged permission,
killing system_server every boot (bootanim loop). Add the entry.
2026-07-17 08:10:40 -07:00
oxmc 0d784ed55b Migrate to Coil 3.5.0
The tree pins prebuilt_libs_coil at 3.5.0 (coil3.* packages); move the
three image-loading screens to coil3.compose and add coil-network-okhttp
— Coil 3 core ships no network fetcher, so http(s) image URLs need it
(it self-registers through ServiceLoader). Gradle catalog bumped to the
matching io.coil-kt.coil3 coordinates.
2026-07-15 15:54:10 -07:00
oxmc f7f9adbc01 Fix the Soong build: restore library wiring, fix API 36 skew
- Android.bp: android-device-info is used by the wizard source (b11cf5b
  dropped it in error); re-add its android_library_import plus the
  core-splashscreen and coil-compose imports from
  prebuilts/application_libs, and a Soong-only BuildConfig stub under
  soong-stubs/ (Gradle generates its own, so the stub stays out of the
  Gradle source set).
- onNewIntent takes a non-null Intent on API 36.
- Region/Locale wizard pages pass a value-discarding lambda; the wizard
  only advances.
- SetupCompleteScreen: drawContent() needs the explicit drawWithContent
  receiver inside clipPath after the Compose receiver-scoping change.
2026-07-15 15:45:05 -07:00
oxmc 0caf9c7ef2 build: set minSdk=36 to match Android 16 target 2026-06-17 02:50:39 -07:00
oxmc ba7dabeb39 themes: replace Material3 view themes with platform DeviceDefault base
Theme.Material3.* and Theme.MaterialComponents.* are from the
Material view library which is not in the AOSP prebuilts.

The wizard is Compose-only so the XML theme only needs to control
window properties (background, transparent bars). All Material3
colour/typography tokens are applied inside Compose.

Also removes values-v21/v23/v31 overrides — minSdk=31 makes v21/v23
unreachable, and v31 only existed for the removed splash screen dep.
2026-06-17 02:47:37 -07:00
oxmc b11cf5b947 Android.bp: drop android-device-info (not used in wizard source) 2026-06-17 01:05:41 -07:00
oxmc 316043e9c0 Android.bp: drop core-splashscreen (not in AOSP prebuilts, not used) 2026-06-17 00:56:52 -07:00
oxmc c85367f3d4 setupwizard: replace with new Kotlin/Compose implementation
Replaces the LineageOS-based Java wizard with a new Kotlin/Jetpack
Compose wizard built on the PawletOS design language.

Key changes:
- Extensible WizardPage registry with DeviceProfile-based gating
  (phone/tablet/embedded form factors, hasWifi, hasTelephony)
- SetupWizardManager drives navigation via StateFlow<Int> over
  a runtime-built page list; supports oxn://page?id= deep link jumps
- Circular-reveal collapse animation on finish (900ms, matches
  LineageOS FinishActivity behaviour) via Compose drawWithContent/clipPath
- finishSetupWizard() sets DEVICE_PROVISIONED + USER_SETUP_COMPLETE
  and disables the HOME component on completion
- EntryPoint registered with CATEGORY_HOME + CATEGORY_SETUP_WIZARD
  so AOSP launches the wizard on first boot
- Deep link handling: cdn.oxmc.me / oxmc.me / pawlet.oxmc.me (http/https)
  and oxn:// scheme (apk install, page navigation, management)
- Full package rename: dev.oxmc.setupwizard -> me.pawlet.setupwizard
- Dual build system: Gradle (app/build.gradle.kts) for Studio development,
  Android.bp + root AndroidManifest.xml for AOSP/Soong ROM build
- Signed with platform certificate, system_ext, sharedUserId=android.uid.system
2026-06-16 22:30:40 -07:00