summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/dialpadview
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2018-01-18 14:03:17 -0800
committerCopybara-Service <copybara-piper@google.com>2018-01-18 15:17:47 -0800
commit3b735de1525313b0517473aff849914b1722a445 (patch)
tree3eb39e7d9d3b990ce76119acd1dd231f4611fd35 /java/com/android/dialer/dialpadview
parent5f8c7c7637a7dcb2c1b7e54565191d7f357d0336 (diff)
Fixed regression with search not reacting properly to on touch events.
There are a few interesting UX niceties that we support in search: 1) When in regular search with an empty query, close the UI if the user touches the blank space. 2) When in regular search with a non-empty query, hide the keyboard if the user touches the the list so they can see all results. 2) When in dialpad search with an empty query, close the UI if the user touches the blank space. 3) When in dialpad search with a non-empty query, hide the dialpad so the user can see the full list of results. This change also adds logic to transfer the dialpad query to the search bar. Bug: 64655802 Test: MainActivityIntegrationTest PiperOrigin-RevId: 182434126 Change-Id: Iabb73b0018fa20e2811010a73a35d3aa3b35343b
Diffstat (limited to 'java/com/android/dialer/dialpadview')
-rw-r--r--java/com/android/dialer/dialpadview/DialpadFragment.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/java/com/android/dialer/dialpadview/DialpadFragment.java b/java/com/android/dialer/dialpadview/DialpadFragment.java
index 2796fca77..9cee7bc2f 100644
--- a/java/com/android/dialer/dialpadview/DialpadFragment.java
+++ b/java/com/android/dialer/dialpadview/DialpadFragment.java
@@ -59,7 +59,6 @@ import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
-import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
@@ -415,7 +414,7 @@ public class DialpadFragment extends Fragment
.setOnTouchListener(
(v, event) -> {
if (isDigitsEmpty()) {
- if (getActivity() != null && event.getAction() == MotionEvent.ACTION_UP) {
+ if (getActivity() != null) {
LogUtil.i("DialpadFragment.onCreateView", "dialpad spacer touched");
return ((HostInterface) getActivity()).onDialpadSpacerTouchWithEmptyQuery();
}