From 34bdf87700194c35ab8f43c001391bb2ac8bc993 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Thu, 15 Aug 2013 14:11:50 -0700 Subject: Make sure fragment manager isn't destroyed before calling commit Bug: 10209937 Change-Id: Ib190a94e23de0869b721817e699aeaa861dbfde7 --- src/com/android/dialer/DialtactsActivity.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index bd2dbf3d7..499ff31bd 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -737,6 +737,13 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O * Shows the search fragment */ private void enterSearchUi(boolean smartDialSearch, String query) { + if (getFragmentManager().isDestroyed()) { + // Weird race condition where fragment is doing work after the activity is destroyed + // due to talkback being on (b/10209937). Just return since we can't do any + // constructive here. + return; + } + if (DEBUG) { Log.d(TAG, "Entering search UI - smart dial " + smartDialSearch); } -- cgit v1.2.3