diff options
author | Dianne Hackborn <hackbod@android.com> | 2011-02-28 18:06:46 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-02-28 18:06:46 -0800 |
commit | 7fff2d19a24f9f9b669676864dc5652ab179d2fc (patch) | |
tree | 700c06eb1d796bb878faa92fb6f8a63cb451b0f5 | |
parent | 516393faba128ce43bee98b6319e060744fe7be6 (diff) | |
parent | 1de4a2ca58df9bd21e054742f52e0af7a2ed5864 (diff) | |
download | frameworks_base-7fff2d19a24f9f9b669676864dc5652ab179d2fc.zip frameworks_base-7fff2d19a24f9f9b669676864dc5652ab179d2fc.tar.gz frameworks_base-7fff2d19a24f9f9b669676864dc5652ab179d2fc.tar.bz2 |
am 1de4a2ca: am 62619392: Merge "Fix leak when keylock is recreated."
* commit '1de4a2ca58df9bd21e054742f52e0af7a2ed5864':
Fix leak when keylock is recreated.
-rw-r--r-- | policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java | 15 |
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) |