Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d169cb36 authored by Anushree Ganjam's avatar Anushree Ganjam
Browse files

When AllAppsSearchBarController's mInput edit text focus is false, we should hidekeyboard.

The searchEditText has focusableInTouchMode = true, See https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:vendor/unbundled_google/packages/NexusLauncher/res/layout/typeahead_search_input.xml;l=47;drc=199723c3c6db539cce4c03b5b612015fe040b202

See https://developer.android.com/reference/android/view/View#attr_android:focusableInTouchMode which says "Boolean that controls whether a view can take focus while in touch mode. If this is true for a view, that view can gain focus when clicked on, and can keep focus if another view is clicked on that doesn't have this attribute set to true."

So when external keyboard is connected and we come out of all apps in touch mode, the edit text still has focus in touch mode and continues to keep focus even though clearFocus() is called. So we hide the keyboard so that input connection is not established with edit text anymore.

Before: https://b.corp.google.com/issues/317742889#comment22

After: https://b.corp.google.com/issues/317742889#comment23

Bug: 317742889
Flag: NA
Test: Manual
Change-Id: Ib297b4cdf376d41e244d2b798a101e4255de5108
parent dd00e618
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment