From 99e1bca91a0eb7a098145ddf421c355b46bf1e4a Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 23 Aug 2016 16:32:03 -0600 Subject: [PATCH] DO NOT MERGE. Update lockscreen message when user unlocked. If a user doesn't have credentials, we start the unlock process automatically, but that races with the UI binding process. Fix by rebinding the UI once we hear the user is unlocked. Change-Id: Id678b97aa6120ba78088fb6cf4c2a65d129e98a3 Test: none Bug: 30840626 (cherry picked from commit 181001379fed124ab9fcb2a5fccedf68c48fa5a7) --- .../statusbar/KeyguardIndicationController.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java index 6d73ccb21823c..cf962df64dd97 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java @@ -93,8 +93,10 @@ public class KeyguardIndicationController { ServiceManager.getService(BatteryStats.SERVICE_NAME)); KeyguardUpdateMonitor.getInstance(context).registerCallback(mUpdateMonitor); - context.registerReceiverAsUser(mReceiver, UserHandle.SYSTEM, + context.registerReceiverAsUser(mTickReceiver, UserHandle.SYSTEM, new IntentFilter(Intent.ACTION_TIME_TICK), null, null); + context.registerReceiverAsUser(mUnlockReceiver, UserHandle.ALL, + new IntentFilter(Intent.ACTION_USER_UNLOCKED), null, null); } public void setVisible(boolean visible) { @@ -322,7 +324,16 @@ public class KeyguardIndicationController { } }; - BroadcastReceiver mReceiver = new BroadcastReceiver() { + BroadcastReceiver mTickReceiver = new BroadcastReceiver() { + @Override + public void onReceive(Context context, Intent intent) { + if (mVisible) { + updateIndication(); + } + } + }; + + BroadcastReceiver mUnlockReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if (mVisible) {