diff options
author | Jorim Jaggi <jjaggi@google.com> | 2014-05-26 03:01:13 +0200 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2014-05-26 18:37:29 +0200 |
commit | a0be6d53a823f8115d3863773398d640ec2a8c44 (patch) | |
tree | 6204651ff1a6df716439cbbbc5a51e80b250282e /packages | |
parent | 37e65624210d470b47025940ebb65a1ef8ccecdf (diff) | |
download | frameworks_base-a0be6d53a823f8115d3863773398d640ec2a8c44.zip frameworks_base-a0be6d53a823f8115d3863773398d640ec2a8c44.tar.gz frameworks_base-a0be6d53a823f8115d3863773398d640ec2a8c44.tar.bz2 |
Do not destroy the security method when pressing back.
Fixes jank when the user wants to unlock it next time.
Bug: 15088101
Change-Id: If7bc3d92d0f17abb5077b4c06248f368acb2879f
Diffstat (limited to 'packages')
3 files changed, 11 insertions, 12 deletions
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimpleHostView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSimpleHostView.java index 5d5168c..3f6ced6 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSimpleHostView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSimpleHostView.java @@ -39,7 +39,7 @@ public class KeyguardSimpleHostView extends KeyguardViewBase { @Override public void cleanUp() { - // TODO Auto-generated method stub + getSecurityContainer().onPause(); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java index 2fa2a00..2bb80bf 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java @@ -54,10 +54,6 @@ public class KeyguardBouncer { mWindowManager = windowManager; } - public void prepare() { - ensureView(); - } - public void show() { ensureView(); @@ -75,11 +71,15 @@ public class KeyguardBouncer { show(); } - public void hide() { + public void hide(boolean destroyView) { if (mKeyguardView != null) { mKeyguardView.cleanUp(); } - removeView(); + if (destroyView) { + removeView(); + } else if (mRoot != null) { + mRoot.setVisibility(View.INVISIBLE); + } } /** 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 3849d8d..3f76d26 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -98,8 +98,7 @@ public class StatusBarKeyguardViewManager { mBouncer.show(); } else { mPhoneStatusBar.showKeyguard(); - mBouncer.hide(); - mBouncer.prepare(); + mBouncer.hide(false /* destroyView */); } } @@ -124,7 +123,7 @@ public class StatusBarKeyguardViewManager { if (mShowing) { if (mOccluded) { mPhoneStatusBar.hideKeyguard(); - mBouncer.hide(); + mBouncer.hide(false /* destroyView */); } else { showBouncerOrKeyguard(); } @@ -184,7 +183,7 @@ public class StatusBarKeyguardViewManager { mShowing = false; mPhoneStatusBar.hideKeyguard(); mStatusBarWindowManager.setKeyguardShowing(false); - mBouncer.hide(); + mBouncer.hide(true /* destroyView */); mViewMediatorCallback.keyguardGone(); updateStates(); } @@ -216,7 +215,7 @@ public class StatusBarKeyguardViewManager { */ public boolean onBackPressed() { if (mBouncer.isShowing()) { - mBouncer.hide(); + mBouncer.hide(false /* destroyView */); mPhoneStatusBar.showKeyguard(); updateStates(); return true; |