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

This commit is contained in:
Brandon Dayauon
2023-03-09 16:44:07 +00:00
committed by Android (Google) Code Review
3 changed files with 8 additions and 6 deletions

View File

@@ -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();

View File

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

View File

@@ -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,