- Decision
- ADR-077
- Date
- 2026-09-03
- Status
- AcceptedAccepted
- Part
- Duress Unlock
- Mentions
- ADR-074
- Mentioned by
- ADR-078
1Decision
Show the owner's device-admin policy description/label text to a decoy session by consuming isMainForUiDisplay in DeviceAdminAdd.addDeviceAdminPolicies() (packages/apps/Settings patch 0009).
2Why and evidence
Task 4 of the same plan (docs/superpowers/specs/2026-09-03-duress-decoy-primary-profile-visual-parity-design.md) closes a second, distinct audit-confirmed cosmetic gap: addDeviceAdminPolicies() picks between two pre-existing string variants (pi.description/pi.descriptionForSecondaryUsers, pi.label/pi.labelForSecondaryUsers) based on UserManager.get(this).isAdminUser() — a decoy activating a device-admin app (e.g. a Find My Device-style app) would see the "secondary user" wording a real single-owner admin never would.
Fixed with a one-line condition change at line 802: boolean isAdminUser = UserManager.get(this).isAdminUser() \|\| UserManager.get(this).isMainForUiDisplay(UserHandle.myUserId());; no other line in the method or file changes. UserHandle is the file's own pre-existing import (line 62) and .myUserId() is already used elsewhere in the same file (lines 433, 547, 728, 797) — no new import needed.
Real current HEAD (885b048dd3c80cefb4e47dde2332abb058edad47) and the exact quoted line-802 content were both re-confirmed against the live build-server source before editing, matching the brief exactly. Landed via git am --3way (clean, no conflicts) at real branch SHA d5e8d97332f098eeb852deb9c2ff7a17423fc402.
A fast m Settings build (OUT_DIR=out-preflight) confirmed frameworks/base's 0031 (isMainForUiDisplay, ADR-074) is genuinely present and resolvable from this repository, matching Task 3's own confirmation: ninja: 5m07.60s Build Succeeded: 20 steps, #### build completed successfully (05:13) ####, no unresolved-symbol failure.
3Consequences
No real capability check changes — this is display-only string selection, using the same isMainForUiDisplay primitive already accepted in ADR-074/075/076. Not yet dynamically validated (compile-time only, matching this whole visual-parity plan's current stage); deferred to a future consolidated hardware-validation round alongside Tasks 1-3.
4Review when
A future refactor of DeviceAdminAdd.addDeviceAdminPolicies() should preserve the isMainForUiDisplay check as an isAdminUser() alternative, not a replacement, and keep the per-policy descriptionId/labelId selection logic unchanged.
Read from docs/governance/decision-log.md, entry ADR-077.