Merge "Fix that AccessibilityServiceConnection#serviceInterface may be invalid in the async"

This commit is contained in:
Treehugger Robot
2021-11-29 04:02:12 +00:00
committed by Gerrit Code Review

View File

@@ -407,7 +407,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 (motionEventInjector != null if (motionEventInjector != null