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

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

Merge "Play original haptic when feature flag is off. Rename feature flag" into tm-qpr-dev

parents cbdd6493 dee687c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ public class NoButtonNavbarToOverviewTouchController extends PortraitStatesTouch
            // need to manually set the duration to a reasonable value.
            animator.setDuration(HINT_STATE.getTransitionDuration(mLauncher, true /* isToState */));
        }
        if (FeatureFlags.ENABLE_HAPTICS_ALL_APPS.get() &&
        if (FeatureFlags.ENABLE_PREMIUM_HAPTICS_ALL_APPS.get() &&
                ((mFromState == NORMAL && mToState == ALL_APPS)
                        || (mFromState == ALL_APPS && mToState == NORMAL)) && isFling) {
            mVibratorWrapper.vibrateForDragBump();
+4 −3
Original line number Diff line number Diff line
@@ -355,7 +355,7 @@ public class AllAppsTransitionController
            });
        }

        if(FeatureFlags.ENABLE_HAPTICS_ALL_APPS.get() && config.userControlled
        if(FeatureFlags.ENABLE_PREMIUM_HAPTICS_ALL_APPS.get() && config.userControlled
                && Utilities.ATLEAST_S) {
            if (toState == ALL_APPS) {
                builder.addOnFrameListener(
@@ -385,8 +385,9 @@ public class AllAppsTransitionController
        builder.add(anim);

        setAlphas(toState, config, builder);

        if (ALL_APPS.equals(toState) && mLauncher.isInState(NORMAL) && !(Utilities.ATLEAST_S)) {
        // This controls both haptics for tapping on QSB and going to all apps.
        if (ALL_APPS.equals(toState) && mLauncher.isInState(NORMAL) &&
                !FeatureFlags.ENABLE_PREMIUM_HAPTICS_ALL_APPS.get()) {
            mLauncher.getAppsView().performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY,
                    HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
        }
+3 −2
Original line number Diff line number Diff line
@@ -352,8 +352,9 @@ public final class FeatureFlags {
            "Enable the ability to tap a staged app during split select to launch it in full screen"
    );

    public static final BooleanFlag ENABLE_HAPTICS_ALL_APPS = getDebugFlag(270396358,
            "ENABLE_HAPTICS_ALL_APPS", false, "Enables haptics opening/closing All apps");
    public static final BooleanFlag ENABLE_PREMIUM_HAPTICS_ALL_APPS = getDebugFlag(270396358,
            "ENABLE_PREMIUM_HAPTICS_ALL_APPS", false,
            "Enables haptics opening/closing All apps");

    public static final BooleanFlag ENABLE_FORCED_MONO_ICON = getDebugFlag(270396209,
            "ENABLE_FORCED_MONO_ICON", false,