From 1f26c7b23999e9b8e6fe86bca96d0390ef126b8d Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Wed, 17 Sep 2014 10:46:04 -0700 Subject: Fix activity leak in Dialer Make sure to close the contact lookup thread when ListsFragment is destroyed, just like in CallLogFragment. The thread was holding a reference to the outer adapter because it was a non-static inner class, which was causing the adapter and activity to leak. Bug: 17472228 Change-Id: Ic2d6fbded0c8c40cf99d779fe24a535d75bc802a --- src/com/android/dialer/list/ListsFragment.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java index 39efa5191..7cc519fe1 100644 --- a/src/com/android/dialer/list/ListsFragment.java +++ b/src/com/android/dialer/list/ListsFragment.java @@ -225,6 +225,12 @@ public class ListsFragment extends AnalyticsFragment implements CallLogQueryHand super.onPause(); } + @Override + public void onDestroy() { + mCallLogAdapter.stopRequestProcessing(); + super.onDestroy(); + } + @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { -- cgit v1.2.3