Merge "Check real virtual display id for input devices" into sc-dev

This commit is contained in:
Christine Franks
2021-04-28 23:27:33 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 6 deletions

View File

@@ -2108,9 +2108,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
}
// Check if input device can dispatch events to current display.
// If display type is virtual, will follow the default display.
if (!mWmService.mInputManager.canDispatchToDisplay(device.getId(),
displayInfo.type == Display.TYPE_VIRTUAL ? DEFAULT_DISPLAY : mDisplayId)) {
if (!mWmService.mInputManager.canDispatchToDisplay(device.getId(), mDisplayId)) {
continue;
}

View File

@@ -116,10 +116,8 @@ final class InputManagerCallback implements InputManagerService.WindowManagerCal
/** Notifies that the input device configuration has changed. */
@Override
public void notifyConfigurationChanged() {
// TODO(multi-display): Notify proper displays that are associated with this input device.
synchronized (mService.mGlobalLock) {
mService.getDefaultDisplayContentLocked().sendNewConfiguration();
mService.mRoot.forAllDisplays(DisplayContent::sendNewConfiguration);
}
synchronized (mInputDevicesReadyMonitor) {