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

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

Change-Id: Id1e48b5fd14aa2371bfeb43f938b611824308a39
This commit is contained in:
Treehugger Robot
2021-11-29 05:20:21 +00:00
committed by Automerger Merge Worker

View File

@@ -406,7 +406,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 (wmTracingEnabled()) {