Commit 24ad9295 authored by Yorke Lee's avatar Yorke Lee
Browse files

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
parent 070463fa
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment