summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@android.com>2011-02-28 18:03:12 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-02-28 18:03:12 -0800
commit1de4a2ca58df9bd21e054742f52e0af7a2ed5864 (patch)
treec730ec2cdf2fb8a42ff8516b906c3fb3e28d48da /policy
parent9711b9b7aa7448b44b85fe8158ded0364cc3540e (diff)
parent626193926df0b3c7236e5c244f30d797d9192e0d (diff)
downloadframeworks_base-1de4a2ca58df9bd21e054742f52e0af7a2ed5864.zip
frameworks_base-1de4a2ca58df9bd21e054742f52e0af7a2ed5864.tar.gz
frameworks_base-1de4a2ca58df9bd21e054742f52e0af7a2ed5864.tar.bz2
am 62619392: Merge "Fix leak when keylock is recreated."
* commit '626193926df0b3c7236e5c244f30d797d9192e0d': Fix leak when keylock is recreated.
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
index f3d07ab..239fd76 100644
--- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
+++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java
@@ -163,6 +163,12 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
*/
private Configuration mConfiguration;
+ private Runnable mRecreateRunnable = new Runnable() {
+ public void run() {
+ recreateScreens();
+ }
+ };
+
/**
* @return Whether we are stuck on the lock screen because the sim is
* missing.
@@ -244,7 +250,8 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
public void recreateMe(Configuration config) {
mConfiguration = config;
- recreateScreens();
+ removeCallbacks(mRecreateRunnable);
+ post(mRecreateRunnable);
}
public void takeEmergencyCallAction() {
@@ -463,6 +470,12 @@ public class LockPatternKeyguardView extends KeyguardViewBase {
}
@Override
+ protected void onDetachedFromWindow() {
+ removeCallbacks(mRecreateRunnable);
+ super.onDetachedFromWindow();
+ }
+
+ @Override
public void wakeWhenReadyTq(int keyCode) {
if (DEBUG) Log.d(TAG, "onWakeKey");
if (keyCode == KeyEvent.KEYCODE_MENU && isSecure() && (mMode == Mode.LockScreen)