diff options
| author | 2020-04-21 16:20:05 +0800 | |
|---|---|---|
| committer | 2020-04-22 14:22:12 +0800 | |
| commit | 6f5a5c481ad58ff1d24d5c38674964c0eb9f9909 (patch) | |
| tree | aa9f93a5da6ce2c55998664fc01024f4c5aeea98 | |
| parent | e9d2790cfae8d9931217665e963d1ed4952c47ff (diff) | |
Remove invocation of closeTransaction while using a11y service
The operation applies to a local transaction, so it should not
touch the global transaction.
Bug: 143734779
Test atest AccessibilityWindowManagerTest#
setAccessibilityWindowIdToSurfaceMetadata
Test: Enable accessibility service (e.g. TalkBack) and check logcat
shouldn't have "Call to SurfaceControl.closeTransaction without
matching openTransaction".
Change-Id: I5a2879656471c85f91931e385e4873b4499ed977
| -rw-r--r-- | services/core/java/com/android/server/wm/WindowManagerService.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index a5014145aa60..872045887331 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -7658,15 +7658,8 @@ public class WindowManagerService extends IWindowManager.Stub Slog.w(TAG, "Cannot find window which accessibility connection is added to"); return; } - try (SurfaceControl.Transaction t = new SurfaceControl.Transaction()) { - t.setMetadata( - state.mSurfaceControl, - SurfaceControl.METADATA_ACCESSIBILITY_ID, - accessibilityWindowId); - t.apply(); - } finally { - SurfaceControl.closeTransaction(); - } + mTransaction.setMetadata(state.mSurfaceControl, + SurfaceControl.METADATA_ACCESSIBILITY_ID, accessibilityWindowId).apply(); } } |