Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +28 −20 Original line number Diff line number Diff line Loading @@ -210,6 +210,7 @@ public class KeyguardViewMediator extends SystemUI { private boolean mBootCompleted; private boolean mBootSendUserPresent; private boolean mShuttingDown; private boolean mDozing; /** High level access to the power manager for WakeLocks */ private PowerManager mPM; Loading Loading @@ -713,11 +714,10 @@ public class KeyguardViewMediator extends SystemUI { com.android.keyguard.R.bool.config_enableKeyguardService)) { setShowingLocked(!shouldWaitForProvisioning() && !mLockPatternUtils.isLockScreenDisabled( KeyguardUpdateMonitor.getCurrentUser()), mAodShowing, true /* forceCallbacks */); KeyguardUpdateMonitor.getCurrentUser()), true /* forceCallbacks */); } else { // The system's keyguard is disabled or missing. setShowingLocked(false, mAodShowing, true); setShowingLocked(false /* showing */, true /* forceCallbacks */); } mStatusBarKeyguardViewManager = Loading Loading @@ -1326,7 +1326,7 @@ public class KeyguardViewMediator extends SystemUI { if (mLockPatternUtils.checkVoldPassword(KeyguardUpdateMonitor.getCurrentUser())) { if (DEBUG) Log.d(TAG, "Not showing lock screen since just decrypted"); // Without this, settings is not enabled until the lock screen first appears setShowingLocked(false, mAodShowing); setShowingLocked(false); hideLocked(); return; } Loading Loading @@ -1742,6 +1742,9 @@ public class KeyguardViewMediator extends SystemUI { private void updateActivityLockScreenState(boolean showing, boolean aodShowing) { mUiOffloadThread.submit(() -> { if (DEBUG) { Log.d(TAG, "updateActivityLockScreenState(" + showing + ", " + aodShowing + ")"); } try { ActivityTaskManager.getService().setLockScreenShown(showing, aodShowing); } catch (RemoteException e) { Loading @@ -1767,10 +1770,10 @@ public class KeyguardViewMediator extends SystemUI { if (DEBUG) Log.d(TAG, "handleShow"); } setShowingLocked(true, mAodShowing); mStatusBarKeyguardViewManager.show(options); mHiding = false; mWakeAndUnlocking = false; setShowingLocked(true); mStatusBarKeyguardViewManager.show(options); resetKeyguardDonePendingLocked(); mHideAnimationRun = false; adjustStatusBarLocked(); Loading Loading @@ -1877,7 +1880,7 @@ public class KeyguardViewMediator extends SystemUI { if (!mHiding) { // Tell ActivityManager that we canceled the keyguardExitAnimation. setShowingLocked(mShowing, mAodShowing, true /* force */); setShowingLocked(mShowing, true /* force */); return; } mHiding = false; Loading @@ -1898,8 +1901,8 @@ public class KeyguardViewMediator extends SystemUI { playSounds(false); } setShowingLocked(false); mWakeAndUnlocking = false; setShowingLocked(false, mAodShowing); mDismissCallbackRegistry.notifyDismissSucceeded(); mStatusBarKeyguardViewManager.hide(startTime, fadeoutDuration); resetKeyguardDonePendingLocked(); Loading Loading @@ -1959,7 +1962,7 @@ public class KeyguardViewMediator extends SystemUI { Trace.beginSection("KeyguardViewMediator#handleVerifyUnlock"); synchronized (KeyguardViewMediator.this) { if (DEBUG) Log.d(TAG, "handleVerifyUnlock"); setShowingLocked(true, mAodShowing); setShowingLocked(true); mStatusBarKeyguardViewManager.dismissAndCollapse(); } Trace.endSection(); Loading Loading @@ -2107,6 +2110,8 @@ public class KeyguardViewMediator extends SystemUI { pw.print(" mDeviceInteractive: "); pw.println(mDeviceInteractive); pw.print(" mGoingToSleep: "); pw.println(mGoingToSleep); pw.print(" mHiding: "); pw.println(mHiding); pw.print(" mDozing: "); pw.println(mDozing); pw.print(" mAodShowing: "); pw.println(mAodShowing); pw.print(" mWaitingUntilKeyguardVisible: "); pw.println(mWaitingUntilKeyguardVisible); pw.print(" mKeyguardDonePending: "); pw.println(mKeyguardDonePending); pw.print(" mHideAnimationRun: "); pw.println(mHideAnimationRun); Loading @@ -2117,10 +2122,14 @@ public class KeyguardViewMediator extends SystemUI { } /** * @param aodShowing true when AOD - or ambient mode - is showing. * @param dozing true when AOD - or ambient mode - is showing. */ public void setAodShowing(boolean aodShowing) { setShowingLocked(mShowing, aodShowing); public void setDozing(boolean dozing) { if (dozing == mDozing) { return; } mDozing = dozing; setShowingLocked(mShowing); } /** Loading @@ -2141,19 +2150,18 @@ public class KeyguardViewMediator extends SystemUI { } } private void setShowingLocked(boolean showing, boolean aodShowing) { setShowingLocked(showing, aodShowing, false /* forceCallbacks */); private void setShowingLocked(boolean showing) { setShowingLocked(showing, false /* forceCallbacks */); } private void setShowingLocked(boolean showing, boolean aodShowing, boolean forceCallbacks) { private void setShowingLocked(boolean showing, boolean forceCallbacks) { final boolean aodShowing = mDozing && !mWakeAndUnlocking; final boolean notifyDefaultDisplayCallbacks = showing != mShowing || aodShowing != mAodShowing || forceCallbacks; if (notifyDefaultDisplayCallbacks) { mShowing = showing; mAodShowing = aodShowing; if (notifyDefaultDisplayCallbacks) { notifyDefaultDisplayCallbacks(showing); } updateActivityLockScreenState(showing, aodShowing); } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -3435,7 +3435,7 @@ public class StatusBar extends SystemUI implements DemoMode, mNotificationPanel.resetViews(dozingAnimated); updateQsExpansionEnabled(); mKeyguardViewMediator.setAodShowing(mDozing); mKeyguardViewMediator.setDozing(mDozing); mEntryManager.updateNotifications(); updateDozingState(); Loading Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +28 −20 Original line number Diff line number Diff line Loading @@ -210,6 +210,7 @@ public class KeyguardViewMediator extends SystemUI { private boolean mBootCompleted; private boolean mBootSendUserPresent; private boolean mShuttingDown; private boolean mDozing; /** High level access to the power manager for WakeLocks */ private PowerManager mPM; Loading Loading @@ -713,11 +714,10 @@ public class KeyguardViewMediator extends SystemUI { com.android.keyguard.R.bool.config_enableKeyguardService)) { setShowingLocked(!shouldWaitForProvisioning() && !mLockPatternUtils.isLockScreenDisabled( KeyguardUpdateMonitor.getCurrentUser()), mAodShowing, true /* forceCallbacks */); KeyguardUpdateMonitor.getCurrentUser()), true /* forceCallbacks */); } else { // The system's keyguard is disabled or missing. setShowingLocked(false, mAodShowing, true); setShowingLocked(false /* showing */, true /* forceCallbacks */); } mStatusBarKeyguardViewManager = Loading Loading @@ -1326,7 +1326,7 @@ public class KeyguardViewMediator extends SystemUI { if (mLockPatternUtils.checkVoldPassword(KeyguardUpdateMonitor.getCurrentUser())) { if (DEBUG) Log.d(TAG, "Not showing lock screen since just decrypted"); // Without this, settings is not enabled until the lock screen first appears setShowingLocked(false, mAodShowing); setShowingLocked(false); hideLocked(); return; } Loading Loading @@ -1742,6 +1742,9 @@ public class KeyguardViewMediator extends SystemUI { private void updateActivityLockScreenState(boolean showing, boolean aodShowing) { mUiOffloadThread.submit(() -> { if (DEBUG) { Log.d(TAG, "updateActivityLockScreenState(" + showing + ", " + aodShowing + ")"); } try { ActivityTaskManager.getService().setLockScreenShown(showing, aodShowing); } catch (RemoteException e) { Loading @@ -1767,10 +1770,10 @@ public class KeyguardViewMediator extends SystemUI { if (DEBUG) Log.d(TAG, "handleShow"); } setShowingLocked(true, mAodShowing); mStatusBarKeyguardViewManager.show(options); mHiding = false; mWakeAndUnlocking = false; setShowingLocked(true); mStatusBarKeyguardViewManager.show(options); resetKeyguardDonePendingLocked(); mHideAnimationRun = false; adjustStatusBarLocked(); Loading Loading @@ -1877,7 +1880,7 @@ public class KeyguardViewMediator extends SystemUI { if (!mHiding) { // Tell ActivityManager that we canceled the keyguardExitAnimation. setShowingLocked(mShowing, mAodShowing, true /* force */); setShowingLocked(mShowing, true /* force */); return; } mHiding = false; Loading @@ -1898,8 +1901,8 @@ public class KeyguardViewMediator extends SystemUI { playSounds(false); } setShowingLocked(false); mWakeAndUnlocking = false; setShowingLocked(false, mAodShowing); mDismissCallbackRegistry.notifyDismissSucceeded(); mStatusBarKeyguardViewManager.hide(startTime, fadeoutDuration); resetKeyguardDonePendingLocked(); Loading Loading @@ -1959,7 +1962,7 @@ public class KeyguardViewMediator extends SystemUI { Trace.beginSection("KeyguardViewMediator#handleVerifyUnlock"); synchronized (KeyguardViewMediator.this) { if (DEBUG) Log.d(TAG, "handleVerifyUnlock"); setShowingLocked(true, mAodShowing); setShowingLocked(true); mStatusBarKeyguardViewManager.dismissAndCollapse(); } Trace.endSection(); Loading Loading @@ -2107,6 +2110,8 @@ public class KeyguardViewMediator extends SystemUI { pw.print(" mDeviceInteractive: "); pw.println(mDeviceInteractive); pw.print(" mGoingToSleep: "); pw.println(mGoingToSleep); pw.print(" mHiding: "); pw.println(mHiding); pw.print(" mDozing: "); pw.println(mDozing); pw.print(" mAodShowing: "); pw.println(mAodShowing); pw.print(" mWaitingUntilKeyguardVisible: "); pw.println(mWaitingUntilKeyguardVisible); pw.print(" mKeyguardDonePending: "); pw.println(mKeyguardDonePending); pw.print(" mHideAnimationRun: "); pw.println(mHideAnimationRun); Loading @@ -2117,10 +2122,14 @@ public class KeyguardViewMediator extends SystemUI { } /** * @param aodShowing true when AOD - or ambient mode - is showing. * @param dozing true when AOD - or ambient mode - is showing. */ public void setAodShowing(boolean aodShowing) { setShowingLocked(mShowing, aodShowing); public void setDozing(boolean dozing) { if (dozing == mDozing) { return; } mDozing = dozing; setShowingLocked(mShowing); } /** Loading @@ -2141,19 +2150,18 @@ public class KeyguardViewMediator extends SystemUI { } } private void setShowingLocked(boolean showing, boolean aodShowing) { setShowingLocked(showing, aodShowing, false /* forceCallbacks */); private void setShowingLocked(boolean showing) { setShowingLocked(showing, false /* forceCallbacks */); } private void setShowingLocked(boolean showing, boolean aodShowing, boolean forceCallbacks) { private void setShowingLocked(boolean showing, boolean forceCallbacks) { final boolean aodShowing = mDozing && !mWakeAndUnlocking; final boolean notifyDefaultDisplayCallbacks = showing != mShowing || aodShowing != mAodShowing || forceCallbacks; if (notifyDefaultDisplayCallbacks) { mShowing = showing; mAodShowing = aodShowing; if (notifyDefaultDisplayCallbacks) { notifyDefaultDisplayCallbacks(showing); } updateActivityLockScreenState(showing, aodShowing); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +1 −1 Original line number Diff line number Diff line Loading @@ -3435,7 +3435,7 @@ public class StatusBar extends SystemUI implements DemoMode, mNotificationPanel.resetViews(dozingAnimated); updateQsExpansionEnabled(); mKeyguardViewMediator.setAodShowing(mDozing); mKeyguardViewMediator.setDozing(mDozing); mEntryManager.updateNotifications(); updateDozingState(); Loading