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

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

Change-Id: I83ebfd13525cbd567d16eef6b2201a9956bbf292
This commit is contained in:
Treehugger Robot
2021-11-29 04:28:05 +00:00
committed by Automerger Merge Worker

View File

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