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

Commit c5941bf8 authored by Brandon Dayauon's avatar Brandon Dayauon Committed by Android (Google) Code Review
Browse files

Merge "Allow haptics to play when fastscrolling private space apps." into main

parents b72dc074 57c77eb4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
 */
package com.android.launcher3.allapps;

import static android.view.HapticFeedbackConstants.CLOCK_TICK;

import androidx.recyclerview.widget.LinearSmoothScroller;
import androidx.recyclerview.widget.RecyclerView.ViewHolder;

@@ -71,6 +73,7 @@ public class AllAppsFastScrollHelper {

        @Override
        protected int getVerticalSnapPreference() {
            mRv.performHapticFeedback(CLOCK_TICK);
            return SNAP_TO_ANY;
        }

+4 −1
Original line number Diff line number Diff line
@@ -355,8 +355,11 @@ public class RecyclerViewFastScroller extends View {
        if (!sectionName.equals(mPopupSectionName)) {
            mPopupSectionName = sectionName;
            mPopupView.setText(sectionName);
            // AllApps haptics are taken care of by AllAppsFastScrollHelper.
            if (mFastScrollerLocation != ALL_APPS_SCROLLER) {
                performHapticFeedback(CLOCK_TICK);
            }
        }
        animatePopupVisibility(!TextUtils.isEmpty(sectionName));
        mLastTouchY = boundedY;
        setThumbOffsetY((int) mLastTouchY);