From 50715261119b30e6e23aaf58fcf3e28f16430f3d Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Fri, 8 Sep 2017 09:20:08 -0700 Subject: This is a rollforward of cl/167332236 Improved behavior of back button in search ui. Pressing the back button in the search UI now functions as follows: - If the keyboard is opened, the keyboard is minimized - If the dialpad is opened, the dialpad is closed - If the keyboard and dialpad is closed, the search ui is closed Our existing behavior was dependent on whether a query had been built yet. basically, if the user pressed back with no query selected, the search ui was closed. From the bugbash: 7. No scroll bar in the search results if the results do not fill the entire view. The keyboard overlaps the results and there is no way to get to the enter list without dismissing the keyboard. 10. Dismiss the keyboard on tapping the down arrow on the keyboard. Arrow points down but works like back button Bug: 62685859,63691995,63939331,64137632,64902476 Test: manual PiperOrigin-RevId: 168004913 Change-Id: Ia566fce6d90454a3eae6ecccfa81ce7e909e878f --- java/com/android/dialer/dialpadview/DialpadFragment.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'java/com/android/dialer/dialpadview') diff --git a/java/com/android/dialer/dialpadview/DialpadFragment.java b/java/com/android/dialer/dialpadview/DialpadFragment.java index 86a83796e..837c3af90 100644 --- a/java/com/android/dialer/dialpadview/DialpadFragment.java +++ b/java/com/android/dialer/dialpadview/DialpadFragment.java @@ -1001,12 +1001,12 @@ public class DialpadFragment extends Fragment DialerUtils.startActivityWithErrorToast( getActivity(), new CallIntentBuilder(CallUtil.getVoicemailUri(), CallInitiationType.Type.DIALPAD).build()); - hideAndClearDialpad(false); + hideAndClearDialpad(); } - private void hideAndClearDialpad(boolean animate) { + private void hideAndClearDialpad() { LogUtil.enterBlock("DialpadFragment.hideAndClearDialpad"); - FragmentUtils.getParentUnsafe(this, DialpadListener.class).hideDialpadFragment(animate, true); + FragmentUtils.getParentUnsafe(this, DialpadListener.class).onCallPlacedFromDialpad(); } /** @@ -1053,7 +1053,7 @@ public class DialpadFragment extends Fragment final Intent intent = new CallIntentBuilder(number, CallInitiationType.Type.DIALPAD).build(); DialerUtils.startActivityWithErrorToast(getActivity(), intent); - hideAndClearDialpad(false); + hideAndClearDialpad(); } } } @@ -1297,7 +1297,7 @@ public class DialpadFragment extends Fragment return true; } else if (resId == R.id.menu_call_with_note) { CallSubjectDialog.start(getActivity(), mDigits.getText().toString()); - hideAndClearDialpad(false); + hideAndClearDialpad(); return true; } else { return false; @@ -1710,7 +1710,7 @@ public class DialpadFragment extends Fragment void onDialpadShown(); - void hideDialpadFragment(boolean animate, boolean value); + void onCallPlacedFromDialpad(); } /** Callback for async lookup of the last number dialed. */ -- cgit v1.2.3