summaryrefslogtreecommitdiff
path: root/libs/hwui/ProgramCache.cpp
diff options
context:
space:
mode:
author Evan Rosky <erosky@google.com> 2018-03-06 19:11:12 -0800
committer Evan Rosky <erosky@google.com> 2018-03-07 22:08:18 +0000
commit758a6523bc0ae0f6cfe588dcd30067f0d4327eb2 (patch)
treeb96b602811a1df526899bbcef929fdbe1c797fb0 /libs/hwui/ProgramCache.cpp
parent0efaf2088d8e3ba8ec560aa5eb597ef456b5213e (diff)
Don't consume all BACK keys in SearchView
If SearchView is the first focusable, it will always get focus (in non-touch-mode) when it tries to clearFocus on BACK pressed. This lead to a situation where SearchView always consumed the BACK key leaving users unable to leave some activities. It looks like this was done so that pressing back both closed the auto-correct popup AND the ime (whereas without reimplementing onPreIme, it would require 1 back-press to close the auto-correct popup and then a subsequenty press to close the IME). It also, however, tried to clearFocus as well. This change only consumes the Back press if the auto-correct popup is open (to have the same effect of BACK closing both the popup and the IME at the same time). It ignores the back press otherwise. If there is no pop-up, this results in the BACK being handled by the ime and thus hiding it. Otherwise, back is not consumed. The only effective difference is that the SearchView remains focused now. Bug: 73181998 Test: SearchView CTS tests still pass. Back can now exit test-app once IME is hidden. Change-Id: I3fe687b5344300b86131f44a1c9798cd736955bd
Diffstat (limited to 'libs/hwui/ProgramCache.cpp')
0 files changed, 0 insertions, 0 deletions