From 3487db78fd47ccecef4e6b86e5cacfc0a8e6ba83 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Thu, 26 Sep 2013 17:12:06 -0700 Subject: Don't do fragment transactions if fragment is destroyed Bug: 10953115 Change-Id: Idf8107ca9b49b31d2209751a09daabadacfc752b --- src/com/android/dialer/DialtactsActivity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 3e6591658..1a1713316 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -858,6 +858,10 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O * Hides the search fragment */ private void exitSearchUi() { + // See related bug in enterSearchUI(); + if (getFragmentManager().isDestroyed()) { + return; + } // Go all the way back to the favorites fragment, regardless of how many times we // transitioned between search fragments final BackStackEntry entry = getFragmentManager().getBackStackEntryAt(0); -- cgit v1.2.3