From b2c64690a3d1fe4d2100b34e9f3d823985349eed Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Tue, 15 Oct 2013 20:09:07 -0700 Subject: Fix memory leak and slowness in keyguard This fixes an issue where the mUpdateSeekBars runnable was being repeatedly posted to the handler while keeping a reference to the transport control (and hence keyguard). Even after the view was detached from keyguard it would continue to post events that would ultimately keep the instance of keyguard from being GC'd and cause keyguard to slow down. Fixes 11169793 Change-Id: If2bb238adf6d78101589926b60a61d9f187c6d1c --- .../Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java index b7720ef76f16..a48f23efac99 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardTransportControlView.java @@ -322,6 +322,7 @@ public class KeyguardTransportControlView extends FrameLayout { mAudioManager.unregisterRemoteController(mRemoteController); KeyguardUpdateMonitor.getInstance(mContext).removeCallback(mUpdateMonitor); mUserSeeking = false; + removeCallbacks(mUpdateSeekBars); } void setBadgeIcon(Drawable bmp) { -- cgit v1.2.3-59-g8ed1b