Loading java/com/android/dialer/main/impl/MainSearchController.java +18 −5 Original line number Diff line number Diff line Loading @@ -128,7 +128,9 @@ public class MainSearchController implements SearchBarListener { // TODO(a bug): zero suggest results aren't actually shown but this enabled the nearby // places promo to be shown. searchFragment = NewSearchFragment.newInstance(/* showZeroSuggest=*/ true); transaction.add(R.id.fragment_container, searchFragment, SEARCH_FRAGMENT_TAG); transaction.replace(R.id.fragment_container, searchFragment, SEARCH_FRAGMENT_TAG); transaction.addToBackStack(null); transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); } else if (!isSearchVisible()) { transaction.show(searchFragment); } Loading Loading @@ -287,11 +289,20 @@ public class MainSearchController implements SearchBarListener { showBottomNav(); toolbar.collapse(animate); toolbarShadow.setVisibility(View.GONE); mainActivity.getFragmentManager().beginTransaction().remove(getSearchFragment()).commit(); mainActivity.getFragmentManager().popBackStack(); // Clear the dialpad so the phone number isn't persisted between search sessions. if (getDialpadFragment() != null) { getDialpadFragment().clearDialpad(); DialpadFragment dialpadFragment = getDialpadFragment(); if (dialpadFragment != null) { // Temporarily disable accessibility when we clear the dialpad, since it should be // invisible and should not announce anything. dialpadFragment .getDigitsWidget() .setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); dialpadFragment.clearDialpad(); dialpadFragment .getDigitsWidget() .setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_AUTO); } notifyListenersOnSearchClose(); Loading Loading @@ -355,7 +366,9 @@ public class MainSearchController implements SearchBarListener { // TODO(a bug): zero suggest results aren't actually shown but this enabled the nearby // places promo to be shown. searchFragment = NewSearchFragment.newInstance(true); transaction.add(R.id.fragment_container, searchFragment, SEARCH_FRAGMENT_TAG); transaction.replace(R.id.fragment_container, searchFragment, SEARCH_FRAGMENT_TAG); transaction.addToBackStack(null); transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); } else if (!isSearchVisible()) { transaction.show(getSearchFragment()); } Loading java/com/android/dialer/main/impl/res/layout/main_activity.xml +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ android:layout_margin="16dp" android:layout_gravity="end|bottom" android:src="@drawable/quantum_ic_dialpad_white_24" android:contentDescription="@string/dialpad_button_content_description" app:backgroundTint="?android:attr/colorAccent"/> </android.support.design.widget.CoordinatorLayout> Loading java/com/android/dialer/main/impl/res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -40,4 +40,8 @@ <!-- Message displayed when there is no application available to handle voice search. [CHAR LIMIT=NONE] --> <string name="voice_search_not_available">Voice search not available</string> <!-- Content description for the button that displays the dialpad [CHAR LIMIT=NONE] --> <string name="dialpad_button_content_description">key pad</string> </resources> Loading
java/com/android/dialer/main/impl/MainSearchController.java +18 −5 Original line number Diff line number Diff line Loading @@ -128,7 +128,9 @@ public class MainSearchController implements SearchBarListener { // TODO(a bug): zero suggest results aren't actually shown but this enabled the nearby // places promo to be shown. searchFragment = NewSearchFragment.newInstance(/* showZeroSuggest=*/ true); transaction.add(R.id.fragment_container, searchFragment, SEARCH_FRAGMENT_TAG); transaction.replace(R.id.fragment_container, searchFragment, SEARCH_FRAGMENT_TAG); transaction.addToBackStack(null); transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); } else if (!isSearchVisible()) { transaction.show(searchFragment); } Loading Loading @@ -287,11 +289,20 @@ public class MainSearchController implements SearchBarListener { showBottomNav(); toolbar.collapse(animate); toolbarShadow.setVisibility(View.GONE); mainActivity.getFragmentManager().beginTransaction().remove(getSearchFragment()).commit(); mainActivity.getFragmentManager().popBackStack(); // Clear the dialpad so the phone number isn't persisted between search sessions. if (getDialpadFragment() != null) { getDialpadFragment().clearDialpad(); DialpadFragment dialpadFragment = getDialpadFragment(); if (dialpadFragment != null) { // Temporarily disable accessibility when we clear the dialpad, since it should be // invisible and should not announce anything. dialpadFragment .getDigitsWidget() .setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); dialpadFragment.clearDialpad(); dialpadFragment .getDigitsWidget() .setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_AUTO); } notifyListenersOnSearchClose(); Loading Loading @@ -355,7 +366,9 @@ public class MainSearchController implements SearchBarListener { // TODO(a bug): zero suggest results aren't actually shown but this enabled the nearby // places promo to be shown. searchFragment = NewSearchFragment.newInstance(true); transaction.add(R.id.fragment_container, searchFragment, SEARCH_FRAGMENT_TAG); transaction.replace(R.id.fragment_container, searchFragment, SEARCH_FRAGMENT_TAG); transaction.addToBackStack(null); transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE); } else if (!isSearchVisible()) { transaction.show(getSearchFragment()); } Loading
java/com/android/dialer/main/impl/res/layout/main_activity.xml +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ android:layout_margin="16dp" android:layout_gravity="end|bottom" android:src="@drawable/quantum_ic_dialpad_white_24" android:contentDescription="@string/dialpad_button_content_description" app:backgroundTint="?android:attr/colorAccent"/> </android.support.design.widget.CoordinatorLayout> Loading
java/com/android/dialer/main/impl/res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -40,4 +40,8 @@ <!-- Message displayed when there is no application available to handle voice search. [CHAR LIMIT=NONE] --> <string name="voice_search_not_available">Voice search not available</string> <!-- Content description for the button that displays the dialpad [CHAR LIMIT=NONE] --> <string name="dialpad_button_content_description">key pad</string> </resources>