Play original haptic when feature flag is off. Rename feature flag
- Remove the Utilities.atLeast check since it's no longer relevant as there is no new haptics being played in the original haptic.. When FeatureFlag is off, the haptic for all apps and qsb is played in one place. So when FeatureFlag is on, we need to isolate where the haptic call gets played so we disable calling it from two places and play the haptics at the respective areas. flag: ENABLE_PREMIUM_HAPTICS_ALL_APPS=false bug: 270634265 test: Manual Change-Id: I7b92c427e880b196130270ed9709cf1ea0e19e0a
This commit is contained in:
1 parent
e83196187a
commit
dee687c33a
3 files changed
+8
-6
No files matched your search
+1
-1
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user