summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-08-15 14:11:50 -0700
committerYorke Lee <yorkelee@google.com>2013-08-15 14:11:50 -0700
commit34bdf87700194c35ab8f43c001391bb2ac8bc993 (patch)
treec81cb516eb9fb1f51bbebffd95d435a1fda319cb
parentba6b3366f21c47454b3ba5189e94bb6bf58fd11d (diff)
Make sure fragment manager isn't destroyed before calling commit
Bug: 10209937 Change-Id: Ib190a94e23de0869b721817e699aeaa861dbfde7
-rw-r--r--src/com/android/dialer/DialtactsActivity.java7
1 files changed, 7 insertions, 0 deletions
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);
}