Merge "FocusResolver: Clean up focus requests and results when a display is removed" into sc-dev am: ed9701bbc8

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15032127

Change-Id: Ife72f0a5977e0aec746a33e95a7f6fcd8c0751a1
This commit is contained in:
Vishnu Nair
2021-06-21 20:51:05 +00:00
committed by Automerger Merge Worker

View File

@@ -997,10 +997,7 @@ void NativeInputManager::getDispatcherConfiguration(InputDispatcherConfiguration
}
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);
mInputManager->getDispatcher()->displayRemoved(displayId);
}
void NativeInputManager::setFocusedApplication(JNIEnv* env, int32_t displayId,