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

Commit eba93365 authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge "Fixed that app-info longpress was lost on configuration changes." into lmp-preview-dev

parents dffb3e7e 56109b0c
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -155,6 +155,7 @@ public class NotificationStackScrollLayout extends ViewGroup
     * motion.
     * motion.
     */
     */
    private int mMaxScrollAfterExpand;
    private int mMaxScrollAfterExpand;
    private OnLongClickListener mLongClickListener;


    /**
    /**
     * Should in this touch motion only be scrolling allowed? It's true when the scroller was
     * Should in this touch motion only be scrolling allowed? It's true when the scroller was
@@ -228,6 +229,7 @@ public class NotificationStackScrollLayout extends ViewGroup
        float densityScale = getResources().getDisplayMetrics().density;
        float densityScale = getResources().getDisplayMetrics().density;
        float pagingTouchSlop = ViewConfiguration.get(getContext()).getScaledPagingTouchSlop();
        float pagingTouchSlop = ViewConfiguration.get(getContext()).getScaledPagingTouchSlop();
        mSwipeHelper = new SwipeHelper(SwipeHelper.X, this, densityScale, pagingTouchSlop);
        mSwipeHelper = new SwipeHelper(SwipeHelper.X, this, densityScale, pagingTouchSlop);
        mSwipeHelper.setLongPressListener(mLongClickListener);


        mSidePaddings = context.getResources()
        mSidePaddings = context.getResources()
                .getDimensionPixelSize(R.dimen.notification_side_padding);
                .getDimensionPixelSize(R.dimen.notification_side_padding);
@@ -459,6 +461,7 @@ public class NotificationStackScrollLayout extends ViewGroup


    public void setLongPressListener(View.OnLongClickListener listener) {
    public void setLongPressListener(View.OnLongClickListener listener) {
        mSwipeHelper.setLongPressListener(listener);
        mSwipeHelper.setLongPressListener(listener);
        mLongClickListener = listener;
    }
    }


    public void onChildDismissed(View v) {
    public void onChildDismissed(View v) {