Skip to content

SystemUI: authenticate before disabling airplane mode - #437

Draft
Datawav wants to merge 1 commit into
GrapheneOS:17from
Datawav:datawav/airplane-mode-authentication
Draft

SystemUI: authenticate before disabling airplane mode#437
Datawav wants to merge 1 commit into
GrapheneOS:17from
Datawav:datawav/airplane-mode-authentication

Conversation

@Datawav

@Datawav Datawav commented Sep 1, 2026

Copy link
Copy Markdown

Refs GrapheneOS/os-issue-tracker#6059

This proof of concept adds an opt-in, off-by-default global setting used by SystemUI to require fresh system authentication before user-initiated airplane mode disablement.

The prompt uses the active user's standard operating-system authentication configuration: a strong biometric or the existing device credential (PIN, pattern, or password). It does not create or store a separate password. Enabling airplane mode remains immediate.

SystemUI coverage includes:

  • the current airplane mode Quick Settings tile
  • the legacy airplane mode Quick Settings tile
  • the Internet dialog's "Turn off airplane mode" action

The authentication interactor is a SystemUI singleton, so a second disable request cannot open another prompt. Cancellation, authentication error, or lockout leaves airplane mode enabled. Each callback rechecks live airplane-mode state before writing. The legacy tile and Internet dialog retain ownership of their prompt and cancel it when their UI lifecycle ends. The prompt and security check use UserTracker.userContext, so secondary users authenticate against their own configured credential.

The protected setting is also included in SettingsProvider's global-settings proto dump.

This is deliberately UI-level accidental-activation protection rather than a central radio policy. Shell and privileged API callers, emergency behavior, watch synchronization, and the airplane action that is not present in GrapheneOS's configured global-actions list are outside this proof of concept.

Paired with GrapheneOS/platform_packages_apps_Settings#445, which exposes the option and protects the Settings airplane-mode toggle.

Test: not run; building GrapheneOS was intentionally not attempted on the resource-constrained development host. git diff --check passed, modified XML parsed successfully, the complete cross-repository diff received Sol static review, and an independent immutable-diff Claude Opus review passed before publication. Suggested upstream targets are the affected SystemUITests and SystemUI multivalent test classes added or updated by this change.

@Datawav
Datawav force-pushed the datawav/airplane-mode-authentication branch from 2d2a6d3 to 16e4359 Compare September 1, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant