Allow haptics to play when fastscrolling private space apps.

LinearSmoothScrolling only happens when there is a new section to scroll to. Instead of playing haptics
when sectionInfo changes, only play haptics during smooth scrolling.

bug: 359658099
Test: Manually tested, video wouldn't help since I am testing haptics
Flag: NONE bugfix
Change-Id: I96c911b4d2d201d0d953a9619a97979759a02427
This commit is contained in:
Brandon Dayauon committed 2024-09-16 10:55:02 -07:00
1 parent f2e2532e62
commit 57c77eb4c6
2 files changed
+7 -1

No files matched your search

@@ -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;
}