Merge "check for null listenerInfo for drag&drop" into sc-v2-dev am: d05867d498

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

Change-Id: I4bbcbc75d5d5d0a4e2fabc8f0bba215a7fe376d8
This commit is contained in:
Sally Yuen
2021-10-15 09:28:02 +00:00
committed by Automerger Merge Worker

View File

@@ -27060,7 +27060,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
switch (event.mAction) {
case DragEvent.ACTION_DRAG_STARTED: {
if (result && li.mOnDragListener != null) {
if (result && li != null && li.mOnDragListener != null) {
sendWindowContentChangedAccessibilityEvent(
AccessibilityEvent.CONTENT_CHANGE_TYPE_UNDEFINED);
}
@@ -27074,7 +27074,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
refreshDrawableState();
} break;
case DragEvent.ACTION_DROP: {
if (result && (li.mOnDragListener != null | li.mOnReceiveContentListener != null)) {
if (result && li != null && (li.mOnDragListener != null
|| li.mOnReceiveContentListener != null)) {
sendWindowContentChangedAccessibilityEvent(
AccessibilityEvent.CONTENT_CHANGE_TYPE_DRAG_DROPPED);
}