From 56060f523243c2aed38ea818ef55c3260a0b8475 Mon Sep 17 00:00:00 2001 From: zachh Date: Fri, 22 Jun 2018 15:18:59 -0700 Subject: Don't submit fragment transaction to show search when the activity state has been saved. Bug: 109887880 Test: unit PiperOrigin-RevId: 201749785 Change-Id: I84dbef78969346ebfeed600ff6aaf015c62abb86 --- java/com/android/dialer/main/impl/MainSearchController.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'java') diff --git a/java/com/android/dialer/main/impl/MainSearchController.java b/java/com/android/dialer/main/impl/MainSearchController.java index 945e8a948..364f5bc76 100644 --- a/java/com/android/dialer/main/impl/MainSearchController.java +++ b/java/com/android/dialer/main/impl/MainSearchController.java @@ -424,7 +424,10 @@ public class MainSearchController implements SearchBarListener { searchFragment.setQuery( query.isPresent() ? query.get() : "", CallInitiationType.Type.REGULAR_SEARCH); - transaction.commit(); + + if (activity.isSafeToCommitTransactions()) { + transaction.commit(); + } notifyListenersOnSearchOpen(); } -- cgit v1.2.3