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 | aee0b35436a0920a5cccd1491179737aebf33965 (patch) | |
tree | 0ab5748f383421b36b79cc715df0654b96d00a5e /InCallUI | |
parent | 56d306a40c2465e537ad8a2412cff7430409fd9a (diff) |
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 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/StatusBarNotifier.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/StatusBarNotifier.java b/InCallUI/src/com/android/incallui/StatusBarNotifier.java index a9b6cccbe..4d4e3493c 100644 --- a/InCallUI/src/com/android/incallui/StatusBarNotifier.java +++ b/InCallUI/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(); |