Merge "Fix that AccessibilityServiceConnection#serviceInterface may be invalid in the async" am: 700fb9ebeb am: bf6cc67976 am: 481964bf2c

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1870459

Change-Id: I0677c6a1f3b6f605d2c58a721a075f2a1630bbe3
This commit is contained in:
Treehugger Robot
2021-11-29 05:01:56 +00:00
committed by Automerger Merge Worker

View File

@@ -402,7 +402,7 @@ class AccessibilityServiceConnection extends AbstractAccessibilityServiceConnect
@Override @Override
public void dispatchGesture(int sequence, ParceledListSlice gestureSteps, int displayId) { public void dispatchGesture(int sequence, ParceledListSlice gestureSteps, int displayId) {
synchronized (mLock) { synchronized (mLock) {
if (mSecurityPolicy.canPerformGestures(this)) { if (mServiceInterface != null && mSecurityPolicy.canPerformGestures(this)) {
MotionEventInjector motionEventInjector = MotionEventInjector motionEventInjector =
mSystemSupport.getMotionEventInjectorForDisplayLocked(displayId); mSystemSupport.getMotionEventInjectorForDisplayLocked(displayId);
if (wmTracingEnabled()) { if (wmTracingEnabled()) {