Merge "Cleaning up some enabled features" into main
diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
index da6c05e..a64936d 100644
--- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
+++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
@@ -51,7 +51,6 @@
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.Utilities.mapBoundToRange;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_BACK_SWIPE_HOME_ANIMATION;
import static com.android.launcher3.config.FeatureFlags.SEPARATE_RECENTS_ACTIVITY;
import static com.android.launcher3.testing.shared.TestProtocol.WALLPAPER_OPEN_ANIMATION_FINISHED_MESSAGE;
import static com.android.launcher3.util.DisplayController.isTransientTaskbar;
@@ -1599,7 +1598,7 @@
boolean playWorkspaceReveal = !fromPredictiveBack;
boolean skipAllAppsScale = false;
- if (ENABLE_BACK_SWIPE_HOME_ANIMATION.get() && !playFallBackAnimation) {
+ if (!playFallBackAnimation) {
PointF velocity;
if (enableScalingRevealHomeAnimation()) {
velocity = new PointF();
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarThresholdUtils.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarThresholdUtils.java
index 5b6fbef..17516f3 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarThresholdUtils.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarThresholdUtils.java
@@ -25,7 +25,6 @@
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.R;
-import com.android.launcher3.config.FeatureFlags;
/**
* Utility class that contains the different taskbar thresholds logic.
@@ -39,10 +38,6 @@
private static int getThreshold(Resources r, DeviceProfile dp, int thresholdDimen,
int multiplierDimen) {
- if (!FeatureFlags.ENABLE_DYNAMIC_TASKBAR_THRESHOLDS.get()) {
- return r.getDimensionPixelSize(thresholdDimen);
- }
-
float landscapeScreenHeight = dp.isLandscape ? dp.heightPx : dp.widthPx;
float screenPart = (landscapeScreenHeight * SCREEN_UNITS);
float defaultDp = dpiFromPx(screenPart, DisplayMetrics.DENSITY_DEVICE_STABLE);
diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
index d6ea653..1f5cd3a 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
@@ -200,6 +200,8 @@
import com.android.systemui.unfold.updates.RotationChangeProvider;
import com.android.wm.shell.shared.desktopmode.DesktopModeStatus;
+import kotlin.Unit;
+
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -212,8 +214,6 @@
import java.util.function.Predicate;
import java.util.stream.Stream;
-import kotlin.Unit;
-
public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
SystemShortcut.BubbleActivityStarter {
private static final boolean TRACE_LAYOUTS =
@@ -692,9 +692,7 @@
}
addMultiWindowModeChangedListener(mDepthController);
initUnfoldTransitionProgressProvider();
- if (FeatureFlags.CONTINUOUS_VIEW_TREE_CAPTURE.get()) {
- mViewCapture = ViewCaptureFactory.getInstance(this).startCapture(getWindow());
- }
+ mViewCapture = ViewCaptureFactory.getInstance(this).startCapture(getWindow());
getWindow().addPrivateFlags(PRIVATE_FLAG_OPTIMIZE_MEASURE);
QuickstepOnboardingPrefs.setup(this);
View.setTraceLayoutSteps(TRACE_LAYOUTS);
diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt b/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt
index c1f9963..f92c557 100644
--- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt
+++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.kt
@@ -29,7 +29,6 @@
import com.android.internal.jank.Cuj
import com.android.launcher3.Flags.enableOverviewCommandHelperTimeout
import com.android.launcher3.PagedView
-import com.android.launcher3.config.FeatureFlags
import com.android.launcher3.logger.LauncherAtom
import com.android.launcher3.logging.StatsLogManager
import com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_OVERVIEW_SHOW_OVERVIEW_FROM_3_BUTTON
@@ -248,7 +247,7 @@
recents: RecentsView<*, *>,
taskView: TaskView?,
command: CommandInfo,
- onCallbackResult: () -> Unit
+ onCallbackResult: () -> Unit,
): Boolean {
var callbackList: RunnableList? = null
if (taskView != null) {
@@ -274,15 +273,14 @@
private fun executeWhenRecentsIsNotVisible(
command: CommandInfo,
- onCallbackResult: () -> Unit
+ onCallbackResult: () -> Unit,
): Boolean {
val recentsViewContainer = activityInterface.getCreatedContainer() as? RecentsViewContainer
val recentsView: RecentsView<*, *>? = recentsViewContainer?.getOverviewPanel()
val deviceProfile = recentsViewContainer?.getDeviceProfile()
val uiController = activityInterface.getTaskbarController()
val allowQuickSwitch =
- FeatureFlags.ENABLE_KEYBOARD_QUICK_SWITCH.get() &&
- uiController != null &&
+ uiController != null &&
deviceProfile != null &&
(deviceProfile.isTablet || deviceProfile.isTwoPanels)
@@ -349,13 +347,13 @@
val gestureState =
touchInteractionService.createGestureState(
GestureState.DEFAULT_STATE,
- GestureState.TrackpadGestureType.NONE
+ GestureState.TrackpadGestureType.NONE,
)
gestureState.isHandlingAtomicEvent = true
val interactionHandler =
touchInteractionService.swipeUpHandlerFactory.newHandler(
gestureState,
- command.createTime
+ command.createTime,
)
interactionHandler.setGestureEndCallback {
onTransitionComplete(command, interactionHandler, onCallbackResult)
@@ -366,7 +364,7 @@
object : RecentsAnimationCallbacks.RecentsAnimationListener {
override fun onRecentsAnimationStart(
controller: RecentsAnimationController,
- targets: RecentsAnimationTargets
+ targets: RecentsAnimationTargets,
) {
Log.d(TAG, "recents animation started: $command")
updateRecentsViewFocus(command)
@@ -418,7 +416,7 @@
private fun onTransitionComplete(
command: CommandInfo,
handler: AbsSwipeUpHandler<*, *, *>,
- onCommandResult: () -> Unit
+ onCommandResult: () -> Unit,
) {
Log.d(TAG, "switching via recents animation - onTransitionComplete: $command")
command.removeListener(handler)
@@ -434,7 +432,7 @@
Log.d(
TAG,
"next task not scheduled. First pending command type " +
- "is ${commandQueue.firstOrNull()} - command type is: $command"
+ "is ${commandQueue.firstOrNull()} - command type is: $command",
)
return
}
@@ -527,7 +525,7 @@
val type: CommandType,
var status: CommandStatus = CommandStatus.IDLE,
val createTime: Long = SystemClock.elapsedRealtime(),
- private var animationCallbacks: RecentsAnimationCallbacks? = null
+ private var animationCallbacks: RecentsAnimationCallbacks? = null,
) {
fun setAnimationCallbacks(recentsAnimationCallbacks: RecentsAnimationCallbacks) {
this.animationCallbacks = recentsAnimationCallbacks
@@ -545,7 +543,7 @@
IDLE,
PROCESSING,
COMPLETED,
- CANCELED
+ CANCELED,
}
}
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index ce66b04..44e55c3 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -30,7 +30,6 @@
import static com.android.launcher3.LauncherPrefs.backedUpItem;
import static com.android.launcher3.MotionEventsUtils.isTrackpadMotionEvent;
import static com.android.launcher3.MotionEventsUtils.isTrackpadMultiFingerSwipe;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_TRACKPAD_GESTURE;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
import static com.android.launcher3.util.OnboardingPrefs.HOME_BOUNCE_SEEN;
@@ -228,7 +227,6 @@
@BinderThread
@Override
public void onTaskbarToggled() {
- if (!FeatureFlags.ENABLE_KEYBOARD_TASKBAR_TOGGLE.get()) return;
MAIN_EXECUTOR.execute(() -> executeForTouchInteractionService(tis -> {
TaskbarActivityContext activityContext =
tis.mTaskbarManager.getCurrentActivityContext();
@@ -664,13 +662,11 @@
mAllAppsActionManager = new AllAppsActionManager(
this, UI_HELPER_EXECUTOR, this::createAllAppsPendingIntent);
mInputManager = getSystemService(InputManager.class);
- if (ENABLE_TRACKPAD_GESTURE.get()) {
- mInputManager.registerInputDeviceListener(mInputDeviceListener,
- UI_HELPER_EXECUTOR.getHandler());
- int [] inputDevices = mInputManager.getInputDeviceIds();
- for (int inputDeviceId : inputDevices) {
- mInputDeviceListener.onInputDeviceAdded(inputDeviceId);
- }
+ mInputManager.registerInputDeviceListener(mInputDeviceListener,
+ UI_HELPER_EXECUTOR.getHandler());
+ int [] inputDevices = mInputManager.getInputDeviceIds();
+ for (int inputDeviceId : inputDevices) {
+ mInputDeviceListener.onInputDeviceAdded(inputDeviceId);
}
mDesktopVisibilityController = new DesktopVisibilityController(this);
mTaskbarManager = new TaskbarManager(
@@ -703,7 +699,7 @@
if (mDeviceState.isButtonNavMode()
&& !mDeviceState.supportsAssistantGestureInButtonNav()
- && (!ENABLE_TRACKPAD_GESTURE.get() || mTrackpadsConnected.isEmpty())) {
+ && (mTrackpadsConnected.isEmpty())) {
return;
}
@@ -1271,7 +1267,7 @@
getBaseContext(), mDeviceState, mInputMonitorCompat);
}
- if (ENABLE_TRACKPAD_GESTURE.get() && mGestureState.isTrackpadGesture()
+ if (mGestureState.isTrackpadGesture()
&& canStartSystemGesture && !previousGestureState.isRecentsAnimationRunning()) {
reasonString = newCompoundString(reasonPrefix)
.append(SUBSTRING_PREFIX)
diff --git a/quickstep/src/com/android/quickstep/interaction/AnimatedTaskView.java b/quickstep/src/com/android/quickstep/interaction/AnimatedTaskView.java
index 742b0fc..7a86db3 100644
--- a/quickstep/src/com/android/quickstep/interaction/AnimatedTaskView.java
+++ b/quickstep/src/com/android/quickstep/interaction/AnimatedTaskView.java
@@ -15,8 +15,6 @@
*/
package com.android.quickstep.interaction;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL;
-
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
@@ -175,11 +173,8 @@
void setFakeTaskViewFillColor(@ColorInt int colorResId) {
mFullTaskView.setBackgroundColor(colorResId);
-
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()){
- mTopTaskView.getBackground().setTint(colorResId);
- mBottomTaskView.getBackground().setTint(colorResId);
- }
+ mTopTaskView.getBackground().setTint(colorResId);
+ mBottomTaskView.getBackground().setTint(colorResId);
}
@Override
diff --git a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java
index 6757cd8..be7f8e5 100644
--- a/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/BackGestureTutorialController.java
@@ -15,7 +15,6 @@
*/
package com.android.quickstep.interaction;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL;
import static com.android.quickstep.interaction.TutorialController.TutorialType.BACK_NAVIGATION;
import static com.android.quickstep.interaction.TutorialController.TutorialType.BACK_NAVIGATION_COMPLETE;
@@ -40,35 +39,29 @@
BackGestureTutorialController(BackGestureTutorialFragment fragment, TutorialType tutorialType) {
super(fragment, tutorialType);
// Set the Lottie animation colors specifically for the Back gesture
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- LottieAnimationColorUtils.updateToArgbColors(
- mAnimatedGestureDemonstration,
- Map.of(".onSurfaceBack", fragment.mRootView.mColorOnSurfaceBack,
- ".surfaceBack", fragment.mRootView.mColorSurfaceBack,
- ".secondaryBack", fragment.mRootView.mColorSecondaryBack));
+ LottieAnimationColorUtils.updateToArgbColors(
+ mAnimatedGestureDemonstration,
+ Map.of(".onSurfaceBack", fragment.mRootView.mColorOnSurfaceBack,
+ ".surfaceBack", fragment.mRootView.mColorSurfaceBack,
+ ".secondaryBack", fragment.mRootView.mColorSecondaryBack));
- LottieAnimationColorUtils.updateToArgbColors(
- mCheckmarkAnimation,
- Map.of(".checkmark",
- Utilities.isDarkTheme(mContext)
- ? fragment.mRootView.mColorOnSurfaceBack
- : fragment.mRootView.mColorSecondaryBack,
- ".checkmarkBackground", fragment.mRootView.mColorSurfaceBack));
- }
+ LottieAnimationColorUtils.updateToArgbColors(
+ mCheckmarkAnimation,
+ Map.of(".checkmark",
+ Utilities.isDarkTheme(mContext)
+ ? fragment.mRootView.mColorOnSurfaceBack
+ : fragment.mRootView.mColorSecondaryBack,
+ ".checkmarkBackground", fragment.mRootView.mColorSurfaceBack));
}
@Override
public int getIntroductionTitle() {
- return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.string.back_gesture_tutorial_title
- : R.string.back_gesture_intro_title;
+ return R.string.back_gesture_tutorial_title;
}
@Override
public int getIntroductionSubtitle() {
- return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.string.back_gesture_tutorial_subtitle
- : R.string.back_gesture_intro_subtitle;
+ return R.string.back_gesture_tutorial_subtitle;
}
@Override
@@ -85,9 +78,7 @@
public int getSuccessFeedbackSubtitle() {
return mTutorialFragment.isAtFinalStep()
? R.string.back_gesture_feedback_complete_without_follow_up
- : ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.string.back_gesture_feedback_complete_with_follow_up
- : R.string.back_gesture_feedback_complete_with_overview_follow_up;
+ : R.string.back_gesture_feedback_complete_with_follow_up;
}
@Override
@@ -128,20 +119,12 @@
@LayoutRes
int getMockAppTaskCurrentPageLayoutResId() {
- return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.layout.back_gesture_tutorial_background
- : mTutorialFragment.isLargeScreen()
- ? R.layout.gesture_tutorial_tablet_mock_conversation
- : R.layout.gesture_tutorial_mock_conversation;
+ return R.layout.back_gesture_tutorial_background;
}
@LayoutRes
int getMockAppTaskPreviousPageLayoutResId() {
- return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.layout.back_gesture_tutorial_background
- : mTutorialFragment.isLargeScreen()
- ? R.layout.gesture_tutorial_tablet_mock_conversation_list
- : R.layout.gesture_tutorial_mock_conversation_list;
+ return R.layout.back_gesture_tutorial_background;
}
@Override
@@ -214,17 +197,13 @@
}
private void handleBackAttempt(BackGestureResult result) {
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- resetViewsForBackGesture();
- }
+ resetViewsForBackGesture();
switch (result) {
case BACK_COMPLETED_FROM_LEFT:
case BACK_COMPLETED_FROM_RIGHT:
mTutorialFragment.releaseFeedbackAnimation();
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- mExitingAppView.setVisibility(View.GONE);
- }
+ mExitingAppView.setVisibility(View.GONE);
updateFakeAppTaskViewLayout(getMockAppTaskPreviousPageLayoutResId());
showSuccessFeedback();
break;
diff --git a/quickstep/src/com/android/quickstep/interaction/EdgeBackGestureHandler.java b/quickstep/src/com/android/quickstep/interaction/EdgeBackGestureHandler.java
index 1b12be8..700fbf8 100644
--- a/quickstep/src/com/android/quickstep/interaction/EdgeBackGestureHandler.java
+++ b/quickstep/src/com/android/quickstep/interaction/EdgeBackGestureHandler.java
@@ -15,8 +15,6 @@
*/
package com.android.quickstep.interaction;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL;
-
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Point;
@@ -211,10 +209,8 @@
}
}
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- mGestureCallback.onBackGestureProgress(ev.getX() - mDownPoint.x,
- ev.getY() - mDownPoint.y, mEdgeBackPanel.getIsLeftPanel());
- }
+ mGestureCallback.onBackGestureProgress(ev.getX() - mDownPoint.x,
+ ev.getY() - mDownPoint.y, mEdgeBackPanel.getIsLeftPanel());
// forward touch
mEdgeBackPanel.onMotionEvent(ev);
diff --git a/quickstep/src/com/android/quickstep/interaction/GestureSandboxActivity.java b/quickstep/src/com/android/quickstep/interaction/GestureSandboxActivity.java
index acc9959..bc5cc15 100644
--- a/quickstep/src/com/android/quickstep/interaction/GestureSandboxActivity.java
+++ b/quickstep/src/com/android/quickstep/interaction/GestureSandboxActivity.java
@@ -37,7 +37,6 @@
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.LauncherPrefs;
import com.android.launcher3.R;
-import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.logging.StatsLogManager;
import com.android.quickstep.TouchInteractionService.TISBinder;
import com.android.quickstep.interaction.TutorialController.TutorialType;
@@ -79,9 +78,7 @@
Bundle args = savedInstanceState == null ? getIntent().getExtras() : savedInstanceState;
boolean gestureComplete = args != null && args.getBoolean(KEY_GESTURE_COMPLETE, false);
- if (FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- && args != null
- && args.getBoolean(KEY_USE_TUTORIAL_MENU, false)) {
+ if (args != null && args.getBoolean(KEY_USE_TUTORIAL_MENU, false)) {
mTutorialSteps = null;
TutorialType tutorialTypeOverride = (TutorialType) args.get(KEY_TUTORIAL_TYPE);
mCurrentFragment = tutorialTypeOverride == null
@@ -101,9 +98,7 @@
.add(R.id.gesture_tutorial_fragment_container, mCurrentFragment)
.commit();
- if (FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- correctUserOrientation();
- }
+ correctUserOrientation();
mTISBindHelper = new TISBindHelper(this, this::onTISConnected);
initWindowInsets();
@@ -115,9 +110,7 @@
super.onConfigurationChanged(newConfig);
// Ensure the prompt to rotate the screen is updated
- if (FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- correctUserOrientation();
- }
+ correctUserOrientation();
}
private void initWindowInsets() {
diff --git a/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java
index 1129e02..bf4eaf2 100644
--- a/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/HomeGestureTutorialController.java
@@ -15,8 +15,6 @@
*/
package com.android.quickstep.interaction;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL;
-
import android.graphics.PointF;
import com.android.launcher3.R;
@@ -34,35 +32,29 @@
super(fragment, tutorialType);
// Set the Lottie animation colors specifically for the Home gesture
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- LottieAnimationColorUtils.updateToArgbColors(
- mAnimatedGestureDemonstration,
- Map.of(".onSurfaceHome", fragment.mRootView.mColorOnSurfaceHome,
- ".surfaceHome", fragment.mRootView.mColorSurfaceHome,
- ".secondaryHome", fragment.mRootView.mColorSecondaryHome));
+ LottieAnimationColorUtils.updateToArgbColors(
+ mAnimatedGestureDemonstration,
+ Map.of(".onSurfaceHome", fragment.mRootView.mColorOnSurfaceHome,
+ ".surfaceHome", fragment.mRootView.mColorSurfaceHome,
+ ".secondaryHome", fragment.mRootView.mColorSecondaryHome));
- LottieAnimationColorUtils.updateToArgbColors(
- mCheckmarkAnimation,
- Map.of(".checkmark",
- Utilities.isDarkTheme(mContext)
- ? fragment.mRootView.mColorOnSurfaceHome
- : fragment.mRootView.mColorSecondaryHome,
- ".checkmarkBackground", fragment.mRootView.mColorSurfaceHome));
- }
+ LottieAnimationColorUtils.updateToArgbColors(
+ mCheckmarkAnimation,
+ Map.of(".checkmark",
+ Utilities.isDarkTheme(mContext)
+ ? fragment.mRootView.mColorOnSurfaceHome
+ : fragment.mRootView.mColorSecondaryHome,
+ ".checkmarkBackground", fragment.mRootView.mColorSurfaceHome));
}
@Override
public int getIntroductionTitle() {
- return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.string.home_gesture_tutorial_title
- : R.string.home_gesture_intro_title;
+ return R.string.home_gesture_tutorial_title;
}
@Override
public int getIntroductionSubtitle() {
- return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.string.home_gesture_tutorial_subtitle
- : R.string.home_gesture_intro_subtitle;
+ return R.string.home_gesture_tutorial_subtitle;
}
@Override
@@ -72,9 +64,7 @@
@Override
public int getSuccessFeedbackTitle() {
- return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.string.home_gesture_tutorial_success
- : R.string.gesture_tutorial_nice;
+ return R.string.home_gesture_tutorial_success;
}
@Override
diff --git a/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java
index a04dd44..e45f8d8 100644
--- a/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/OverviewGestureTutorialController.java
@@ -16,7 +16,6 @@
package com.android.quickstep.interaction;
import static com.android.app.animation.Interpolators.ACCELERATE;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -49,34 +48,28 @@
super(fragment, tutorialType);
// Set the Lottie animation colors specifically for the Overview gesture
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- LottieAnimationColorUtils.updateToArgbColors(
- mAnimatedGestureDemonstration,
- Map.of(".onSurfaceOverview", fragment.mRootView.mColorOnSurfaceOverview,
- ".surfaceOverview", fragment.mRootView.mColorSurfaceOverview,
- ".secondaryOverview", fragment.mRootView.mColorSecondaryOverview));
+ LottieAnimationColorUtils.updateToArgbColors(
+ mAnimatedGestureDemonstration,
+ Map.of(".onSurfaceOverview", fragment.mRootView.mColorOnSurfaceOverview,
+ ".surfaceOverview", fragment.mRootView.mColorSurfaceOverview,
+ ".secondaryOverview", fragment.mRootView.mColorSecondaryOverview));
- LottieAnimationColorUtils.updateToArgbColors(
- mCheckmarkAnimation,
- Map.of(".checkmark",
- Utilities.isDarkTheme(mContext)
- ? fragment.mRootView.mColorOnSurfaceOverview
- : fragment.mRootView.mColorSecondaryOverview,
- ".checkmarkBackground", fragment.mRootView.mColorSurfaceOverview));
- }
+ LottieAnimationColorUtils.updateToArgbColors(
+ mCheckmarkAnimation,
+ Map.of(".checkmark",
+ Utilities.isDarkTheme(mContext)
+ ? fragment.mRootView.mColorOnSurfaceOverview
+ : fragment.mRootView.mColorSecondaryOverview,
+ ".checkmarkBackground", fragment.mRootView.mColorSurfaceOverview));
}
@Override
public int getIntroductionTitle() {
- return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.string.overview_gesture_tutorial_title
- : R.string.overview_gesture_intro_title;
+ return R.string.overview_gesture_tutorial_title;
}
@Override
public int getIntroductionSubtitle() {
- return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.string.overview_gesture_tutorial_subtitle
- : R.string.overview_gesture_intro_subtitle;
+ return R.string.overview_gesture_tutorial_subtitle;
}
@Override
@@ -86,9 +79,7 @@
@Override
public int getSuccessFeedbackTitle() {
- return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.string.overview_gesture_tutorial_success
- : R.string.gesture_tutorial_nice;
+ return R.string.overview_gesture_tutorial_success;
}
@Override
@@ -168,10 +159,7 @@
@Override
protected int getMockPreviousAppTaskThumbnailColor() {
- return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? mTutorialFragment.mRootView.mColorSurfaceContainer
- : mContext.getResources().getColor(
- R.color.gesture_tutorial_fake_previous_task_view_color);
+ return mTutorialFragment.mRootView.mColorSurfaceContainer;
}
@Override
@@ -224,11 +212,8 @@
case OVERVIEW_GESTURE_COMPLETED:
setGestureCompleted();
mTutorialFragment.releaseFeedbackAnimation();
- animateTaskViewToOverview(ENABLE_NEW_GESTURE_NAV_TUTORIAL.get());
+ animateTaskViewToOverview(true);
onMotionPaused(true /*arbitrary value*/);
- if (!ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- showSuccessFeedback();
- }
break;
case HOME_OR_OVERVIEW_NOT_STARTED_WRONG_SWIPE_DIRECTION:
case HOME_OR_OVERVIEW_CANCELLED:
diff --git a/quickstep/src/com/android/quickstep/interaction/RootSandboxLayout.java b/quickstep/src/com/android/quickstep/interaction/RootSandboxLayout.java
index affedb9..d733267 100644
--- a/quickstep/src/com/android/quickstep/interaction/RootSandboxLayout.java
+++ b/quickstep/src/com/android/quickstep/interaction/RootSandboxLayout.java
@@ -15,16 +15,12 @@
*/
package com.android.quickstep.interaction;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL;
-
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.graphics.Insets;
-import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.MotionEvent;
-import android.view.View;
import android.view.WindowInsets;
import android.widget.RelativeLayout;
@@ -39,10 +35,6 @@
/** Root layout that TutorialFragment uses to intercept motion events. */
public class RootSandboxLayout extends RelativeLayout {
- private final Rect mTempStepIndicatorBounds = new Rect();
- private final Rect mTempInclusionBounds = new Rect();
- private final Rect mTempExclusionBounds = new Rect();
-
@ColorInt final int mColorSurfaceContainer;
@ColorInt final int mColorOnSurfaceHome;
@ColorInt final int mColorSurfaceHome;
@@ -54,11 +46,6 @@
@ColorInt final int mColorSurfaceOverview;
@ColorInt final int mColorSecondaryOverview;
- private View mFeedbackView;
- private View mTutorialStepView;
- private View mSkipButton;
- private View mDoneButton;
-
public RootSandboxLayout(Context context) {
this(context, null);
}
@@ -123,56 +110,4 @@
return getHeight() + insets.top + insets.bottom;
}
-
- @Override
- protected void onFinishInflate() {
- super.onFinishInflate();
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- return;
- }
- mFeedbackView = findViewById(R.id.gesture_tutorial_fragment_feedback_view);
- mTutorialStepView =
- mFeedbackView.findViewById(R.id.gesture_tutorial_fragment_feedback_tutorial_step);
- mSkipButton = mFeedbackView.findViewById(R.id.gesture_tutorial_fragment_close_button);
- mDoneButton = mFeedbackView.findViewById(R.id.gesture_tutorial_fragment_action_button);
-
- mFeedbackView.addOnLayoutChangeListener(
- (v, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> {
- if (mSkipButton.getVisibility() != VISIBLE
- && mDoneButton.getVisibility() != VISIBLE) {
- return;
- }
- // Either the skip or the done button is ever shown at once, never both.
- boolean showingSkipButton = mSkipButton.getVisibility() == VISIBLE;
- boolean isRTL = Utilities.isRtl(getContext().getResources());
- updateTutorialStepViewTranslation(
- showingSkipButton ? mSkipButton : mDoneButton,
- // Translate the step indicator away from whichever button is being
- // shown. The skip button in on the left in LTR or on the right in RTL.
- // The done button is on the right in LTR or left in RTL.
- (showingSkipButton && !isRTL) || (!showingSkipButton && isRTL));
- });
- }
-
- private void updateTutorialStepViewTranslation(
- @NonNull View anchorView, boolean translateToRight) {
- mTempStepIndicatorBounds.set(
- mTutorialStepView.getLeft(),
- mTutorialStepView.getTop(),
- mTutorialStepView.getRight(),
- mTutorialStepView.getBottom());
- mTempInclusionBounds.set(0, 0, mFeedbackView.getWidth(), mFeedbackView.getHeight());
- mTempExclusionBounds.set(
- anchorView.getLeft(),
- anchorView.getTop(),
- anchorView.getRight(),
- anchorView.getBottom());
-
- Utilities.translateOverlappingView(
- mTutorialStepView,
- mTempStepIndicatorBounds,
- mTempInclusionBounds,
- mTempExclusionBounds,
- translateToRight ? Utilities.TRANSLATE_RIGHT : Utilities.TRANSLATE_LEFT);
- }
}
diff --git a/quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java b/quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java
index ad13efb..e462706 100644
--- a/quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/SwipeUpGestureTutorialController.java
@@ -48,7 +48,6 @@
import com.android.launcher3.anim.AnimatorListeners;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.PendingAnimation;
-import com.android.launcher3.config.FeatureFlags;
import com.android.quickstep.GestureState;
import com.android.quickstep.OverviewComponentObserver;
import com.android.quickstep.RecentsAnimationDeviceState;
@@ -127,9 +126,7 @@
void resetTaskViews() {
mFakeHotseatView.setVisibility(View.INVISIBLE);
mFakeIconView.setVisibility(View.INVISIBLE);
- if (FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- mFakeIconView.getBackground().setTint(getFakeTaskViewColor());
- }
+ mFakeIconView.getBackground().setTint(getFakeTaskViewColor());
if (mTutorialFragment.getActivity() != null) {
int height = mTutorialFragment.getRootView().getFullscreenHeight();
int width = mTutorialFragment.getRootView().getWidth();
@@ -138,9 +135,7 @@
mFakeTaskViewRadius = 0;
mFakeTaskView.invalidateOutline();
mFakeTaskView.setVisibility(View.VISIBLE);
- if (FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- mFakeTaskView.setBackgroundColor(getFakeTaskViewColor());
- }
+ mFakeTaskView.setBackgroundColor(getFakeTaskViewColor());
mFakeTaskView.setAlpha(1);
mFakePreviousTaskView.setVisibility(View.INVISIBLE);
mFakePreviousTaskView.setAlpha(1);
@@ -390,12 +385,10 @@
false, /* isOpening */
mFakeIconView, mDp);
mFakeIconView.setAlpha(1);
- if (FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- int iconColor = ColorUtils.blendARGB(
- getFakeTaskViewColor(), getHotseatIconColor(), progress);
- mFakeIconView.getBackground().setTint(iconColor);
- mFakeTaskView.setBackgroundColor(iconColor);
- }
+ int iconColor = ColorUtils.blendARGB(
+ getFakeTaskViewColor(), getHotseatIconColor(), progress);
+ mFakeIconView.getBackground().setTint(iconColor);
+ mFakeTaskView.setBackgroundColor(iconColor);
mFakeTaskView.setAlpha(getWindowAlpha(progress));
mFakePreviousTaskView.setAlpha(getWindowAlpha(progress));
}
diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialController.java b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
index 54653fa..5028da4 100644
--- a/quickstep/src/com/android/quickstep/interaction/TutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
@@ -19,10 +19,7 @@
import static android.view.View.NO_ID;
import static android.view.View.inflate;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL;
-
import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
@@ -33,7 +30,6 @@
import android.graphics.Matrix;
import android.graphics.Outline;
import android.graphics.Rect;
-import android.graphics.drawable.AnimatedVectorDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.RippleDrawable;
import android.util.Log;
@@ -52,7 +48,6 @@
import androidx.annotation.ColorInt;
import androidx.annotation.DrawableRes;
import androidx.annotation.LayoutRes;
-import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.annotation.StyleRes;
@@ -153,8 +148,7 @@
mFakeHotseatView = rootView.findViewById(R.id.gesture_tutorial_fake_hotseat_view);
mFakeIconView = rootView.findViewById(R.id.gesture_tutorial_fake_icon_view);
mFakeTaskView = rootView.findViewById(R.id.gesture_tutorial_fake_task_view);
- mFakeTaskbarView = ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? null : rootView.findViewById(R.id.gesture_tutorial_fake_taskbar_view);
+ mFakeTaskbarView = null;
mFakePreviousTaskView =
rootView.findViewById(R.id.gesture_tutorial_fake_previous_task_view);
mRippleView = rootView.findViewById(R.id.gesture_tutorial_ripple_view);
@@ -165,32 +159,30 @@
mFingerDotView = rootView.findViewById(R.id.gesture_tutorial_finger_dot);
mSkipTutorialDialog = createSkipTutorialDialog();
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- mFullGestureDemonstration = rootView.findViewById(R.id.full_gesture_demonstration);
- mCheckmarkAnimation = rootView.findViewById(R.id.checkmark_animation);
- mAnimatedGestureDemonstration = rootView.findViewById(
- R.id.gesture_demonstration_animations);
- mExitingAppView = rootView.findViewById(R.id.exiting_app_back);
- mScreenWidth = mTutorialFragment.getDeviceProfile().widthPx;
- mScreenHeight = mTutorialFragment.getDeviceProfile().heightPx;
- mExitingAppMargin = mContext.getResources().getDimensionPixelSize(
- R.dimen.gesture_tutorial_back_gesture_exiting_app_margin);
- mExitingAppStartingCornerRadius = QuickStepContract.getWindowCornerRadius(mContext);
- mExitingAppEndingCornerRadius = mContext.getResources().getDimensionPixelSize(
- R.dimen.gesture_tutorial_back_gesture_end_corner_radius);
- mAnimatedGestureDemonstration.addLottieOnCompositionLoadedListener(
- this::createScalingMatrix);
+ mFullGestureDemonstration = rootView.findViewById(R.id.full_gesture_demonstration);
+ mCheckmarkAnimation = rootView.findViewById(R.id.checkmark_animation);
+ mAnimatedGestureDemonstration = rootView.findViewById(
+ R.id.gesture_demonstration_animations);
+ mExitingAppView = rootView.findViewById(R.id.exiting_app_back);
+ mScreenWidth = mTutorialFragment.getDeviceProfile().widthPx;
+ mScreenHeight = mTutorialFragment.getDeviceProfile().heightPx;
+ mExitingAppMargin = mContext.getResources().getDimensionPixelSize(
+ R.dimen.gesture_tutorial_back_gesture_exiting_app_margin);
+ mExitingAppStartingCornerRadius = QuickStepContract.getWindowCornerRadius(mContext);
+ mExitingAppEndingCornerRadius = mContext.getResources().getDimensionPixelSize(
+ R.dimen.gesture_tutorial_back_gesture_end_corner_radius);
+ mAnimatedGestureDemonstration.addLottieOnCompositionLoadedListener(
+ this::createScalingMatrix);
- mFeedbackTitleView.setText(getIntroductionTitle());
- mFeedbackSubtitleView.setText(getIntroductionSubtitle());
- mExitingAppView.setClipToOutline(true);
- mExitingAppView.setOutlineProvider(new ViewOutlineProvider() {
- @Override
- public void getOutline(View view, Outline outline) {
- outline.setRoundRect(mExitingAppRect, mExitingAppRadius);
- }
- });
- }
+ mFeedbackTitleView.setText(getIntroductionTitle());
+ mFeedbackSubtitleView.setText(getIntroductionSubtitle());
+ mExitingAppView.setClipToOutline(true);
+ mExitingAppView.setOutlineProvider(new ViewOutlineProvider() {
+ @Override
+ public void getOutline(View view, Outline outline) {
+ outline.setRoundRect(mExitingAppRect, mExitingAppRadius);
+ }
+ });
mTitleViewCallback = () -> mFeedbackTitleView.sendAccessibilityEvent(
AccessibilityEvent.TYPE_VIEW_FOCUSED);
@@ -261,19 +253,11 @@
@LayoutRes
protected int getMockHotseatResId() {
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- return mTutorialFragment.isLargeScreen()
- ? mTutorialFragment.isFoldable()
- ? R.layout.redesigned_gesture_tutorial_foldable_mock_hotseat
- : R.layout.redesigned_gesture_tutorial_tablet_mock_hotseat
- : R.layout.redesigned_gesture_tutorial_mock_hotseat;
- } else {
- return mTutorialFragment.isLargeScreen()
- ? mTutorialFragment.isFoldable()
- ? R.layout.gesture_tutorial_foldable_mock_hotseat
- : R.layout.gesture_tutorial_tablet_mock_hotseat
- : R.layout.gesture_tutorial_mock_hotseat;
- }
+ return mTutorialFragment.isLargeScreen()
+ ? mTutorialFragment.isFoldable()
+ ? R.layout.redesigned_gesture_tutorial_foldable_mock_hotseat
+ : R.layout.redesigned_gesture_tutorial_tablet_mock_hotseat
+ : R.layout.redesigned_gesture_tutorial_mock_hotseat;
}
@LayoutRes
@@ -312,9 +296,7 @@
@DrawableRes
public int getMockAppIconResId() {
- return ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.drawable.redesigned_hotseat_icon
- : R.drawable.default_sandbox_app_icon;
+ return R.drawable.redesigned_hotseat_icon;
}
@DrawableRes
@@ -374,11 +356,7 @@
mFeedbackView.setTranslationY(0);
return;
}
- Animator gestureAnimation = mTutorialFragment.getGestureAnimation();
- AnimatedVectorDrawable edgeAnimation = mTutorialFragment.getEdgeAnimation();
- if (gestureAnimation != null && edgeAnimation != null) {
- playFeedbackAnimation(gestureAnimation, edgeAnimation, mShowFeedbackRunnable, true);
- }
+ playFeedbackAnimation();
}
/**
@@ -442,12 +420,7 @@
}
mFeedbackTitleView.setText(titleResId);
- mFeedbackSubtitleView.setText(
- ENABLE_NEW_GESTURE_NAV_TUTORIAL.get() || spokenSubtitleResId == NO_ID
- ? mContext.getText(subtitleResId)
- : Utilities.wrapForTts(
- mContext.getText(subtitleResId),
- mContext.getString(spokenSubtitleResId)));
+ mFeedbackSubtitleView.setText(subtitleResId);
if (isGestureSuccessful) {
if (mTutorialFragment.isAtFinalStep()) {
showActionButton();
@@ -458,27 +431,16 @@
mFakeTaskViewCallback = null;
}
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- showSuccessPage();
- }
+ showSuccessPage();
}
mGestureCompleted = isGestureSuccessful;
-
- Animator gestureAnimation = mTutorialFragment.getGestureAnimation();
- AnimatedVectorDrawable edgeAnimation = mTutorialFragment.getEdgeAnimation();
- if (!isGestureSuccessful && gestureAnimation != null && edgeAnimation != null) {
- playFeedbackAnimation(
- gestureAnimation,
- edgeAnimation,
- mShowFeedbackRunnable,
- useGestureAnimationDelay);
- return;
+ if (!isGestureSuccessful) {
+ playFeedbackAnimation();
} else {
mTutorialFragment.releaseFeedbackAnimation();
+ mFeedbackViewCallback = mShowFeedbackRunnable;
+ mFeedbackView.post(mFeedbackViewCallback);
}
- mFeedbackViewCallback = mShowFeedbackRunnable;
-
- mFeedbackView.post(mFeedbackViewCallback);
}
private void showSuccessPage() {
@@ -517,79 +479,17 @@
mFeedbackTitleView.removeCallbacks(mTitleViewCallback);
}
- private void playFeedbackAnimation(
- @NonNull Animator gestureAnimation,
- @NonNull AnimatedVectorDrawable edgeAnimation,
- @NonNull Runnable onStartRunnable,
- boolean useGestureAnimationDelay) {
-
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- mFeedbackView.setVisibility(View.VISIBLE);
- mAnimatedGestureDemonstration.setVisibility(View.VISIBLE);
- mFullGestureDemonstration.setVisibility(View.VISIBLE);
- mAnimatedGestureDemonstration.playAnimation();
- return;
- }
-
- if (gestureAnimation.isRunning()) {
- gestureAnimation.cancel();
- }
- if (edgeAnimation.isRunning()) {
- edgeAnimation.reset();
- }
- gestureAnimation.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationStart(Animator animation) {
- super.onAnimationStart(animation);
-
- mEdgeGestureVideoView.setVisibility(GONE);
- if (edgeAnimation.isRunning()) {
- edgeAnimation.stop();
- }
-
- if (!useGestureAnimationDelay) {
- onStartRunnable.run();
- }
- }
-
- @Override
- public void onAnimationEnd(Animator animation) {
- super.onAnimationEnd(animation);
-
- mEdgeGestureVideoView.setVisibility(View.VISIBLE);
- edgeAnimation.start();
-
- gestureAnimation.removeListener(this);
- }
- });
-
- cancelQueuedGestureAnimation();
- if (useGestureAnimationDelay) {
- mFeedbackViewCallback = onStartRunnable;
- mFakeTaskViewCallback = gestureAnimation::start;
-
- mFeedbackView.post(mFeedbackViewCallback);
- mFakeTaskView.postDelayed(mFakeTaskViewCallback, GESTURE_ANIMATION_DELAY_MS);
- } else {
- gestureAnimation.start();
- }
+ private void playFeedbackAnimation() {
+ mFeedbackView.setVisibility(View.VISIBLE);
+ mAnimatedGestureDemonstration.setVisibility(View.VISIBLE);
+ mFullGestureDemonstration.setVisibility(View.VISIBLE);
+ mAnimatedGestureDemonstration.playAnimation();
}
void setRippleHotspot(float x, float y) {
mRippleDrawable.setHotspot(x, y);
}
- void showRippleEffect(@Nullable Runnable onCompleteRunnable) {
- mRippleDrawable.setState(
- new int[] {android.R.attr.state_pressed, android.R.attr.state_enabled});
- mRippleView.postDelayed(() -> {
- mRippleDrawable.setState(new int[] {});
- if (onCompleteRunnable != null) {
- onCompleteRunnable.run();
- }
- }, RIPPLE_VISIBLE_MS);
- }
-
void onActionButtonClicked(View button) {
mTutorialFragment.continueTutorial();
}
@@ -601,24 +501,19 @@
updateDrawables();
updateLayout();
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- mFeedbackTitleView.setTextAppearance(mContext, getTitleTextAppearance());
- mDoneButton.setTextAppearance(mContext, getDoneButtonTextAppearance());
- mDoneButton.getBackground().setTint(getDoneButtonColor());
- mCheckmarkAnimation.setAnimation(mTutorialFragment.isAtFinalStep()
- ? R.raw.checkmark_animation_end
- : R.raw.checkmark_animation_in_progress);
- if (!isGestureCompleted()) {
- mCheckmarkAnimation.setVisibility(GONE);
- startGestureAnimation();
- if (mTutorialType == TutorialType.BACK_NAVIGATION) {
- resetViewsForBackGesture();
- }
-
+ mFeedbackTitleView.setTextAppearance(mContext, getTitleTextAppearance());
+ mDoneButton.setTextAppearance(mContext, getDoneButtonTextAppearance());
+ mDoneButton.getBackground().setTint(getDoneButtonColor());
+ mCheckmarkAnimation.setAnimation(mTutorialFragment.isAtFinalStep()
+ ? R.raw.checkmark_animation_end
+ : R.raw.checkmark_animation_in_progress);
+ if (!isGestureCompleted()) {
+ mCheckmarkAnimation.setVisibility(GONE);
+ startGestureAnimation();
+ if (mTutorialType == TutorialType.BACK_NAVIGATION) {
+ resetViewsForBackGesture();
}
- } else {
- hideFeedback();
- hideActionButton();
+
}
mGestureCompleted = false;
@@ -654,13 +549,6 @@
: R.style.TextAppearance_GestureTutorial_Feedback_Subtext_Dark);
}
- void hideActionButton() {
- mSkipButton.setVisibility(View.VISIBLE);
- // Invisible to maintain the layout.
- mDoneButton.setVisibility(View.INVISIBLE);
- mDoneButton.setOnClickListener(null);
- }
-
void showActionButton() {
mSkipButton.setVisibility(GONE);
mDoneButton.setVisibility(View.VISIBLE);
@@ -711,10 +599,8 @@
}
private void updateSubtext() {
- if (!ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- mTutorialStepView.setTutorialProgress(
- mTutorialFragment.getCurrentStep(), mTutorialFragment.getNumSteps());
- }
+ mTutorialStepView.setTutorialProgress(
+ mTutorialFragment.getCurrentStep(), mTutorialFragment.getNumSteps());
}
private void updateHotseatChildViewColor(@Nullable View child) {
@@ -727,9 +613,7 @@
mTutorialFragment.getRootView().setBackground(AppCompatResources.getDrawable(
mContext, getMockWallpaperResId()));
mTutorialFragment.updateFeedbackAnimation();
- mFakeLauncherView.setBackgroundColor(ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? getFakeLauncherColor()
- : mContext.getColor(R.color.gesture_tutorial_fake_wallpaper_color));
+ mFakeLauncherView.setBackgroundColor(getFakeLauncherColor());
updateFakeViewLayout(mFakeHotseatView, getMockHotseatResId());
mHotseatIconView = mFakeHotseatView.findViewById(R.id.hotseat_icon_1);
mFakeTaskView.animate().alpha(1).setListener(
@@ -738,19 +622,15 @@
mFakeIconView.setBackground(AppCompatResources.getDrawable(
mContext, getMockAppIconResId()));
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- mExitingAppView.setBackgroundColor(getExitingAppColor());
- mFakeTaskView.setBackgroundColor(getFakeTaskViewColor());
- updateHotseatChildViewColor(mHotseatIconView);
- updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_2));
- updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_3));
- updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_4));
- updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_5));
- updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_6));
- updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_search_bar));
- } else {
- updateFakeViewLayout(mFakeTaskView, getMockAppTaskLayoutResId());
- }
+ mExitingAppView.setBackgroundColor(getExitingAppColor());
+ mFakeTaskView.setBackgroundColor(getFakeTaskViewColor());
+ updateHotseatChildViewColor(mHotseatIconView);
+ updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_2));
+ updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_3));
+ updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_4));
+ updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_5));
+ updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_icon_6));
+ updateHotseatChildViewColor(mFakeHotseatView.findViewById(R.id.hotseat_search_bar));
}
}
diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java b/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java
index 0fafb94..2ff2c83 100644
--- a/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java
+++ b/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java
@@ -17,7 +17,6 @@
import static android.view.View.NO_ID;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_NEW_GESTURE_NAV_TUTORIAL;
import static com.android.quickstep.interaction.GestureSandboxActivity.KEY_GESTURE_COMPLETE;
import static com.android.quickstep.interaction.GestureSandboxActivity.KEY_TUTORIAL_TYPE;
import static com.android.quickstep.interaction.GestureSandboxActivity.KEY_USE_TUTORIAL_MENU;
@@ -215,9 +214,7 @@
super.onCreateView(inflater, container, savedInstanceState);
mRootView = (RootSandboxLayout) inflater.inflate(
- ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()
- ? R.layout.redesigned_gesture_tutorial_fragment
- : R.layout.gesture_tutorial_fragment,
+ R.layout.redesigned_gesture_tutorial_fragment,
container,
false);
@@ -383,10 +380,7 @@
if (mTutorialController != null && !isGestureComplete()) {
mTutorialController.hideFeedback();
}
-
- if (ENABLE_NEW_GESTURE_NAV_TUTORIAL.get()) {
- mTutorialController.pauseAndHideLottieAnimation();
- }
+ mTutorialController.pauseAndHideLottieAnimation();
// Note: Using logical-or to ensure both functions get called.
return mEdgeBackGestureHandler.onTouch(view, motionEvent)
diff --git a/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java b/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java
index 26668c8..4c26761 100644
--- a/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java
+++ b/quickstep/src/com/android/quickstep/util/LauncherUnfoldAnimationController.java
@@ -31,7 +31,6 @@
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
import com.android.launcher3.Hotseat;
import com.android.launcher3.Workspace;
-import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.uioverrides.QuickstepLauncher;
import com.android.launcher3.util.HorizontalInsettableView;
import com.android.quickstep.SystemUiProxy;
@@ -80,17 +79,12 @@
@UnfoldMain RotationChangeProvider rotationChangeProvider) {
mLauncher = launcher;
- if (FeatureFlags.PREEMPTIVE_UNFOLD_ANIMATION_START.get()) {
- mPreemptiveProgressProvider = new PreemptiveUnfoldTransitionProgressProvider(
- unfoldTransitionProgressProvider, launcher.getMainThreadHandler());
- mPreemptiveProgressProvider.init();
+ mPreemptiveProgressProvider = new PreemptiveUnfoldTransitionProgressProvider(
+ unfoldTransitionProgressProvider, launcher.getMainThreadHandler());
+ mPreemptiveProgressProvider.init();
- mProgressProvider = new ScopedUnfoldTransitionProgressProvider(
- mPreemptiveProgressProvider);
- } else {
- mProgressProvider = new ScopedUnfoldTransitionProgressProvider(
- unfoldTransitionProgressProvider);
- }
+ mProgressProvider = new ScopedUnfoldTransitionProgressProvider(
+ mPreemptiveProgressProvider);
unfoldTransitionProgressProvider.addCallback(mExternalTransitionStatusProvider);
unfoldTransitionProgressProvider.addCallback(
@@ -169,10 +163,6 @@
@Override
public void onDeviceProfileChanged(DeviceProfile dp) {
- if (!FeatureFlags.PREEMPTIVE_UNFOLD_ANIMATION_START.get()) {
- return;
- }
-
if (mIsTablet != null && dp.isTablet != mIsTablet) {
// We should preemptively start the animation only if:
// - We changed to the unfolded screen
diff --git a/quickstep/src/com/android/quickstep/util/unfold/LauncherUnfoldTransitionController.kt b/quickstep/src/com/android/quickstep/util/unfold/LauncherUnfoldTransitionController.kt
index 09563f5..915c9e5 100644
--- a/quickstep/src/com/android/quickstep/util/unfold/LauncherUnfoldTransitionController.kt
+++ b/quickstep/src/com/android/quickstep/util/unfold/LauncherUnfoldTransitionController.kt
@@ -22,7 +22,6 @@
import com.android.launcher3.DeviceProfile
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener
import com.android.launcher3.anim.PendingAnimation
-import com.android.launcher3.config.FeatureFlags
import com.android.launcher3.uioverrides.QuickstepLauncher
import com.android.launcher3.util.ActivityLifecycleCallbacksAdapter
import com.android.systemui.unfold.UnfoldTransitionProgressProvider.TransitionProgressListener
@@ -30,7 +29,7 @@
/** Controls animations that are happening during unfolding foldable devices */
class LauncherUnfoldTransitionController(
private val launcher: QuickstepLauncher,
- private val progressProvider: ProxyUnfoldTransitionProvider
+ private val progressProvider: ProxyUnfoldTransitionProvider,
) : OnDeviceProfileChangeListener, ActivityLifecycleCallbacksAdapter, TransitionProgressListener {
private var isTablet: Boolean? = null
@@ -57,10 +56,6 @@
}
override fun onDeviceProfileChanged(dp: DeviceProfile) {
- if (!FeatureFlags.PREEMPTIVE_UNFOLD_ANIMATION_START.get()) {
- return
- }
-
if (isTablet != null && dp.isTablet != isTablet) {
// We should preemptively start the animation only if:
// - We changed to the unfolded screen
@@ -93,7 +88,7 @@
provider = this,
factory = this::onPrepareUnfoldAnimation,
duration =
- 1000L // The expected duration for the animation. Then only comes to play if we have
+ 1000L, // The expected duration for the animation. Then only comes to play if we have
// to run the animation ourselves in case sysui misses the end signal
)
timeoutAlarm.cancelAlarm()
@@ -119,7 +114,7 @@
launcher,
isVertical,
dp.displayInfo.currentSize,
- anim
+ anim,
)
}
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.kt b/quickstep/src/com/android/quickstep/views/TaskView.kt
index 601dae8..291ccef 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.kt
+++ b/quickstep/src/com/android/quickstep/views/TaskView.kt
@@ -46,7 +46,6 @@
import androidx.core.view.updateLayoutParams
import com.android.app.animation.Interpolators
import com.android.launcher3.Flags.enableCursorHoverStates
-import com.android.launcher3.Flags.enableFocusOutline
import com.android.launcher3.Flags.enableGridOnlyOverview
import com.android.launcher3.Flags.enableHoverOfChildElementsInTaskview
import com.android.launcher3.Flags.enableLargeDesktopWindowingTile
@@ -55,7 +54,6 @@
import com.android.launcher3.R
import com.android.launcher3.Utilities
import com.android.launcher3.anim.AnimatedFloat
-import com.android.launcher3.config.FeatureFlags.ENABLE_KEYBOARD_QUICK_SWITCH
import com.android.launcher3.logging.StatsLogManager.LauncherEvent
import com.android.launcher3.model.data.ItemInfo
import com.android.launcher3.testing.TestLogging
@@ -201,14 +199,14 @@
get() =
pagedOrientationHandler.getPrimaryValue(
SPLIT_SELECT_TRANSLATION_X,
- SPLIT_SELECT_TRANSLATION_Y
+ SPLIT_SELECT_TRANSLATION_Y,
)
protected val secondarySplitTranslationProperty: FloatProperty<TaskView>
get() =
pagedOrientationHandler.getSecondaryValue(
SPLIT_SELECT_TRANSLATION_X,
- SPLIT_SELECT_TRANSLATION_Y
+ SPLIT_SELECT_TRANSLATION_Y,
)
protected val primaryDismissTranslationProperty: FloatProperty<TaskView>
@@ -223,21 +221,21 @@
get() =
pagedOrientationHandler.getPrimaryValue(
TASK_OFFSET_TRANSLATION_X,
- TASK_OFFSET_TRANSLATION_Y
+ TASK_OFFSET_TRANSLATION_Y,
)
protected val secondaryTaskOffsetTranslationProperty: FloatProperty<TaskView>
get() =
pagedOrientationHandler.getSecondaryValue(
TASK_OFFSET_TRANSLATION_X,
- TASK_OFFSET_TRANSLATION_Y
+ TASK_OFFSET_TRANSLATION_Y,
)
protected val taskResistanceTranslationProperty: FloatProperty<TaskView>
get() =
pagedOrientationHandler.getSecondaryValue(
TASK_RESISTANCE_TRANSLATION_X,
- TASK_RESISTANCE_TRANSLATION_Y
+ TASK_RESISTANCE_TRANSLATION_Y,
)
private val tempCoordinates = FloatArray(2)
@@ -435,7 +433,7 @@
field = value
Log.d(
TAG,
- "${taskIds.contentToString()} - setting border animator visibility to: $field"
+ "${taskIds.contentToString()} - setting border animator visibility to: $field",
)
hoverBorderAnimator?.setBorderVisibility(visible = field, animated = true)
}
@@ -455,7 +453,7 @@
FOCUS_TRANSITION,
FOCUS_TRANSITION_INDEX_COUNT,
{ x: Float, y: Float -> x * y },
- 1f
+ 1f,
)
private val focusTransitionFullscreen =
focusTransitionPropertyFactory.get(FOCUS_TRANSITION_INDEX_FULLSCREEN)
@@ -486,27 +484,23 @@
taskViewModel = RecentsDependencies.get(this, "TaskViewType" to type)
}
- val keyboardFocusHighlightEnabled =
- (ENABLE_KEYBOARD_QUICK_SWITCH.get() || enableFocusOutline())
val cursorHoverStatesEnabled = enableCursorHoverStates()
- setWillNotDraw(!keyboardFocusHighlightEnabled && !cursorHoverStatesEnabled)
+ setWillNotDraw(!cursorHoverStatesEnabled)
context.obtainStyledAttributes(attrs, R.styleable.TaskView, defStyleAttr, defStyleRes).use {
this.focusBorderAnimator =
focusBorderAnimator
- ?: if (keyboardFocusHighlightEnabled)
- createSimpleBorderAnimator(
- currentFullscreenParams.cornerRadius.toInt(),
- context.resources.getDimensionPixelSize(
- R.dimen.keyboard_quick_switch_border_width
- ),
- { bounds: Rect -> getThumbnailBounds(bounds) },
- this,
- it.getColor(
- R.styleable.TaskView_focusBorderColor,
- BorderAnimator.DEFAULT_BORDER_COLOR
- )
- )
- else null
+ ?: createSimpleBorderAnimator(
+ currentFullscreenParams.cornerRadius.toInt(),
+ context.resources.getDimensionPixelSize(
+ R.dimen.keyboard_quick_switch_border_width
+ ),
+ { bounds: Rect -> getThumbnailBounds(bounds) },
+ this,
+ it.getColor(
+ R.styleable.TaskView_focusBorderColor,
+ BorderAnimator.DEFAULT_BORDER_COLOR,
+ ),
+ )
this.hoverBorderAnimator =
hoverBorderAnimator
?: if (cursorHoverStatesEnabled)
@@ -519,8 +513,8 @@
this,
it.getColor(
R.styleable.TaskView_hoverBorderColor,
- BorderAnimator.DEFAULT_BORDER_COLOR
- )
+ BorderAnimator.DEFAULT_BORDER_COLOR,
+ ),
)
else null
}
@@ -634,7 +628,7 @@
addAction(
AccessibilityAction(
R.id.action_close,
- context.getText(R.string.accessibility_close)
+ context.getText(R.string.accessibility_close),
)
)
@@ -658,7 +652,7 @@
1,
it.taskViewCount - it.indexOfChild(this@TaskView) - 1,
1,
- false
+ false,
)
}
}
@@ -704,7 +698,7 @@
R.id.show_windows,
R.id.digital_wellbeing_toast,
STAGE_POSITION_UNDEFINED,
- taskOverlayFactory
+ taskOverlayFactory,
)
)
taskContainers.forEach { it.bind() }
@@ -742,7 +736,7 @@
stagePosition,
digitalWellBeingToast,
findViewById(showWindowViewId)!!,
- taskOverlayFactory
+ taskOverlayFactory,
)
}
@@ -860,7 +854,7 @@
if (relativeToDragLayer) {
container.dragLayer.getDescendantRectRelativeToSelf(
it.snapshotView,
- thumbnailBounds
+ thumbnailBounds,
)
} else {
thumbnailBounds.set(it.snapshotView)
@@ -979,7 +973,7 @@
@JvmOverloads
open fun setShouldShowScreenshot(
shouldShowScreenshot: Boolean,
- thumbnailDatas: Map<Int, ThumbnailData?>? = null
+ thumbnailDatas: Map<Int, ThumbnailData?>? = null,
) {
if (this.shouldShowScreenshot == shouldShowScreenshot) return
this.shouldShowScreenshot = shouldShowScreenshot
@@ -1030,7 +1024,7 @@
if (!isClickableAsLiveTile) {
Log.e(
TAG,
- "launchAsLiveTile - TaskView is not clickable as a live tile; returning to home: ${taskIds.contentToString()}"
+ "launchAsLiveTile - TaskView is not clickable as a live tile; returning to home: ${taskIds.contentToString()}",
)
return null
}
@@ -1049,7 +1043,7 @@
apps.toTypedArray(),
wallpapers.toTypedArray(),
remoteTargetHandles[0].transformParams.targetSet.nonApps,
- remoteTargetHandles[0].transformParams.targetSet.targetMode
+ remoteTargetHandles[0].transformParams.targetSet.targetMode,
)
}
if (targets == null) {
@@ -1059,7 +1053,7 @@
if (runnableList == null) {
Log.e(
TAG,
- "launchAsLiveTile - Recents animation cancelled and cannot launch task as non-live tile; returning to home: ${taskIds.contentToString()}"
+ "launchAsLiveTile - Recents animation cancelled and cannot launch task as non-live tile; returning to home: ${taskIds.contentToString()}",
)
}
isClickableAsLiveTile = true
@@ -1068,7 +1062,7 @@
TestLogging.recordEvent(
TestProtocol.SEQUENCE_MAIN,
"composeRecentsLaunchAnimator",
- taskIds.contentToString()
+ taskIds.contentToString(),
)
val runnableList = RunnableList()
with(AnimatorSet()) {
@@ -1081,7 +1075,7 @@
true /* launcherClosing */,
recentsView.stateManager,
recentsView,
- recentsView.depthController
+ recentsView.depthController,
)
addListener(
object : AnimatorListenerAdapter() {
@@ -1118,7 +1112,7 @@
TestLogging.recordEvent(
TestProtocol.SEQUENCE_MAIN,
"startActivityFromRecentsAsync",
- taskIds.contentToString()
+ taskIds.contentToString(),
)
val opts =
container.getActivityLaunchOptions(this, null).apply {
@@ -1130,7 +1124,7 @@
) {
Log.d(
TAG,
- "launchAsStaticTile - startActivityFromRecents: ${taskIds.contentToString()}"
+ "launchAsStaticTile - startActivityFromRecents: ${taskIds.contentToString()}",
)
ActiveGestureLog.INSTANCE.trackEvent(
ActiveGestureErrorDetector.GestureEvent.EXPECTING_TASK_APPEARED
@@ -1163,12 +1157,12 @@
@JvmOverloads
open fun launchWithoutAnimation(
isQuickSwitch: Boolean = false,
- callback: (launched: Boolean) -> Unit
+ callback: (launched: Boolean) -> Unit,
) {
TestLogging.recordEvent(
TestProtocol.SEQUENCE_MAIN,
"startActivityFromRecentsAsync",
- taskIds.contentToString()
+ taskIds.contentToString(),
)
val firstContainer = taskContainers[0]
val failureListener = TaskRemovedDuringLaunchListener(context.applicationContext)
@@ -1199,7 +1193,7 @@
0,
0,
Executors.MAIN_EXECUTOR.handler,
- { callback(true) }
+ { callback(true) },
) {
failureListener.onTransitionFinished()
}
@@ -1227,7 +1221,7 @@
}
Log.d(
TAG,
- "launchWithoutAnimation - startActivityFromRecents: ${taskIds.contentToString()}"
+ "launchWithoutAnimation - startActivityFromRecents: ${taskIds.contentToString()}",
)
}
}
@@ -1246,7 +1240,7 @@
recentsView?.initiateSplitSelect(
this,
splitPositionOption.stagePosition,
- SplitConfigurationOptions.getLogEventForPosition(splitPositionOption.stagePosition)
+ SplitConfigurationOptions.getLogEventForPosition(splitPositionOption.stagePosition),
)
}
@@ -1269,7 +1263,7 @@
container.splitAnimationThumbnail,
/* intent */ null,
/* user */ null,
- container.itemInfo
+ container.itemInfo,
)
}
@@ -1374,13 +1368,13 @@
this[0] = viewHalfWidth
this[1] = viewHalfHeight
},
- false
+ false,
)
transformingTouchDelegate.setBounds(
(tempCenterCoordinates[0] - viewHalfWidth).toInt(),
(tempCenterCoordinates[1] - viewHalfHeight).toInt(),
(tempCenterCoordinates[0] + viewHalfWidth).toInt(),
- (tempCenterCoordinates[1] + viewHalfHeight).toInt()
+ (tempCenterCoordinates[1] + viewHalfHeight).toInt(),
)
}
@@ -1390,7 +1384,7 @@
it.showWindowsView?.let { showWindowsView ->
updateFilterCallback(
showWindowsView,
- getFilterUpdateCallback(it.task.key.packageName)
+ getFilterUpdateCallback(it.task.key.packageName),
)
}
}
@@ -1710,7 +1704,7 @@
Interpolators.clampToProgress(
Interpolators.FAST_OUT_SLOW_IN,
1f - FOCUS_TRANSITION_THRESHOLD,
- 1f
+ 1f,
)!!
private val SYSTEM_GESTURE_EXCLUSION_RECT = listOf(Rect())
diff --git a/src/com/android/launcher3/MotionEventsUtils.java b/src/com/android/launcher3/MotionEventsUtils.java
index 3228ec6..fb244b0 100644
--- a/src/com/android/launcher3/MotionEventsUtils.java
+++ b/src/com/android/launcher3/MotionEventsUtils.java
@@ -18,8 +18,6 @@
import static android.view.MotionEvent.CLASSIFICATION_TWO_FINGER_SWIPE;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_TRACKPAD_GESTURE;
-
import android.annotation.TargetApi;
import android.os.Build;
import android.view.MotionEvent;
@@ -35,14 +33,12 @@
@TargetApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
public static boolean isTrackpadScroll(MotionEvent event) {
- return ENABLE_TRACKPAD_GESTURE.get()
- && event.getClassification() == CLASSIFICATION_TWO_FINGER_SWIPE;
+ return event.getClassification() == CLASSIFICATION_TWO_FINGER_SWIPE;
}
@TargetApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
public static boolean isTrackpadMultiFingerSwipe(MotionEvent event) {
- return ENABLE_TRACKPAD_GESTURE.get()
- && event.getClassification() == CLASSIFICATION_MULTI_FINGER_SWIPE;
+ return event.getClassification() == CLASSIFICATION_MULTI_FINGER_SWIPE;
}
public static boolean isTrackpadThreeFingerSwipe(MotionEvent event) {
diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
index cc4724c..6b5e3be 100644
--- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java
@@ -22,8 +22,6 @@
import static com.android.launcher3.allapps.BaseAllAppsAdapter.VIEW_TYPE_PRIVATE_SPACE_HEADER;
import static com.android.launcher3.allapps.BaseAllAppsAdapter.VIEW_TYPE_WORK_DISABLED_CARD;
import static com.android.launcher3.allapps.BaseAllAppsAdapter.VIEW_TYPE_WORK_EDU_CARD;
-import static com.android.launcher3.config.FeatureFlags.ALL_APPS_GONE_VISIBILITY;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_ALL_APPS_RV_PREINFLATION;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_COUNT;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_TAP_ON_PERSONAL_TAB;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_TAP_ON_WORK_TAB;
@@ -679,18 +677,13 @@
@NonNull AllAppsRecyclerView mainRecyclerView,
@Nullable AllAppsRecyclerView workRecyclerView,
@NonNull AllAppsRecyclerViewPool recycledViewPool) {
- if (!ENABLE_ALL_APPS_RV_PREINFLATION.get()) {
- return;
- }
final boolean hasWorkProfile = workRecyclerView != null;
recycledViewPool.setHasWorkProfile(hasWorkProfile);
mainRecyclerView.setRecycledViewPool(recycledViewPool);
if (workRecyclerView != null) {
workRecyclerView.setRecycledViewPool(recycledViewPool);
}
- if (ALL_APPS_GONE_VISIBILITY.get()) {
- mainRecyclerView.updatePoolSize(hasWorkProfile);
- }
+ mainRecyclerView.updatePoolSize(hasWorkProfile);
}
private void replaceAppsRVContainer(boolean showTabs) {
diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
index ae45a35..4e1e950 100644
--- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
@@ -18,8 +18,6 @@
import static androidx.constraintlayout.widget.ConstraintSet.MATCH_CONSTRAINT;
import static androidx.constraintlayout.widget.ConstraintSet.WRAP_CONTENT;
-import static com.android.launcher3.config.FeatureFlags.ALL_APPS_GONE_VISIBILITY;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_ALL_APPS_RV_PREINFLATION;
import static com.android.launcher3.logger.LauncherAtom.ContainerInfo;
import static com.android.launcher3.logger.LauncherAtom.SearchResultContainer;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_PERSONAL_SCROLLED_DOWN;
@@ -124,13 +122,11 @@
// all apps.
int maxPoolSizeForAppIcons = grid.getMaxAllAppsRowCount()
* grid.numShownAllAppsColumns;
- if (ALL_APPS_GONE_VISIBILITY.get() && ENABLE_ALL_APPS_RV_PREINFLATION.get()) {
- // If we set all apps' hidden visibility to GONE and enable pre-inflation, we want to
- // preinflate one page of all apps icons plus [PREINFLATE_ICONS_ROW_COUNT] rows +
- // [EXTRA_ICONS_COUNT]. Thus we need to bump the max pool size of app icons accordingly.
- maxPoolSizeForAppIcons +=
- PREINFLATE_ICONS_ROW_COUNT * grid.numShownAllAppsColumns + EXTRA_ICONS_COUNT;
- }
+ // If we set all apps' hidden visibility to GONE and enable pre-inflation, we want to
+ // preinflate one page of all apps icons plus [PREINFLATE_ICONS_ROW_COUNT] rows +
+ // [EXTRA_ICONS_COUNT]. Thus we need to bump the max pool size of app icons accordingly.
+ maxPoolSizeForAppIcons +=
+ PREINFLATE_ICONS_ROW_COUNT * grid.numShownAllAppsColumns + EXTRA_ICONS_COUNT;
if (hasWorkProfile) {
maxPoolSizeForAppIcons *= 2;
}
diff --git a/src/com/android/launcher3/allapps/AllAppsStore.java b/src/com/android/launcher3/allapps/AllAppsStore.java
index a4f130a..29b9e77 100644
--- a/src/com/android/launcher3/allapps/AllAppsStore.java
+++ b/src/com/android/launcher3/allapps/AllAppsStore.java
@@ -15,7 +15,6 @@
*/
package com.android.launcher3.allapps;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_ALL_APPS_RV_PREINFLATION;
import static com.android.launcher3.model.data.AppInfo.COMPONENT_KEY_COMPARATOR;
import static com.android.launcher3.model.data.AppInfo.EMPTY_ARRAY;
import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_SHOW_DOWNLOAD_PROGRESS_MASK;
@@ -109,7 +108,7 @@
mPackageUserKeytoUidMap = map;
// Preinflate all apps RV when apps has changed, which can happen after unlocking screen,
// rotating screen, or downloading/upgrading apps.
- if (shouldPreinflate && ENABLE_ALL_APPS_RV_PREINFLATION.get()) {
+ if (shouldPreinflate) {
mAllAppsRecyclerViewPool.preInflateAllAppsViewHolders(mContext);
}
}
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index 742648e..c6852e0 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -54,7 +54,6 @@
import com.android.launcher3.anim.AnimatedFloat;
import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.anim.PropertySetter;
-import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.statemanager.StateManager.StateHandler;
import com.android.launcher3.states.StateAnimationConfig;
import com.android.launcher3.touch.AllAppsSwipeController;
@@ -413,8 +412,7 @@
mAppsView = appsView;
mAppsView.setScrimView(scrimView);
- mAppsViewAlpha = new MultiValueAlpha(mAppsView, APPS_VIEW_INDEX_COUNT,
- FeatureFlags.ALL_APPS_GONE_VISIBILITY.get() ? View.GONE : View.INVISIBLE);
+ mAppsViewAlpha = new MultiValueAlpha(mAppsView, APPS_VIEW_INDEX_COUNT, View.GONE);
mAppsViewAlpha.setUpdateVisibility(true);
mAppsViewTranslationY = new MultiPropertyFactory<>(
mAppsView, VIEW_TRANSLATE_Y, APPS_VIEW_INDEX_COUNT, Float::sum);
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 092b524..eb65320 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -66,8 +66,6 @@
public static final BooleanFlag ENABLE_DISMISS_PREDICTION_UNDO = getDebugFlag(270394476,
"ENABLE_DISMISS_PREDICTION_UNDO", DISABLED,
"Show an 'Undo' snackbar when users dismiss a predicted hotseat item");
- public static final BooleanFlag CONTINUOUS_VIEW_TREE_CAPTURE = getDebugFlag(270395171,
- "CONTINUOUS_VIEW_TREE_CAPTURE", ENABLED, "Capture View tree every frame");
public static final BooleanFlag ENABLE_WORKSPACE_LOADING_OPTIMIZATION = getDebugFlag(251502424,
"ENABLE_WORKSPACE_LOADING_OPTIMIZATION", DISABLED,
@@ -206,14 +204,6 @@
"ENABLE_SEARCH_UNINSTALLED_APPS", ENABLED, "Search uninstalled app results.");
// TODO(Block 20): Clean up flags
- public static final BooleanFlag ENABLE_BACK_SWIPE_HOME_ANIMATION = getDebugFlag(270393426,
- "ENABLE_BACK_SWIPE_HOME_ANIMATION", ENABLED,
- "Enables home animation to icon when user swipes back.");
-
- public static final BooleanFlag ENABLE_DYNAMIC_TASKBAR_THRESHOLDS = getDebugFlag(294252473,
- "ENABLE_DYNAMIC_TASKBAR_THRESHOLDS", ENABLED,
- "Enables taskbar thresholds that scale based on screen size.");
-
// Aconfig migration complete for ENABLE_HOME_TRANSITION_LISTENER.
public static final BooleanFlag ENABLE_HOME_TRANSITION_LISTENER = getDebugFlag(306053414,
"ENABLE_HOME_TRANSITION_LISTENER", DISABLED,
@@ -232,18 +222,7 @@
"ENABLE_WIDGET_TRANSITION_FOR_RESIZING", DISABLED,
"Enable widget transition animation when resizing the widgets");
- public static final BooleanFlag PREEMPTIVE_UNFOLD_ANIMATION_START = getDebugFlag(270397209,
- "PREEMPTIVE_UNFOLD_ANIMATION_START", ENABLED,
- "Enables starting the unfold animation preemptively when unfolding, without"
- + "waiting for SystemUI and then merging the SystemUI progress whenever we "
- + "start receiving the events");
-
// TODO(Block 25): Clean up flags
- public static final BooleanFlag ENABLE_NEW_GESTURE_NAV_TUTORIAL = getDebugFlag(270396257,
- "ENABLE_NEW_GESTURE_NAV_TUTORIAL", ENABLED,
- "Enable the redesigned gesture navigation tutorial");
-
- // TODO(Block 26): Clean up flags
public static final BooleanFlag ENABLE_WIDGET_HOST_IN_BACKGROUND = getDebugFlag(270394384,
"ENABLE_WIDGET_HOST_IN_BACKGROUND", ENABLED,
"Enable background widget updates listening for widget holder");
@@ -268,10 +247,6 @@
"SEPARATE_RECENTS_ACTIVITY", DISABLED,
"Uses a separate recents activity instead of using the integrated recents+Launcher UI");
- public static final BooleanFlag ENABLE_ENFORCED_ROUNDED_CORNERS = getReleaseFlag(270393258,
- "ENABLE_ENFORCED_ROUNDED_CORNERS", ENABLED,
- "Enforce rounded corners on all App Widgets");
-
public static final BooleanFlag USE_LOCAL_ICON_OVERRIDES = getDebugFlag(270394973,
"USE_LOCAL_ICON_OVERRIDES", ENABLED,
"Use inbuilt monochrome icons if app doesn't provide one");
@@ -285,21 +260,11 @@
com.android.wm.shell.Flags.enableSplitContextual();
}
- public static final BooleanFlag ENABLE_TRACKPAD_GESTURE = getDebugFlag(271010401,
- "ENABLE_TRACKPAD_GESTURE", ENABLED, "Enables trackpad gesture.");
-
// TODO(Block 29): Clean up flags
public static final BooleanFlag ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT = getDebugFlag(270393897,
"ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT", DISABLED,
"Enables displaying the all apps button in the hotseat.");
- public static final BooleanFlag ENABLE_KEYBOARD_QUICK_SWITCH = getDebugFlag(270396844,
- "ENABLE_KEYBOARD_QUICK_SWITCH", ENABLED, "Enables keyboard quick switching");
-
- public static final BooleanFlag ENABLE_KEYBOARD_TASKBAR_TOGGLE = getDebugFlag(281726846,
- "ENABLE_KEYBOARD_TASKBAR_TOGGLE", ENABLED,
- "Enables keyboard taskbar stash toggling");
-
// TODO(Block 30): Clean up flags
public static final BooleanFlag USE_SEARCH_REQUEST_TIMEOUT_OVERRIDES = getDebugFlag(270395010,
"USE_SEARCH_REQUEST_TIMEOUT_OVERRIDES", DISABLED,
@@ -317,14 +282,6 @@
return ENABLE_RESPONSIVE_WORKSPACE.get() || Flags.enableResponsiveWorkspace();
}
- // TODO(Block 33): Clean up flags
- public static final BooleanFlag ENABLE_ALL_APPS_RV_PREINFLATION = getDebugFlag(288161355,
- "ENABLE_ALL_APPS_RV_PREINFLATION", ENABLED,
- "Enables preinflating all apps icons to avoid scrolling jank.");
- public static final BooleanFlag ALL_APPS_GONE_VISIBILITY = getDebugFlag(291651514,
- "ALL_APPS_GONE_VISIBILITY", ENABLED,
- "Set all apps container view's hidden visibility to GONE instead of INVISIBLE.");
-
public static BooleanFlag getDebugFlag(
int bugId, String key, BooleanFlag flagState, String description) {
return flagState;
diff --git a/src/com/android/launcher3/recyclerview/AllAppsRecyclerViewPool.kt b/src/com/android/launcher3/recyclerview/AllAppsRecyclerViewPool.kt
index 6ff51ca..82229f8 100644
--- a/src/com/android/launcher3/recyclerview/AllAppsRecyclerViewPool.kt
+++ b/src/com/android/launcher3/recyclerview/AllAppsRecyclerViewPool.kt
@@ -24,7 +24,6 @@
import com.android.launcher3.BubbleTextView
import com.android.launcher3.BuildConfig
import com.android.launcher3.allapps.BaseAllAppsAdapter
-import com.android.launcher3.config.FeatureFlags
import com.android.launcher3.util.CancellableTask
import com.android.launcher3.util.Executors.MAIN_EXECUTOR
import com.android.launcher3.util.Executors.VIEW_PREINFLATION_EXECUTOR
@@ -78,7 +77,7 @@
ActivityContextDelegate(
context.createConfigurationContext(context.resources.configuration),
Themes.getActivityThemeRes(context),
- context
+ context,
)
// Because we perform onCreateViewHolder() on worker thread, we need a separate
@@ -91,7 +90,7 @@
context,
context.appsView.layoutInflater.cloneInContext(allAppsPreInflationContext),
null,
- null
+ null,
) {
override fun setAppsPerRow(appsPerRow: Int) = Unit
@@ -124,7 +123,7 @@
for (i in 0 until minOf(viewHolders.size, getPreinflateCount(context))) {
putRecycledView(viewHolders[i])
}
- }
+ },
)
mCancellableTask = task
VIEW_PREINFLATION_EXECUTOR.submit(mCancellableTask)
@@ -144,18 +143,15 @@
* app icons plus [EXTRA_ICONS_COUNT] is the magic minimal count of app icons to preinflate to
* suffice fast scrolling.
*
- * Note that if [FeatureFlags.ALL_APPS_GONE_VISIBILITY] is enabled, we need to preinfate extra
- * app icons in size of one all apps pages, so that opening all apps don't need to inflate app
- * icons.
+ * Note that we need to preinfate extra app icons in size of one all apps pages, so that opening
+ * all apps don't need to inflate app icons.
*/
fun <T> getPreinflateCount(context: T): Int where T : Context, T : ActivityContext {
var targetPreinflateCount =
PREINFLATE_ICONS_ROW_COUNT * context.deviceProfile.numShownAllAppsColumns +
EXTRA_ICONS_COUNT
- if (FeatureFlags.ALL_APPS_GONE_VISIBILITY.get()) {
- val grid = ActivityContext.lookupContext<T>(context).deviceProfile
- targetPreinflateCount += grid.maxAllAppsRowCount * grid.numShownAllAppsColumns
- }
+ val grid = ActivityContext.lookupContext<T>(context).deviceProfile
+ targetPreinflateCount += grid.maxAllAppsRowCount * grid.numShownAllAppsColumns
if (hasWorkProfile) {
targetPreinflateCount *= 2
}
diff --git a/src/com/android/launcher3/widget/RoundedCornerEnforcement.java b/src/com/android/launcher3/widget/RoundedCornerEnforcement.java
index 2e5e251..a2fac46 100644
--- a/src/com/android/launcher3/widget/RoundedCornerEnforcement.java
+++ b/src/com/android/launcher3/widget/RoundedCornerEnforcement.java
@@ -29,7 +29,6 @@
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
-import com.android.launcher3.config.FeatureFlags;
import java.util.ArrayList;
import java.util.List;
@@ -73,7 +72,7 @@
/** Check if the app widget is in the deny list. */
public static boolean isRoundedCornerEnabled() {
- return Utilities.ATLEAST_S && FeatureFlags.ENABLE_ENFORCED_ROUNDED_CORNERS.get();
+ return Utilities.ATLEAST_S;
}
/**