Merge "Synchronize on the right lock in AccessibilityController"

This commit is contained in:
TreeHugger Robot
2020-08-07 19:03:30 +00:00
committed by Android (Google) Code Review

View File

@@ -177,7 +177,7 @@ final class AccessibilityController {
public void performComputeChangedWindowsNotLocked(int displayId, boolean forceSend) {
WindowsForAccessibilityObserver observer = null;
synchronized (mService) {
synchronized (mService.mGlobalLock) {
final WindowsForAccessibilityObserver windowsForA11yObserver =
mWindowsForAccessibilityObserver.get(displayId);
if (windowsForA11yObserver != null) {
@@ -266,7 +266,7 @@ final class AccessibilityController {
// Not relevant for the display magnifier.
WindowsForAccessibilityObserver observer = null;
synchronized (mService) {
synchronized (mService.mGlobalLock) {
final WindowsForAccessibilityObserver windowsForA11yObserver =
mWindowsForAccessibilityObserver.get(displayId);
if (windowsForA11yObserver != null) {