Stop relying on the local cache in KeyguardUpdateMonitor to determine whether user storage is locked.
SystemUI expects a broadcast with ACTION_USER_UNLOCKED intent action to update the state in the local cache.
From the recent bug reports it seems like SystemUI never receives the broadcast or misses it or something else is causing the cache to remain stale.
This CL changes the method to use UserManager#isUserUnlocked directly instead of relying on the cache. `UserManager` has an IPC data cache that would avoid repeated IPCs, making this change behind a flag to identify any performance regressions.
Flag: com.android.systemui.user_encrypted_source
Bug: 333656491
Test: verified manually, reboot device, see the `Unlock for all features and data` message on lock screen.
Change-Id: If15b8603aad4ec01fbcbdc3df105451d9e5802b4
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index 0938167..cb43fcf 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -26,6 +26,16 @@
}
flag {
+ name: "user_encrypted_source"
+ namespace: "systemui"
+ description: "Get rid of the local cache and rely on UserManager.isUserUnlocked directly to determine whether user CE storage is encrypted."
+ bug: "333656491"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
name: "modes_ui_dialog_paging"
namespace: "systemui"
description: "Add pagination to the Modes dialog in quick settings."