diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index 622362b54ed18..584beaeea7675 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -165,7 +165,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private static final int MSG_USER_SWITCHING = 310; private static final int MSG_KEYGUARD_RESET = 312; private static final int MSG_USER_SWITCH_COMPLETE = 314; - private static final int MSG_USER_INFO_CHANGED = 317; private static final int MSG_REPORT_EMERGENCY_CALL_ACTION = 318; private static final int MSG_STARTED_WAKING_UP = 319; private static final int MSG_FINISHED_GOING_TO_SLEEP = 320; @@ -1453,9 +1452,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab final String action = intent.getAction(); if (AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED.equals(action)) { mHandler.sendEmptyMessage(MSG_TIME_UPDATE); - } else if (Intent.ACTION_USER_INFO_CHANGED.equals(action)) { - mHandler.sendMessage(mHandler.obtainMessage(MSG_USER_INFO_CHANGED, - intent.getIntExtra(Intent.EXTRA_USER_HANDLE, getSendingUserId()), 0)); } else if (ACTION_FACE_UNLOCK_STARTED.equals(action)) { Trace.beginSection( "KeyguardUpdateMonitor.mBroadcastAllReceiver#onReceive " @@ -1811,16 +1807,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab } } - private void handleUserInfoChanged(int userId) { - Assert.isMainThread(); - for (int i = 0; i < mCallbacks.size(); i++) { - KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); - if (cb != null) { - cb.onUserInfoChanged(userId); - } - } - } - private void handleUserUnlocked(int userId) { Assert.isMainThread(); mUserIsUnlocked.put(userId, true); @@ -1938,9 +1924,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab case MSG_KEYGUARD_BOUNCER_CHANGED: handleKeyguardBouncerChanged(msg.arg1, msg.arg2); break; - case MSG_USER_INFO_CHANGED: - handleUserInfoChanged(msg.arg1); - break; case MSG_REPORT_EMERGENCY_CALL_ACTION: handleReportEmergencyCallAction(); break; @@ -2051,7 +2034,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab }); final IntentFilter allUserFilter = new IntentFilter(); - allUserFilter.addAction(Intent.ACTION_USER_INFO_CHANGED); allUserFilter.addAction(AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED); allUserFilter.addAction(ACTION_FACE_UNLOCK_STARTED); allUserFilter.addAction(ACTION_FACE_UNLOCK_STOPPED); @@ -3149,20 +3131,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab updateBiometricListeningState(BIOMETRIC_ACTION_UPDATE); } - /** Notifies that the occluded state changed. */ - public void onKeyguardOccludedChanged(boolean occluded) { - Assert.isMainThread(); - if (DEBUG) { - Log.d(TAG, "onKeyguardOccludedChanged(" + occluded + ")"); - } - for (int i = 0; i < mCallbacks.size(); i++) { - KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); - if (cb != null) { - cb.onKeyguardOccludedChanged(occluded); - } - } - } - /** * Handle {@link #MSG_KEYGUARD_RESET} */ @@ -3380,7 +3348,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab callback.onPhoneStateChanged(mPhoneState); callback.onRefreshCarrierInfo(); callback.onClockVisibilityChanged(); - callback.onKeyguardOccludedChanged(mKeyguardOccluded); callback.onKeyguardVisibilityChangedRaw(mKeyguardIsVisible); callback.onTelephonyCapable(mTelephonyCapable); diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java index 051b81e484d89..d420abd688ae4 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java @@ -80,12 +80,6 @@ public class KeyguardUpdateMonitorCallback { */ public void onKeyguardVisibilityChanged(boolean showing) { } - /** - * Called when the keyguard occluded state changes. - * @param occluded Indicates if the keyguard is now occluded. - */ - public void onKeyguardOccludedChanged(boolean occluded) { } - public void onKeyguardVisibilityChangedRaw(boolean showing) { final long now = SystemClock.elapsedRealtime(); if (showing == mShowing @@ -150,11 +144,6 @@ public class KeyguardUpdateMonitorCallback { */ public void onSimStateChanged(int subId, int slotId, int simState) { } - /** - * Called when the user's info changed. - */ - public void onUserInfoChanged(int userId) { } - /** * Called when a user got unlocked. */ diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 3c88e40239607..5b90ed834253e 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -555,10 +555,6 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, } } - @Override - public void onUserInfoChanged(int userId) { - } - @Override public void onClockVisibilityChanged() { adjustStatusBarLocked(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index b5e43021a6e46..3da4fba7348c7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -1041,7 +1041,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb } if (occluded != mLastOccluded || mFirstUpdate) { - mKeyguardUpdateManager.onKeyguardOccludedChanged(occluded); mKeyguardStateController.notifyKeyguardState(showing, occluded); } if ((showing && !occluded) != (mLastShowing && !mLastOccluded) || mFirstUpdate) { @@ -1070,11 +1069,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb mCentralSurfaces.onKeyguardViewManagerStatesUpdated(); } - private View getCurrentNavBarView() { - final NavigationBarView navBarView = mCentralSurfaces.getNavigationBarView(); - return navBarView != null ? navBarView.getCurrentView() : null; - } - /** * Updates the visibility of the nav bar window (which will cause insets changes). */ diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java index a6b0bc3457424..aa08440d8cbcd 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManagerTest.java @@ -275,21 +275,18 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase { // Should be false to start, so no invocations mStatusBarKeyguardViewManager.setOccluded(false /* occluded */, false /* animated */); - verify(mKeyguardUpdateMonitor, never()).onKeyguardOccludedChanged(anyBoolean()); verify(mKeyguardStateController, never()).notifyKeyguardState(anyBoolean(), anyBoolean()); clearInvocations(mKeyguardUpdateMonitor); clearInvocations(mKeyguardStateController); mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */); - verify(mKeyguardUpdateMonitor).onKeyguardOccludedChanged(true); verify(mKeyguardStateController).notifyKeyguardState(true, true); clearInvocations(mKeyguardUpdateMonitor); clearInvocations(mKeyguardStateController); mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */); - verify(mKeyguardUpdateMonitor, never()).onKeyguardOccludedChanged(anyBoolean()); verify(mKeyguardStateController, never()).notifyKeyguardState(anyBoolean(), anyBoolean()); } @@ -299,7 +296,6 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase { mStatusBarKeyguardViewManager.show(null); mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */); - verify(mKeyguardUpdateMonitor).onKeyguardOccludedChanged(true); verify(mKeyguardStateController).notifyKeyguardState(true, true); } @@ -309,7 +305,6 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase { mStatusBarKeyguardViewManager.show(null); mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animated */); - verify(mKeyguardUpdateMonitor).onKeyguardOccludedChanged(true); verify(mKeyguardStateController).notifyKeyguardState(true, true); }