Fix flaky AccessibilityMagnificationTest
The flaky is caused by the deadlock.
WindowMagnificationManager has its own lock and the
WindowMagnificationConnectionWrapper which uses
AccessibilityTraceManager. When the public method of
WindowMagnificationManager is invoked, it hold the lock of
WindowMagnificationManager and the lock of
AccessibilityManagerService. However, when the service connection
is unbound, it will hold the lock of AccessibilityManagerService
first then the lock of WindowMagnificationManager.
To simplify the archiecuture, we inject the lock of
AccessibilityManagerService to WindowMagnificationManager.
Bug: 213120663
Test: atest com.android.server.accessibility
atest CtsAccessibilityServiceTestCases
Change-Id: I818c57a5140269a5800eb1a52e25aa2ce0919245
Loading
Please register or sign in to comment