diff options
author | Yorke Lee <yorkelee@google.com> | 2015-10-19 11:44:46 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-10-19 13:17:28 -0700 |
commit | 24ad92950a39af862c676f18e07b88ecde2f4e3b (patch) | |
tree | 5b0a201f04b8e2184ae476695d0159b524b43040 /src | |
parent | 070463fa5c8cb252464ad6aae936131f8c939636 (diff) | |
download | packages_apps_InCallUI-24ad92950a39af862c676f18e07b88ecde2f4e3b.tar.gz packages_apps_InCallUI-24ad92950a39af862c676f18e07b88ecde2f4e3b.tar.bz2 packages_apps_InCallUI-24ad92950a39af862c676f18e07b88ecde2f4e3b.zip |
Fix bitmap leaks in InCallUI
Fix the bitmap leaks in InCallUI that were a result of
StatusBarNotifier instances being retained across calls.
Bitmap -> StatusBarNotifier -> CallUpdateListenerMap ->
CallList
Bug: 25003292
Change-Id: I4f8695d7dfbc397b0fee0305a6f94e8d2e8e593f
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/incallui/StatusBarNotifier.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/incallui/StatusBarNotifier.java b/src/com/android/incallui/StatusBarNotifier.java index a9b6cccb..4d4e3493 100644 --- a/src/com/android/incallui/StatusBarNotifier.java +++ b/src/com/android/incallui/StatusBarNotifier.java @@ -118,6 +118,10 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener, * @see #updateInCallNotification(InCallState,CallList) */ private void cancelNotification() { + if (!TextUtils.isEmpty(mCallId)) { + CallList.getInstance().removeCallUpdateListener(mCallId, this); + mCallId = null; + } if (mCurrentNotification != NOTIFICATION_NONE) { Log.d(this, "cancelInCall()..."); mNotificationManager.cancel(mCurrentNotification); @@ -161,7 +165,7 @@ public class StatusBarNotifier implements InCallPresenter.InCallStateListener, final boolean isIncoming = (call.getState() == Call.State.INCOMING || call.getState() == Call.State.CALL_WAITING); - if (mCallId != null) { + if (!TextUtils.isEmpty(mCallId)) { CallList.getInstance().removeCallUpdateListener(mCallId, this); } mCallId = call.getId(); |