Merge "Clear calling identity when requesting syncInputTransaction" into rvc-dev am: 5ffe066041 am: 23e80213e0

Change-Id: I2ff81a64e92772f68a927205fd4eb2d3c538ecd1
This commit is contained in:
Chavi Weingarten
2020-05-21 00:10:41 +00:00
committed by Automerger Merge Worker

View File

@@ -7922,18 +7922,23 @@ public class WindowManagerService extends IWindowManager.Stub
@Override
public void syncInputTransactions() {
waitForAnimationsToComplete();
long token = Binder.clearCallingIdentity();
try {
waitForAnimationsToComplete();
// Collect all input transactions from all displays to make sure we could sync all input
// windows at same time.
final SurfaceControl.Transaction t = mTransactionFactory.get();
synchronized (mGlobalLock) {
mWindowPlacerLocked.performSurfacePlacementIfScheduled();
mRoot.forAllDisplays(displayContent ->
displayContent.getInputMonitor().updateInputWindowsImmediately(t));
// Collect all input transactions from all displays to make sure we could sync all input
// windows at same time.
final SurfaceControl.Transaction t = mTransactionFactory.get();
synchronized (mGlobalLock) {
mWindowPlacerLocked.performSurfacePlacementIfScheduled();
mRoot.forAllDisplays(displayContent ->
displayContent.getInputMonitor().updateInputWindowsImmediately(t));
}
t.syncInputWindows().apply();
} finally {
Binder.restoreCallingIdentity(token);
}
t.syncInputWindows().apply();
}
/**