[DO NOT MERGE] Fix NPE from uninitialized object. am: b8544eab9f

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

Change-Id: I64c9cca0f9b662a5187c8c963ee9b2b31cc9ee49
This commit is contained in:
Ameer Armaly
2020-06-29 16:46:35 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 9 deletions

View File

@@ -251,7 +251,7 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub
//TODO: Remove this hack
private boolean mInitialized;
private Point mTempPoint;
private Point mTempPoint = new Point();
private boolean mIsAccessibilityButtonShown;
private AccessibilityUserState getCurrentUserStateLocked() {

View File

@@ -309,14 +309,9 @@ public class TouchExplorer extends BaseEventStreamTransformation
@Override
public void onDoubleTapAndHold(MotionEvent event, MotionEvent rawEvent, int policyFlags) {
// Try to use the standard accessibility API to long click
if (!mAms.performActionOnAccessibilityFocusedItem(
AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK)) {
Slog.e(LOG_TAG, "ACTION_LONG_CLICK failed.");
if (mDispatcher.longPressWithTouchEvents(event, policyFlags)) {
sendHoverExitAndTouchExplorationGestureEndIfNeeded(policyFlags);
mState.startDelegating();
}
if (mDispatcher.longPressWithTouchEvents(event, policyFlags)) {
sendHoverExitAndTouchExplorationGestureEndIfNeeded(policyFlags);
mState.startDelegating();
}
}