Merge "Clear calling identity when requesting syncInputTransaction" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5ffe066041
@@ -7922,18 +7922,23 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void syncInputTransactions() {
|
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
|
// Collect all input transactions from all displays to make sure we could sync all input
|
||||||
// windows at same time.
|
// windows at same time.
|
||||||
final SurfaceControl.Transaction t = mTransactionFactory.get();
|
final SurfaceControl.Transaction t = mTransactionFactory.get();
|
||||||
synchronized (mGlobalLock) {
|
synchronized (mGlobalLock) {
|
||||||
mWindowPlacerLocked.performSurfacePlacementIfScheduled();
|
mWindowPlacerLocked.performSurfacePlacementIfScheduled();
|
||||||
mRoot.forAllDisplays(displayContent ->
|
mRoot.forAllDisplays(displayContent ->
|
||||||
displayContent.getInputMonitor().updateInputWindowsImmediately(t));
|
displayContent.getInputMonitor().updateInputWindowsImmediately(t));
|
||||||
|
}
|
||||||
|
|
||||||
|
t.syncInputWindows().apply();
|
||||||
|
} finally {
|
||||||
|
Binder.restoreCallingIdentity(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
t.syncInputWindows().apply();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user