diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp index e13ef99e17dd0..a94ad4ad7ef22 100644 --- a/services/core/jni/com_android_server_input_InputManagerService.cpp +++ b/services/core/jni/com_android_server_input_InputManagerService.cpp @@ -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> windowHandles; - mInputManager->getDispatcher()->setInputWindows({{displayId, windowHandles}}); - mInputManager->getDispatcher()->setFocusedApplication(displayId, nullptr); + mInputManager->getDispatcher()->displayRemoved(displayId); } void NativeInputManager::setFocusedApplication(JNIEnv* env, int32_t displayId,