Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +8 −10 Original line number Diff line number Diff line Loading @@ -508,7 +508,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { private boolean mKeyguardOccludedChanged; private ActivityTaskManagerInternal.SleepTokenAcquirer mScreenOffSleepTokenAcquirer; volatile boolean mKeyguardOccluded; Intent mHomeIntent; Intent mCarDockIntent; Intent mDeskDockIntent; Loading Loading @@ -2399,7 +2398,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { // the keyguard is being hidden. This is okay because starting windows never show // secret information. // TODO(b/113840485): Occluded may not only happen on default display if (displayId == DEFAULT_DISPLAY && mKeyguardOccluded) { if (displayId == DEFAULT_DISPLAY && isKeyguardOccluded()) { windowFlags |= FLAG_SHOW_WHEN_LOCKED; } } Loading Loading @@ -3215,7 +3214,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { return; } if (!mKeyguardOccluded && mKeyguardDelegate.isInputRestricted()) { if (!isKeyguardOccluded() && mKeyguardDelegate.isInputRestricted()) { // when in keyguard restricted mode, must first verify unlock // before launching home mKeyguardDelegate.verifyUnlock(new OnKeyguardExitResult() { Loading Loading @@ -3266,7 +3265,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public void setKeyguardCandidateLw(WindowState win) { mKeyguardCandidate = win; setKeyguardOccludedLw(mKeyguardOccluded, true /* force */); setKeyguardOccludedLw(isKeyguardOccluded(), true /* force */); } /** Loading @@ -3279,13 +3278,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { */ private boolean setKeyguardOccludedLw(boolean isOccluded, boolean force) { if (DEBUG_KEYGUARD) Slog.d(TAG, "setKeyguardOccluded occluded=" + isOccluded); if (mKeyguardOccluded == isOccluded && !force) { if (isKeyguardOccluded() == isOccluded && !force) { return false; } final boolean showing = mKeyguardDelegate.isShowing(); final boolean animate = showing && !isOccluded; mKeyguardOccluded = isOccluded; mKeyguardDelegate.setOccluded(isOccluded, animate); if (!showing) { Loading Loading @@ -4593,7 +4591,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public boolean isKeyguardShowingAndNotOccluded() { if (mKeyguardDelegate == null) return false; return mKeyguardDelegate.isShowing() && !mKeyguardOccluded; return mKeyguardDelegate.isShowing() && !isKeyguardOccluded(); } @Override Loading @@ -4619,7 +4617,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public boolean isKeyguardOccluded() { if (mKeyguardDelegate == null) return false; return mKeyguardOccluded; return mKeyguardDelegate.isOccluded(); } /** {@inheritDoc} */ Loading Loading @@ -5305,7 +5303,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { proto.write(KEYGUARD_DRAW_COMPLETE, mDefaultDisplayPolicy.isKeyguardDrawComplete()); proto.write(WINDOW_MANAGER_DRAW_COMPLETE, mDefaultDisplayPolicy.isWindowManagerDrawComplete()); proto.write(KEYGUARD_OCCLUDED, mKeyguardOccluded); proto.write(KEYGUARD_OCCLUDED, isKeyguardOccluded()); proto.write(KEYGUARD_OCCLUDED_CHANGED, mKeyguardOccludedChanged); proto.write(KEYGUARD_OCCLUDED_PENDING, mPendingKeyguardOccluded); if (mKeyguardDelegate != null) { Loading Loading @@ -5390,7 +5388,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { final int key = mDisplayHomeButtonHandlers.keyAt(i); pw.println(mDisplayHomeButtonHandlers.get(key)); } pw.print(prefix); pw.print("mKeyguardOccluded="); pw.print(mKeyguardOccluded); pw.print(prefix); pw.print("mKeyguardOccluded="); pw.print(isKeyguardOccluded()); pw.print(" mKeyguardOccludedChanged="); pw.print(mKeyguardOccludedChanged); pw.print(" mPendingKeyguardOccluded="); pw.println(mPendingKeyguardOccluded); pw.print(prefix); pw.print("mAllowLockscreenWhenOnDisplays="); Loading services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java +5 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public class KeyguardServiceDelegate { boolean showing; boolean showingAndNotOccluded; boolean inputRestricted; boolean occluded; volatile boolean occluded; boolean secure; boolean dreaming; boolean systemIsReady; Loading Loading @@ -272,6 +272,10 @@ public class KeyguardServiceDelegate { mKeyguardState.occluded = isOccluded; } public boolean isOccluded() { return mKeyguardState.occluded; } public void dismiss(IKeyguardDismissCallback callback, CharSequence message) { if (mKeyguardService != null) { mKeyguardService.dismiss(callback, message); Loading Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +8 −10 Original line number Diff line number Diff line Loading @@ -508,7 +508,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { private boolean mKeyguardOccludedChanged; private ActivityTaskManagerInternal.SleepTokenAcquirer mScreenOffSleepTokenAcquirer; volatile boolean mKeyguardOccluded; Intent mHomeIntent; Intent mCarDockIntent; Intent mDeskDockIntent; Loading Loading @@ -2399,7 +2398,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { // the keyguard is being hidden. This is okay because starting windows never show // secret information. // TODO(b/113840485): Occluded may not only happen on default display if (displayId == DEFAULT_DISPLAY && mKeyguardOccluded) { if (displayId == DEFAULT_DISPLAY && isKeyguardOccluded()) { windowFlags |= FLAG_SHOW_WHEN_LOCKED; } } Loading Loading @@ -3215,7 +3214,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { return; } if (!mKeyguardOccluded && mKeyguardDelegate.isInputRestricted()) { if (!isKeyguardOccluded() && mKeyguardDelegate.isInputRestricted()) { // when in keyguard restricted mode, must first verify unlock // before launching home mKeyguardDelegate.verifyUnlock(new OnKeyguardExitResult() { Loading Loading @@ -3266,7 +3265,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public void setKeyguardCandidateLw(WindowState win) { mKeyguardCandidate = win; setKeyguardOccludedLw(mKeyguardOccluded, true /* force */); setKeyguardOccludedLw(isKeyguardOccluded(), true /* force */); } /** Loading @@ -3279,13 +3278,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { */ private boolean setKeyguardOccludedLw(boolean isOccluded, boolean force) { if (DEBUG_KEYGUARD) Slog.d(TAG, "setKeyguardOccluded occluded=" + isOccluded); if (mKeyguardOccluded == isOccluded && !force) { if (isKeyguardOccluded() == isOccluded && !force) { return false; } final boolean showing = mKeyguardDelegate.isShowing(); final boolean animate = showing && !isOccluded; mKeyguardOccluded = isOccluded; mKeyguardDelegate.setOccluded(isOccluded, animate); if (!showing) { Loading Loading @@ -4593,7 +4591,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public boolean isKeyguardShowingAndNotOccluded() { if (mKeyguardDelegate == null) return false; return mKeyguardDelegate.isShowing() && !mKeyguardOccluded; return mKeyguardDelegate.isShowing() && !isKeyguardOccluded(); } @Override Loading @@ -4619,7 +4617,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public boolean isKeyguardOccluded() { if (mKeyguardDelegate == null) return false; return mKeyguardOccluded; return mKeyguardDelegate.isOccluded(); } /** {@inheritDoc} */ Loading Loading @@ -5305,7 +5303,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { proto.write(KEYGUARD_DRAW_COMPLETE, mDefaultDisplayPolicy.isKeyguardDrawComplete()); proto.write(WINDOW_MANAGER_DRAW_COMPLETE, mDefaultDisplayPolicy.isWindowManagerDrawComplete()); proto.write(KEYGUARD_OCCLUDED, mKeyguardOccluded); proto.write(KEYGUARD_OCCLUDED, isKeyguardOccluded()); proto.write(KEYGUARD_OCCLUDED_CHANGED, mKeyguardOccludedChanged); proto.write(KEYGUARD_OCCLUDED_PENDING, mPendingKeyguardOccluded); if (mKeyguardDelegate != null) { Loading Loading @@ -5390,7 +5388,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { final int key = mDisplayHomeButtonHandlers.keyAt(i); pw.println(mDisplayHomeButtonHandlers.get(key)); } pw.print(prefix); pw.print("mKeyguardOccluded="); pw.print(mKeyguardOccluded); pw.print(prefix); pw.print("mKeyguardOccluded="); pw.print(isKeyguardOccluded()); pw.print(" mKeyguardOccludedChanged="); pw.print(mKeyguardOccludedChanged); pw.print(" mPendingKeyguardOccluded="); pw.println(mPendingKeyguardOccluded); pw.print(prefix); pw.print("mAllowLockscreenWhenOnDisplays="); Loading
services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java +5 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ public class KeyguardServiceDelegate { boolean showing; boolean showingAndNotOccluded; boolean inputRestricted; boolean occluded; volatile boolean occluded; boolean secure; boolean dreaming; boolean systemIsReady; Loading Loading @@ -272,6 +272,10 @@ public class KeyguardServiceDelegate { mKeyguardState.occluded = isOccluded; } public boolean isOccluded() { return mKeyguardState.occluded; } public void dismiss(IKeyguardDismissCallback callback, CharSequence message) { if (mKeyguardService != null) { mKeyguardService.dismiss(callback, message); Loading