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

Commit b85faac6 authored by Chris Ye's avatar Chris Ye
Browse files

Remove the per display window handles when the display is removed.

When a dispaly is removed, need to call input dispatcher to remove the
per display window handles.

Bug: 188008394
Test: Enable multi display and launch apps, monitor dumpsys input.
Change-Id: I82aa19a1c8731b5896f17fb326775baf7681d258
parent a91e5123
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -999,6 +999,7 @@ void NativeInputManager::displayRemoved(JNIEnv* env, int32_t displayId) {
    // Set an empty list to remove all handles from the specific display.
    std::vector<sp<InputWindowHandle>> windowHandles;
    mInputManager->getDispatcher()->setInputWindows({{displayId, windowHandles}});
    mInputManager->getDispatcher()->setFocusedApplication(displayId, nullptr);
}

void NativeInputManager::setFocusedApplication(JNIEnv* env, int32_t displayId,