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
This commit is contained in:
Jim Miller
2013-10-15 20:09:07 -07:00
parent f847c3b014
commit b2c64690a3

View File

@@ -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) {