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

Commit efe224d9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix leakage of input window handle on removed display"

parents afa501b1 3f2de747
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1452,6 +1452,11 @@ public class InputManagerService extends IInputManager.Stub
        nativeSetFocusedDisplay(mPtr, displayId);
    }

    /** Clean up input window handles of the given display. */
    public void onDisplayRemoved(int displayId) {
        nativeSetInputWindows(mPtr, null /* windowHandles */, displayId);
    }

    @Override
    public void requestPointerCapture(IBinder windowToken, boolean enabled) {
        if (mFocusedWindow == null || mFocusedWindow.asBinder() != windowToken) {
+1 −0
Original line number Diff line number Diff line
@@ -168,6 +168,7 @@ final class InputMonitor {

    void onDisplayRemoved() {
        mHandler.removeCallbacks(mUpdateInputWindows);
        mService.mInputManager.onDisplayRemoved(mDisplayId);
        mDisplayRemoved = true;
    }