Only clear focus in touch mode

When not in touch mode, Android will focus the first focusable view when
focus is cleared. This causes focus to move to the top when scrolling
via rotary. Prevent this by making the call to clearFocus() conditional
on being in touch mode. There's no need to clear focus when using rotary
because the IME is dismissed as soon as focus moves to the list of
contacts.

Test: search and scroll through matching contacts via rotary
Bug: 175334372
Change-Id: I35c3b6a2a2037a885ce82099c41a83a9d48e28fd
1 file changed
tree: 4c1df2039867165fce096f46e945ed8b171419b2
  1. res/
  2. src/
  3. tests/
  4. Android.bp
  5. AndroidManifest.xml
  6. OWNERS
  7. PREUPLOAD.cfg