From d60767394d6742ccb5ade818510c979f351b4827 Mon Sep 17 00:00:00 2001 From: twyen Date: Mon, 14 May 2018 15:18:35 -0700 Subject: Initialize dialpadFragment and searchFragment with FragmentManager when MainSearchController is created If the controller is recreated the same fragments should be used. TEST=TAP Bug: 77540395 Test: TAP PiperOrigin-RevId: 196575979 Change-Id: I80a239296079ea625b076c0c42cff1a71ffbd4c0 --- java/com/android/dialer/main/impl/MainSearchController.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'java') diff --git a/java/com/android/dialer/main/impl/MainSearchController.java b/java/com/android/dialer/main/impl/MainSearchController.java index 7d476c8f6..fc4fc3dcb 100644 --- a/java/com/android/dialer/main/impl/MainSearchController.java +++ b/java/com/android/dialer/main/impl/MainSearchController.java @@ -115,6 +115,11 @@ public class MainSearchController implements SearchBarListener { this.toolbar = toolbar; this.toolbarShadow = toolbarShadow; this.fragmentContainer = fragmentContainer; + + dialpadFragment = + (DialpadFragment) activity.getFragmentManager().findFragmentByTag(DIALPAD_FRAGMENT_TAG); + searchFragment = + (NewSearchFragment) activity.getFragmentManager().findFragmentByTag(SEARCH_FRAGMENT_TAG); } /** Should be called if we're showing the dialpad because of a new ACTION_DIAL intent. */ -- cgit v1.2.3