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

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

Merge "Fix potential leakage of InputWindowHandle from display removal"

parents d7ae1d5d 2fc86ae4
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -161,7 +161,13 @@ final class InputMonitor {

    void onDisplayRemoved() {
        mHandler.removeCallbacks(mUpdateInputWindows);
        mHandler.post(() -> {
            // Make sure any pending setInputWindowInfo transactions are completed. That prevents
            // the timing of updating input info of removed display after cleanup.
            mService.mTransactionFactory.get().syncInputWindows().apply();
            // It calls InputDispatcher::setInputWindows directly.
            mService.mInputManager.onDisplayRemoved(mDisplayId);
        });
        mDisplayRemoved = true;
    }