summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-12-11 02:09:49 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-12-11 02:09:49 +0000
commit30d624ae6907ce2f4ca9038dce80c166daeee42c (patch)
treeee57288c5f5058cd7e493e92906ae10f5c0a4f51
parent177d44d3c5995248654aba2bb47268f56eb88d53 (diff)
parentd7e2059d642b132fc115d6008b36fb7b422fe81f (diff)
downloadDialer-30d624ae6907ce2f4ca9038dce80c166daeee42c.tar.gz
Merge "Only clear focus in touch mode" into rvc-qpr-dev
-rw-r--r--src/com/android/car/dialer/ui/search/ContactResultsFragment.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/car/dialer/ui/search/ContactResultsFragment.java b/src/com/android/car/dialer/ui/search/ContactResultsFragment.java
index 1cdd5e42..252fbc17 100644
--- a/src/com/android/car/dialer/ui/search/ContactResultsFragment.java
+++ b/src/com/android/car/dialer/ui/search/ContactResultsFragment.java
@@ -111,9 +111,9 @@ public class ContactResultsFragment extends DialerListBaseFragment implements
@Override
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
if (dy != 0) {
- // Clear the focus to dismiss the keyboard.
+ // Clear the focus to dismiss the keyboard in touch mode.
View focusedView = getActivity().getCurrentFocus();
- if (focusedView != null) {
+ if (focusedView != null && focusedView.isInTouchMode()) {
focusedView.clearFocus();
}
}