diff options
author | Dianne Hackborn <hackbod@android.com> | 2011-03-02 12:52:56 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-03-02 12:52:56 -0800 |
commit | 039e634f6137550ee072d78b45243b4c6832e489 (patch) | |
tree | 3ba394f1add1e0f2c73fcecabaabd8940f99b135 /policy | |
parent | 960f24c852f2794aaa05e679574cac0b34bb3657 (diff) | |
parent | 4b8c9b740528301d3ca60fe3b4b861fcd85ceb0a (diff) | |
download | frameworks_base-039e634f6137550ee072d78b45243b4c6832e489.zip frameworks_base-039e634f6137550ee072d78b45243b4c6832e489.tar.gz frameworks_base-039e634f6137550ee072d78b45243b4c6832e489.tar.bz2 |
am 4b8c9b74: am 7fff2d19: am 1de4a2ca: am 62619392: Merge "Fix leak when keylock is recreated."
* commit '4b8c9b740528301d3ca60fe3b4b861fcd85ceb0a':
Fix leak when keylock is recreated.
Diffstat (limited to 'policy')
-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 886b85f..2fda3aa 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) |