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

Commit 75b7024b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Only track focused next served view in onViewFocusChanged" into rvc-dev...

Merge "Only track focused next served view in onViewFocusChanged" into rvc-dev am: 37b8baa3 am: 00dde964 am: 8adeade8

Change-Id: I51fd789b60d8f59192f83c5c7c5d83116f7c4569
parents 6bc5289e 8adeade8
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -170,10 +170,15 @@ public final class ImeFocusController {
        }
        if (DEBUG) Log.d(TAG, "onViewFocusChanged, view=" + view + ", mServedView=" + mServedView);

        // We don't need to track the next served view when the view lost focus here because:
        // 1) The current view focus may be cleared temporary when in touch mode, closing input
        //    at this moment isn't the right way.
        // 2) We only care about the served view change when it focused, since changing input
        //    connection when the focus target changed is reasonable.
        // 3) Setting the next served view as null when no more served view should be handled in
        //    other special events (e.g. view detached from window or the window dismissed).
        if (hasFocus) {
            mNextServedView = view;
        } else if (view == mServedView) {
            mNextServedView = null;
        }
        mViewRootImpl.dispatchCheckFocus();
    }