Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20fee32a authored by Hiroki Sato's avatar Hiroki Sato
Browse files

Fix NullPointerException in AccessibilityServiceConnection#dispatchGesture

Previous change [1] accidentally deleted null check.
This change restores it.

[1] I8a1e4884d1283705d409ed38e35047ec2dcd89f0

Bug: 180554945
Bug: 180056331
Test: CtsAccessibilityServiceTestCases
Change-Id: Ia32ce1da41bcf3fda1476dd8a49ba363d1ad850f
parent b8737dac
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -376,7 +376,8 @@ class AccessibilityServiceConnection extends AbstractAccessibilityServiceConnect
            if (mSecurityPolicy.canPerformGestures(this)) {
            if (mSecurityPolicy.canPerformGestures(this)) {
                MotionEventInjector motionEventInjector =
                MotionEventInjector motionEventInjector =
                        mSystemSupport.getMotionEventInjectorForDisplayLocked(displayId);
                        mSystemSupport.getMotionEventInjectorForDisplayLocked(displayId);
                if (mWindowManagerService.isTouchOrFaketouchDevice()) {
                if (motionEventInjector != null
                        && mWindowManagerService.isTouchOrFaketouchDevice()) {
                    motionEventInjector.injectEvents(
                    motionEventInjector.injectEvents(
                            gestureSteps.getList(), mServiceInterface, sequence, displayId);
                            gestureSteps.getList(), mServiceInterface, sequence, displayId);
                } else {
                } else {