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

Commit 8cedc2a3 authored by Ahmad Khalil's avatar Ahmad Khalil Committed by Android (Google) Code Review
Browse files

Merge "Fix long click crash." into udc-dev

parents 522c00c6 8eda958b
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -7734,13 +7734,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_LONG_CLICKED);
        boolean handled = false;
        final ListenerInfo li = mListenerInfo;
        final OnLongClickListener listener =
                mListenerInfo == null ? null : mListenerInfo.mOnLongClickListener;
        boolean shouldPerformHapticFeedback = true;
        if (li != null && li.mOnLongClickListener != null) {
            handled = li.mOnLongClickListener.onLongClick(View.this);
        if (listener != null) {
            handled = listener.onLongClick(View.this);
            if (handled) {
                shouldPerformHapticFeedback =
                        li.mOnLongClickListener.onLongClickUseDefaultHapticFeedback(View.this);
                shouldPerformHapticFeedback = listener.onLongClickUseDefaultHapticFeedback(
                        View.this);
            }
        }
        if (!handled) {