Loading packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java +4 −2 Original line number Diff line number Diff line Loading @@ -399,8 +399,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe showPrimarySecurityScreen(false); break; } } else { showPrimarySecurityScreen(false); } if (finish) { mSecurityCallback.finish(); Loading Loading @@ -556,6 +554,10 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe return mSecurityModel.getSecurityMode(); } public SecurityMode getCurrentSecurityMode() { return mCurrentSecuritySelection; } public void verifyUnlock() { mIsVerifyUnlockOnly = true; showSecurityScreen(getSecurityMode()); Loading packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java +5 −2 Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa /** * Called when the view needs to be shown. */ public void show() { public void showPrimarySecurityScreen() { if (DEBUG) Log.d(TAG, "show()"); mSecurityContainer.showPrimarySecurityScreen(false); } Loading Loading @@ -224,7 +224,6 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa */ public void onResume() { if (DEBUG) Log.d(TAG, "screen on, instance " + Integer.toHexString(hashCode())); mSecurityContainer.showPrimarySecurityScreen(false); mSecurityContainer.onResume(KeyguardSecurityView.SCREEN_ON); requestFocus(); } Loading Loading @@ -473,6 +472,10 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa return mSecurityContainer.getSecurityMode(); } public SecurityMode getCurrentSecurityMode() { return mSecurityContainer.getCurrentSecurityMode(); } protected abstract void onUserSwitching(boolean switching); protected abstract void onCreateOptions(Bundle options); Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +1 −0 Original line number Diff line number Diff line Loading @@ -957,6 +957,7 @@ public class KeyguardViewMediator extends SystemUI { // if the keyguard is already showing, don't bother if (mStatusBarKeyguardViewManager.isShowing()) { if (DEBUG) Log.d(TAG, "doKeyguard: not showing because it is already showing"); resetStateLocked(); return; } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +27 −11 Original line number Diff line number Diff line Loading @@ -57,13 +57,14 @@ public class KeyguardBouncer { mWindowManager = windowManager; } public void show() { public void show(boolean resetSecuritySelection) { ensureView(); if (resetSecuritySelection) { // showPrimarySecurityScreen() updates the current security method. This is needed in // case we are already showing and the current security method changed. mKeyguardView.showPrimarySecurityScreen(); } if (mRoot.getVisibility() == View.VISIBLE || mShowingSoon) { // show() updates the current security method. This is needed in case we are already // showing and the current security method changed. mKeyguardView.show(); return; } Loading @@ -74,7 +75,7 @@ public class KeyguardBouncer { // Split up the work over multiple frames. mChoreographer.postCallbackDelayed(Choreographer.CALLBACK_ANIMATION, mShowRunnable, null, 48); null, 16); } } Loading @@ -96,7 +97,7 @@ public class KeyguardBouncer { public void showWithDismissAction(OnDismissAction r) { ensureView(); mKeyguardView.setOnDismissAction(r); show(); show(false /* resetSecuritySelection */); } public void hide(boolean destroyView) { Loading Loading @@ -152,7 +153,11 @@ public class KeyguardBouncer { } public void prepare() { boolean wasInitialized = mRoot != null; ensureView(); if (wasInitialized) { mKeyguardView.showPrimarySecurityScreen(); } } private void ensureView() { Loading Loading @@ -184,14 +189,25 @@ public class KeyguardBouncer { } /** * @return True if and only if the current security method should be shown before showing * the notifications on Keyguard, like SIM PIN/PUK. * @return True if and only if the security method should be shown before showing the * notifications on Keyguard, like SIM PIN/PUK. */ public boolean needsFullscreenBouncer() { if (mKeyguardView != null) { SecurityMode mode = mKeyguardView.getSecurityMode(); return mode == SecurityMode.SimPin || mode == SecurityMode.SimPuk; return mode == SecurityMode.SimPin || mode == SecurityMode.SimPuk; } return false; } /** * Like {@link #needsFullscreenBouncer}, but uses the currently visible security method, which * makes this method much faster. */ public boolean isFullscreenBouncer() { if (mKeyguardView != null) { SecurityMode mode = mKeyguardView.getCurrentSecurityMode(); return mode == SecurityMode.SimPin || mode == SecurityMode.SimPuk; } return false; } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ public class StatusBarKeyguardViewManager { // The keyguard might be showing (already). So we need to hide it. mPhoneStatusBar.hideKeyguard(); mBouncer.show(); mBouncer.show(true /* resetSecuritySelection */); } else { mPhoneStatusBar.showKeyguard(); mBouncer.hide(false /* destroyView */); Loading @@ -120,7 +120,7 @@ public class StatusBarKeyguardViewManager { private void showBouncer() { if (mShowing) { mBouncer.show(); mBouncer.show(false /* resetSecuritySelection */); } updateStates(); } Loading @@ -130,7 +130,7 @@ public class StatusBarKeyguardViewManager { if (!afterKeyguardGone) { mBouncer.showWithDismissAction(r); } else { mBouncer.show(); mBouncer.show(false /* resetSecuritySelection */); mAfterKeyguardGoneAction = r; } } Loading Loading @@ -354,7 +354,7 @@ public class StatusBarKeyguardViewManager { boolean showing = mShowing; boolean occluded = mOccluded; boolean bouncerShowing = mBouncer.isShowing(); boolean bouncerDismissible = !mBouncer.needsFullscreenBouncer(); boolean bouncerDismissible = !mBouncer.isFullscreenBouncer(); if ((bouncerDismissible || !showing) != (mLastBouncerDismissible || !mLastShowing) || mFirstUpdate) { Loading Loading
packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java +4 −2 Original line number Diff line number Diff line Loading @@ -399,8 +399,6 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe showPrimarySecurityScreen(false); break; } } else { showPrimarySecurityScreen(false); } if (finish) { mSecurityCallback.finish(); Loading Loading @@ -556,6 +554,10 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe return mSecurityModel.getSecurityMode(); } public SecurityMode getCurrentSecurityMode() { return mCurrentSecuritySelection; } public void verifyUnlock() { mIsVerifyUnlockOnly = true; showSecurityScreen(getSecurityMode()); Loading
packages/Keyguard/src/com/android/keyguard/KeyguardViewBase.java +5 −2 Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa /** * Called when the view needs to be shown. */ public void show() { public void showPrimarySecurityScreen() { if (DEBUG) Log.d(TAG, "show()"); mSecurityContainer.showPrimarySecurityScreen(false); } Loading Loading @@ -224,7 +224,6 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa */ public void onResume() { if (DEBUG) Log.d(TAG, "screen on, instance " + Integer.toHexString(hashCode())); mSecurityContainer.showPrimarySecurityScreen(false); mSecurityContainer.onResume(KeyguardSecurityView.SCREEN_ON); requestFocus(); } Loading Loading @@ -473,6 +472,10 @@ public abstract class KeyguardViewBase extends FrameLayout implements SecurityCa return mSecurityContainer.getSecurityMode(); } public SecurityMode getCurrentSecurityMode() { return mSecurityContainer.getCurrentSecurityMode(); } protected abstract void onUserSwitching(boolean switching); protected abstract void onCreateOptions(Bundle options); Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +1 −0 Original line number Diff line number Diff line Loading @@ -957,6 +957,7 @@ public class KeyguardViewMediator extends SystemUI { // if the keyguard is already showing, don't bother if (mStatusBarKeyguardViewManager.isShowing()) { if (DEBUG) Log.d(TAG, "doKeyguard: not showing because it is already showing"); resetStateLocked(); return; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +27 −11 Original line number Diff line number Diff line Loading @@ -57,13 +57,14 @@ public class KeyguardBouncer { mWindowManager = windowManager; } public void show() { public void show(boolean resetSecuritySelection) { ensureView(); if (resetSecuritySelection) { // showPrimarySecurityScreen() updates the current security method. This is needed in // case we are already showing and the current security method changed. mKeyguardView.showPrimarySecurityScreen(); } if (mRoot.getVisibility() == View.VISIBLE || mShowingSoon) { // show() updates the current security method. This is needed in case we are already // showing and the current security method changed. mKeyguardView.show(); return; } Loading @@ -74,7 +75,7 @@ public class KeyguardBouncer { // Split up the work over multiple frames. mChoreographer.postCallbackDelayed(Choreographer.CALLBACK_ANIMATION, mShowRunnable, null, 48); null, 16); } } Loading @@ -96,7 +97,7 @@ public class KeyguardBouncer { public void showWithDismissAction(OnDismissAction r) { ensureView(); mKeyguardView.setOnDismissAction(r); show(); show(false /* resetSecuritySelection */); } public void hide(boolean destroyView) { Loading Loading @@ -152,7 +153,11 @@ public class KeyguardBouncer { } public void prepare() { boolean wasInitialized = mRoot != null; ensureView(); if (wasInitialized) { mKeyguardView.showPrimarySecurityScreen(); } } private void ensureView() { Loading Loading @@ -184,14 +189,25 @@ public class KeyguardBouncer { } /** * @return True if and only if the current security method should be shown before showing * the notifications on Keyguard, like SIM PIN/PUK. * @return True if and only if the security method should be shown before showing the * notifications on Keyguard, like SIM PIN/PUK. */ public boolean needsFullscreenBouncer() { if (mKeyguardView != null) { SecurityMode mode = mKeyguardView.getSecurityMode(); return mode == SecurityMode.SimPin || mode == SecurityMode.SimPuk; return mode == SecurityMode.SimPin || mode == SecurityMode.SimPuk; } return false; } /** * Like {@link #needsFullscreenBouncer}, but uses the currently visible security method, which * makes this method much faster. */ public boolean isFullscreenBouncer() { if (mKeyguardView != null) { SecurityMode mode = mKeyguardView.getCurrentSecurityMode(); return mode == SecurityMode.SimPin || mode == SecurityMode.SimPuk; } return false; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -110,7 +110,7 @@ public class StatusBarKeyguardViewManager { // The keyguard might be showing (already). So we need to hide it. mPhoneStatusBar.hideKeyguard(); mBouncer.show(); mBouncer.show(true /* resetSecuritySelection */); } else { mPhoneStatusBar.showKeyguard(); mBouncer.hide(false /* destroyView */); Loading @@ -120,7 +120,7 @@ public class StatusBarKeyguardViewManager { private void showBouncer() { if (mShowing) { mBouncer.show(); mBouncer.show(false /* resetSecuritySelection */); } updateStates(); } Loading @@ -130,7 +130,7 @@ public class StatusBarKeyguardViewManager { if (!afterKeyguardGone) { mBouncer.showWithDismissAction(r); } else { mBouncer.show(); mBouncer.show(false /* resetSecuritySelection */); mAfterKeyguardGoneAction = r; } } Loading Loading @@ -354,7 +354,7 @@ public class StatusBarKeyguardViewManager { boolean showing = mShowing; boolean occluded = mOccluded; boolean bouncerShowing = mBouncer.isShowing(); boolean bouncerDismissible = !mBouncer.needsFullscreenBouncer(); boolean bouncerDismissible = !mBouncer.isFullscreenBouncer(); if ((bouncerDismissible || !showing) != (mLastBouncerDismissible || !mLastShowing) || mFirstUpdate) { Loading