From 5781afe916100c4ed709e8edacac4a71db090108 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Mon, 12 Aug 2013 11:12:59 -0700 Subject: Persist favorites clicked listener across activity destruction Bug: 10289904 Change-Id: I7282cd6c2a4c938131b88ab10d2fc73897c0b65c --- src/com/android/dialer/DialtactsActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 316465e74..1e29e713b 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -262,7 +262,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O // is null. Otherwise the fragment manager takes care of recreating these fragments. if (savedInstanceState == null) { final PhoneFavoriteFragment phoneFavoriteFragment = new PhoneFavoriteFragment(); - phoneFavoriteFragment.setListener(mPhoneFavoriteListener); final FragmentTransaction ft = getFragmentManager().beginTransaction(); ft.add(R.id.dialtacts_frame, phoneFavoriteFragment, TAG_FAVORITES_FRAGMENT); @@ -313,6 +312,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O mRegularSearchFragment = (SearchFragment) fragment; } else if (fragment instanceof PhoneFavoriteFragment) { mPhoneFavoriteFragment = (PhoneFavoriteFragment) fragment; + mPhoneFavoriteFragment.setListener(mPhoneFavoriteListener); } } -- cgit v1.2.3