feat(HCT): Perform custom migration logic for existing HCT users
This logic is triggered by two scenarios:
(A) During first bootup after OTA update to Android 16, if the
user had HCT enabled.
- Trigger: ACTION_PRE_BOOT_COMPLETED.
- Migration: HCT is disabled and notification is shown.
(B) Restore backup from Android 15 (or earlier), if the backup
had HCT enabled and new device does not.
- Trigger: SettingsProvider's restore process.
- Migration: HCT is not restored and notification is shown.
We store whether the user has seen this notification in a new secure
setting ACCESSIBILITY_HCT_SHOW_PROMPT. This setting is also backed up.
Bug: 369906140
Flag: com.android.graphics.hwui.flags.high_contrast_text_small_text_rect
Test: atest SettingsRoboTests:com.android.settings.accessibility.HighContrastTextMigrationReceiverTest
Test: flash an incremental update on a build with HCT enabled;
observe HCT is disabled and a notification is sent.
Test: flash an incremental update on a build with HCT disabled;
observe no change to HCT and no notification.
Change-Id: I4d294ffc0b2eabc59ee7988a579d678975a16380
5 files changed