Skip to content
Commit c7424a28 authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

Only track focused next served view in onViewFocusChanged

When introduced ImeFocusController, we originally would like to
resolve CL[1] enabling IMM#focusOut issue to archieve auto-hide IME when
no more view with focus.

However, some problems that we end up to disable because:
 1) Bug 152230171 shows the current view focus may be cleared temporary
    when in touch mode, closing input at this moment isn't the right way.

 2) Bug 148974380 hits a case when tapping SearchView which is inside
    of ListView, several focus in/out events comes up and may break input
    connection unexptectly because wheather the next served view is no longer
    coming or not is unpredictable from this callback.

    Even we fixed the issue with CL[2] to tweak the next served view as
    null only when the current served view lost focus, we still can't
    guarantee that input connection won't break when current served view
    lost focus by moved to other focusable view (e.g. popup window)

 3) Setting the next served view as null when no more served view should
    be handled more conservative in other special events
    (e.g. view detached from window or the window dismissed).

[1]: I2228ae0c48ad3d9e0b55875f0dcb5ef8c55b0c5f
[2]: I9e90428387fcf43fbf86a8407de7535913202872

Bug: 152698568
Test: atest FocusHandlingTest
Change-Id: I6e38c4425233cea4b0a90285a2dc476b76c20979
parent 815543b3
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