diff options
author | zachh <zachh@google.com> | 2018-06-22 15:18:59 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2018-06-26 16:22:45 +0000 |
commit | 56060f523243c2aed38ea818ef55c3260a0b8475 (patch) | |
tree | 6777fab921493796d45ab594b20c60e46135c245 | |
parent | 055cdbf0c558792ae6c455d798a7a9281aa09ac9 (diff) |
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
-rw-r--r-- | java/com/android/dialer/main/impl/MainSearchController.java | 5 |
1 files changed, 4 insertions, 1 deletions
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(); } |