diff options
author | Yorke Lee <yorkelee@google.com> | 2014-09-17 10:46:04 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-09-17 10:46:04 -0700 |
commit | 1f26c7b23999e9b8e6fe86bca96d0390ef126b8d (patch) | |
tree | f837713ebf1767bbeab6a994a4af18f79fdfcfce | |
parent | 6b0803575d047d405caf98d92511a2974c3b2338 (diff) |
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
-rw-r--r-- | src/com/android/dialer/list/ListsFragment.java | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ -226,6 +226,12 @@ public class ListsFragment extends AnalyticsFragment implements CallLogQueryHand } @Override + public void onDestroy() { + mCallLogAdapter.stopRequestProcessing(); + super.onDestroy(); + } + + @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View parentView = inflater.inflate(R.layout.lists_fragment, container, false); |