Merge "Removing unnecessarily requiring activity to be a launcher" into ub-launcher3-master
diff --git a/Android.mk b/Android.mk
index 0477dab..30dda13 100644
--- a/Android.mk
+++ b/Android.mk
@@ -125,6 +125,7 @@
LOCAL_MIN_SDK_VERSION := 21
LOCAL_PACKAGE_NAME := Launcher3
LOCAL_PRIVILEGED_MODULE := true
+LOCAL_PRODUCT_MODULE := true
LOCAL_OVERRIDES_PACKAGES := Home Launcher2
LOCAL_FULL_LIBS_MANIFEST_FILES := $(LOCAL_PATH)/AndroidManifest-common.xml
@@ -154,6 +155,7 @@
LOCAL_MIN_SDK_VERSION := 21
LOCAL_PACKAGE_NAME := Launcher3Go
LOCAL_PRIVILEGED_MODULE := true
+LOCAL_PRODUCT_MODULE := true
LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3QuickStep
LOCAL_FULL_LIBS_MANIFEST_FILES := \
@@ -220,6 +222,7 @@
endif
LOCAL_PACKAGE_NAME := Launcher3QuickStep
LOCAL_PRIVILEGED_MODULE := true
+LOCAL_PRODUCT_MODULE := true
LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3
LOCAL_RESOURCE_DIR := \
@@ -269,6 +272,7 @@
LOCAL_PACKAGE_NAME := Launcher3QuickStepGo
LOCAL_PRIVILEGED_MODULE := true
+LOCAL_PRODUCT_MODULE := true
LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 Launcher3QuickStep
LOCAL_FULL_LIBS_MANIFEST_FILES := \
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 655787c..70f0c01 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -63,7 +63,7 @@
</intent-filter>
<meta-data
android:name="com.android.launcher3.grid.control"
- android:value="${packageName}.grid.control" />
+ android:value="${packageName}.grid_control" />
</activity>
</application>
diff --git a/SecondaryDisplayLauncher/Android.mk b/SecondaryDisplayLauncher/Android.mk
index 4fb5eba..7f305bb 100644
--- a/SecondaryDisplayLauncher/Android.mk
+++ b/SecondaryDisplayLauncher/Android.mk
@@ -21,7 +21,7 @@
LOCAL_AAPT2_ONLY := true
LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_ANDROID_LIBRARIES := androidx.design_design
+LOCAL_STATIC_ANDROID_LIBRARIES := com.google.android.material_material
LOCAL_STATIC_JAVA_LIBRARIES := LauncherPluginLib
diff --git a/SecondaryDisplayLauncher/res/layout/app_picker_layout.xml b/SecondaryDisplayLauncher/res/layout/app_picker_layout.xml
index fbaeac4..20f85b1 100644
--- a/SecondaryDisplayLauncher/res/layout/app_picker_layout.xml
+++ b/SecondaryDisplayLauncher/res/layout/app_picker_layout.xml
@@ -20,7 +20,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <android.support.design.circularreveal.cardview.CircularRevealCardView
+ <com.google.android.material.circularreveal.cardview.CircularRevealCardView
android:id="@+id/FloatingSheet"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -35,9 +35,9 @@
android:verticalSpacing="@dimen/app_list_horizontal_spacing"
android:horizontalSpacing="@dimen/app_list_vertical_spacing"
android:numColumns="auto_fit" />
- </android.support.design.circularreveal.cardview.CircularRevealCardView>
+ </com.google.android.material.circularreveal.cardview.CircularRevealCardView>
- <android.support.design.widget.FloatingActionButton
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/FloatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/SecondaryDisplayLauncher/src/com/android/launcher3/SecondaryDisplayLauncher.java b/SecondaryDisplayLauncher/src/com/android/launcher3/SecondaryDisplayLauncher.java
index 5e8b402..12fa46b 100644
--- a/SecondaryDisplayLauncher/src/com/android/launcher3/SecondaryDisplayLauncher.java
+++ b/SecondaryDisplayLauncher/src/com/android/launcher3/SecondaryDisplayLauncher.java
@@ -26,8 +26,8 @@
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Bundle;
-import android.support.design.circularreveal.cardview.CircularRevealCardView;
-import android.support.design.widget.FloatingActionButton;
+import com.google.android.material.circularreveal.cardview.CircularRevealCardView;
+import com.google.android.material.floatingactionbutton.FloatingActionButton;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
diff --git a/build.gradle b/build.gradle
index ab97687..15a3513 100644
--- a/build.gradle
+++ b/build.gradle
@@ -13,7 +13,7 @@
apply plugin: 'com.google.protobuf'
android {
- compileSdkVersion COMPILE_SDK.toInteger()
+ compileSdkVersion COMPILE_SDK
buildToolsVersion BUILD_TOOLS_VERSION
defaultConfig {
diff --git a/go/quickstep/src/com/android/launcher3/uioverrides/BackgroundAppState.java b/go/quickstep/src/com/android/launcher3/uioverrides/BackgroundAppState.java
new file mode 100644
index 0000000..4038c99
--- /dev/null
+++ b/go/quickstep/src/com/android/launcher3/uioverrides/BackgroundAppState.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.launcher3.uioverrides;
+
+/**
+ * State indicating that the Launcher is behind an app. Same as {@link OverviewState} for Go as we
+ * do not support swipe to overview or swipe to home.
+ */
+public final class BackgroundAppState extends OverviewState {
+ public BackgroundAppState(int id) {
+ super(id);
+ }
+}
diff --git a/go/quickstep/src/com/android/launcher3/uioverrides/FastOverviewState.java b/go/quickstep/src/com/android/launcher3/uioverrides/FastOverviewState.java
new file mode 100644
index 0000000..90360ce
--- /dev/null
+++ b/go/quickstep/src/com/android/launcher3/uioverrides/FastOverviewState.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.launcher3.uioverrides;
+
+/**
+ * Extension of overview state used for QuickScrub. Same as {@link OverviewState} for Go as we do
+ * not support quickscrub.
+ */
+public final class FastOverviewState extends OverviewState {
+ public FastOverviewState(int id) {
+ super(id);
+ }
+}
diff --git a/go/quickstep/src/com/android/launcher3/uioverrides/LandscapeStatesTouchController.java b/go/quickstep/src/com/android/launcher3/uioverrides/LandscapeStatesTouchController.java
new file mode 100644
index 0000000..2c91bc3
--- /dev/null
+++ b/go/quickstep/src/com/android/launcher3/uioverrides/LandscapeStatesTouchController.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.launcher3.uioverrides;
+
+import static com.android.launcher3.LauncherState.ALL_APPS;
+import static com.android.launcher3.LauncherState.NORMAL;
+
+import android.view.MotionEvent;
+
+import com.android.launcher3.AbstractFloatingView;
+import com.android.launcher3.Launcher;
+import com.android.launcher3.LauncherState;
+import com.android.launcher3.userevent.nano.LauncherLogProto;
+
+/**
+ * Touch controller for landscape mode.
+ */
+public final class LandscapeStatesTouchController extends PortraitStatesTouchController {
+
+ public LandscapeStatesTouchController(Launcher l) {
+ super(l, true /* allowDragToOverview */);
+ }
+
+ @Override
+ protected boolean canInterceptTouch(MotionEvent ev) {
+ if (mCurrentAnimation != null) {
+ // If we are already animating from a previous state, we can intercept.
+ return true;
+ }
+ if (AbstractFloatingView.getTopOpenView(mLauncher) != null) {
+ return false;
+ }
+ if (mLauncher.isInState(ALL_APPS)) {
+ // In all-apps only listen if the container cannot scroll itself
+ return mLauncher.getAppsView().shouldContainerScroll(ev);
+ } else if (mLauncher.isInState(NORMAL)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ protected LauncherState getTargetState(LauncherState fromState, boolean isDragTowardPositive) {
+ if (fromState == ALL_APPS && !isDragTowardPositive) {
+ return NORMAL;
+ } else if (isDragTowardPositive) {
+ return ALL_APPS;
+ }
+ return fromState;
+ }
+
+ @Override
+ protected int getLogContainerTypeForNormalState() {
+ return LauncherLogProto.ContainerType.WORKSPACE;
+ }
+}
diff --git a/go/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java b/go/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java
index 283e349..6144d69 100644
--- a/go/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java
+++ b/go/quickstep/src/com/android/launcher3/uioverrides/OverviewState.java
@@ -33,9 +33,6 @@
*/
public class OverviewState extends LauncherState {
- // TODO: Remove this when we refactor BackgroundAppState
- protected static final Rect sTempRect = new Rect();
-
private static final int STATE_FLAGS = FLAG_WORKSPACE_ICONS_CAN_BE_DRAGGED
| FLAG_DISABLE_RESTORE | FLAG_OVERVIEW_UI | FLAG_DISABLE_ACCESSIBILITY;
diff --git a/go/quickstep/src/com/android/launcher3/uioverrides/RecentsUiFactory.java b/go/quickstep/src/com/android/launcher3/uioverrides/RecentsUiFactory.java
index 7381574..12f5360 100644
--- a/go/quickstep/src/com/android/launcher3/uioverrides/RecentsUiFactory.java
+++ b/go/quickstep/src/com/android/launcher3/uioverrides/RecentsUiFactory.java
@@ -44,7 +44,7 @@
list.add(launcher.getDragController());
if (launcher.getDeviceProfile().isVerticalBarLayout()) {
- list.add(new OverviewToAllAppsTouchController(launcher));
+ list.add(new LandscapeStatesTouchController(launcher));
list.add(new LandscapeEdgeSwipeController(launcher));
} else {
boolean allowDragToOverview = OverviewInteractionState.INSTANCE.get(launcher)
diff --git a/go/quickstep/src/com/android/quickstep/LauncherActivityControllerHelper.java b/go/quickstep/src/com/android/quickstep/LauncherActivityControllerHelper.java
new file mode 100644
index 0000000..e1df3ba
--- /dev/null
+++ b/go/quickstep/src/com/android/quickstep/LauncherActivityControllerHelper.java
@@ -0,0 +1,201 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.quickstep;
+
+import static com.android.launcher3.LauncherState.OVERVIEW;
+
+import android.app.ActivityManager;
+import android.content.Context;
+import android.graphics.Rect;
+
+import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.Launcher;
+import com.android.launcher3.LauncherAppState;
+import com.android.launcher3.LauncherInitListener;
+import com.android.launcher3.LauncherState;
+import com.android.launcher3.anim.AnimatorPlaybackController;
+import com.android.launcher3.dragndrop.DragLayer;
+import com.android.launcher3.userevent.nano.LauncherLogProto;
+import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
+import com.android.quickstep.util.TransformedRect;
+import com.android.quickstep.views.IconRecentsView;
+import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
+
+import java.util.function.BiPredicate;
+import java.util.function.Consumer;
+
+/**
+ * {@link ActivityControlHelper} for the in-launcher recents. As Go does not support most gestures
+ * from app to overview/home, most of this class is stubbed out.
+ * TODO: Implement the app to overview animation functionality
+ */
+public final class LauncherActivityControllerHelper implements ActivityControlHelper<Launcher>{
+
+ @Override
+ public LayoutListener createLayoutListener(Launcher activity) {
+ // Go does not have draggable task snapshots.
+ return null;
+ }
+
+ @Override
+ public void onQuickInteractionStart(Launcher activity, ActivityManager.RunningTaskInfo taskInfo,
+ boolean activityVisible, TouchInteractionLog touchInteractionLog) {
+ // Go does not have quick interactions.
+ }
+
+ @Override
+ public float getTranslationYForQuickScrub(TransformedRect targetRect, DeviceProfile dp,
+ Context context) {
+ // Go does not have quick scrub.
+ return 0;
+ }
+
+ @Override
+ public void executeOnWindowAvailable(Launcher activity, Runnable action) {
+ // Go does not support live tiles.
+ }
+
+ @Override
+ public void onTransitionCancelled(Launcher activity, boolean activityVisible) {
+ LauncherState startState = activity.getStateManager().getRestState();
+ activity.getStateManager().goToState(startState, activityVisible);
+ }
+
+ @Override
+ public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context,
+ int interactionType, TransformedRect outRect) {
+ // TODO Implement outRect depending on where the task should animate to.
+ // Go does not support swipe up gesture.
+ return 0;
+ }
+
+ @Override
+ public void onSwipeUpComplete(Launcher activity) {
+ // Go does not support swipe up gesture.
+ }
+
+ @Override
+ public HomeAnimationFactory prepareHomeUI(Launcher activity) {
+ // Go does not support gestures from app to home.
+ return null;
+ }
+
+ @Override
+ public AnimationFactory prepareRecentsUI(Launcher activity,
+ boolean activityVisible, boolean animateActivity,
+ Consumer<AnimatorPlaybackController> callback) {
+ //TODO: Implement this based off where the recents view needs to be for app => recents anim.
+ return new AnimationFactory() {
+ @Override
+ public void createActivityController(long transitionLength,
+ @TouchConsumer.InteractionType int interactionType) {}
+
+ @Override
+ public void onTransitionCancelled() {}
+ };
+ }
+
+ @Override
+ public ActivityInitListener createActivityInitListener(
+ BiPredicate<Launcher, Boolean> onInitListener) {
+ return new LauncherInitListener(onInitListener);
+ }
+
+ @Override
+ public Launcher getCreatedActivity() {
+ LauncherAppState app = LauncherAppState.getInstanceNoCreate();
+ if (app == null) {
+ return null;
+ }
+ return (Launcher) app.getModel().getCallback();
+ }
+
+ private Launcher getVisibleLauncher() {
+ Launcher launcher = getCreatedActivity();
+ return (launcher != null) && launcher.isStarted() && launcher.hasWindowFocus() ?
+ launcher : null;
+ }
+
+ @Override
+ public IconRecentsView getVisibleRecentsView() {
+ Launcher launcher = getVisibleLauncher();
+ return launcher != null && launcher.getStateManager().getState().overviewUi
+ ? launcher.getOverviewPanel() : null;
+ }
+
+ @Override
+ public boolean switchToRecentsIfVisible(boolean fromRecentsButton) {
+ Launcher launcher = getVisibleLauncher();
+ if (launcher == null) {
+ return false;
+ }
+ if (fromRecentsButton) {
+ launcher.getUserEventDispatcher().logActionCommand(
+ LauncherLogProto.Action.Command.RECENTS_BUTTON,
+ getContainerType(),
+ LauncherLogProto.ContainerType.TASKSWITCHER);
+ }
+ launcher.getStateManager().goToState(OVERVIEW);
+ return true;
+ }
+
+ @Override
+ public Rect getOverviewWindowBounds(Rect homeBounds, RemoteAnimationTargetCompat target) {
+ return homeBounds;
+ }
+
+ @Override
+ public boolean shouldMinimizeSplitScreen() {
+ return true;
+ }
+
+ @Override
+ public boolean deferStartingActivity(int downHitTarget) {
+ // Go only supports back to overview so we always defer starting activity.
+ return true;
+ }
+
+ @Override
+ public boolean supportsLongSwipe(Launcher activity) {
+ // Go does not support long swipe from the app.
+ return false;
+ }
+
+ @Override
+ public AlphaProperty getAlphaProperty(Launcher activity) {
+ return activity.getDragLayer().getAlphaProperty(DragLayer.ALPHA_INDEX_SWIPE_UP);
+ }
+
+ @Override
+ public LongSwipeHelper getLongSwipeController(Launcher activity, int runningTaskId) {
+ // Go does not support long swipe from the app.
+ return null;
+ }
+
+ @Override
+ public int getContainerType() {
+ final Launcher launcher = getVisibleLauncher();
+ return launcher != null ? launcher.getStateManager().getState().containerType
+ : LauncherLogProto.ContainerType.APP;
+ }
+
+ @Override
+ public boolean isInLiveTileMode() {
+ // Go does not support live tiles.
+ return false;
+ }
+}
diff --git a/gradle.properties b/gradle.properties
index e31f59e..5b90f08 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -10,4 +10,4 @@
PROTOBUF_DEPENDENCY=com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7
BUILD_TOOLS_VERSION=28.0.3
-COMPILE_SDK=28
\ No newline at end of file
+COMPILE_SDK=android-Q
\ No newline at end of file
diff --git a/iconloaderlib/build.gradle b/iconloaderlib/build.gradle
index 4fd3189..49d427e 100644
--- a/iconloaderlib/build.gradle
+++ b/iconloaderlib/build.gradle
@@ -11,7 +11,7 @@
apply plugin: 'com.android.library'
android {
- compileSdkVersion COMPILE_SDK.toInteger()
+ compileSdkVersion COMPILE_SDK
buildToolsVersion BUILD_TOOLS_VERSION
publishNonDefault true
diff --git a/quickstep/src/com/android/launcher3/uioverrides/BackgroundAppState.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/BackgroundAppState.java
similarity index 100%
rename from quickstep/src/com/android/launcher3/uioverrides/BackgroundAppState.java
rename to quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/BackgroundAppState.java
diff --git a/quickstep/src/com/android/launcher3/uioverrides/FastOverviewState.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/FastOverviewState.java
similarity index 100%
rename from quickstep/src/com/android/launcher3/uioverrides/FastOverviewState.java
rename to quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/FastOverviewState.java
diff --git a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/FlingAndHoldTouchController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/FlingAndHoldTouchController.java
index fb83cd3..b37c2e0 100644
--- a/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/FlingAndHoldTouchController.java
+++ b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/FlingAndHoldTouchController.java
@@ -57,7 +57,7 @@
@Override
public boolean onDrag(float displacement) {
- mMotionPauseDetector.addPosition(displacement);
+ mMotionPauseDetector.addPosition(displacement, 0);
return super.onDrag(displacement);
}
diff --git a/quickstep/src/com/android/launcher3/uioverrides/OverviewToAllAppsTouchController.java b/quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/OverviewToAllAppsTouchController.java
similarity index 100%
rename from quickstep/src/com/android/launcher3/uioverrides/OverviewToAllAppsTouchController.java
rename to quickstep/recents_ui_overrides/src/com/android/launcher3/uioverrides/OverviewToAllAppsTouchController.java
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
new file mode 100644
index 0000000..af25355
--- /dev/null
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
@@ -0,0 +1,454 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.quickstep;
+
+import static android.view.View.TRANSLATION_Y;
+
+import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
+import static com.android.launcher3.LauncherState.BACKGROUND_APP;
+import static com.android.launcher3.LauncherState.FAST_OVERVIEW;
+import static com.android.launcher3.LauncherState.NORMAL;
+import static com.android.launcher3.LauncherState.OVERVIEW;
+import static com.android.launcher3.allapps.AllAppsTransitionController.SPRING_DAMPING_RATIO;
+import static com.android.launcher3.allapps.AllAppsTransitionController.SPRING_STIFFNESS;
+import static com.android.launcher3.anim.Interpolators.LINEAR;
+import static com.android.launcher3.states.RotationHelper.REQUEST_LOCK;
+import static com.android.quickstep.TouchConsumer.INTERACTION_NORMAL;
+import static com.android.quickstep.TouchConsumer.INTERACTION_QUICK_SCRUB;
+import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_BACK;
+import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_ROTATION;
+
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
+import android.app.ActivityManager.RunningTaskInfo;
+import android.content.Context;
+import android.graphics.Rect;
+import android.graphics.RectF;
+import android.view.View;
+import android.view.animation.Interpolator;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.UiThread;
+
+import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.Launcher;
+import com.android.launcher3.LauncherAppState;
+import com.android.launcher3.LauncherInitListener;
+import com.android.launcher3.LauncherState;
+import com.android.launcher3.R;
+import com.android.launcher3.TestProtocol;
+import com.android.launcher3.allapps.DiscoveryBounce;
+import com.android.launcher3.anim.AnimatorPlaybackController;
+import com.android.launcher3.anim.SpringObjectAnimator;
+import com.android.launcher3.compat.AccessibilityManagerCompat;
+import com.android.launcher3.config.FeatureFlags;
+import com.android.launcher3.dragndrop.DragLayer;
+import com.android.launcher3.uioverrides.FastOverviewState;
+import com.android.launcher3.userevent.nano.LauncherLogProto;
+import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
+import com.android.quickstep.TouchConsumer.InteractionType;
+import com.android.quickstep.util.ClipAnimationHelper;
+import com.android.quickstep.util.LayoutUtils;
+import com.android.quickstep.util.TransformedRect;
+import com.android.quickstep.views.LauncherLayoutListener;
+import com.android.quickstep.views.RecentsView;
+import com.android.quickstep.views.TaskView;
+import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
+
+import java.util.function.BiPredicate;
+import java.util.function.Consumer;
+
+/**
+ * {@link ActivityControlHelper} for the in-launcher recents.
+ */
+public final class LauncherActivityControllerHelper implements ActivityControlHelper<Launcher> {
+
+ @Override
+ public LayoutListener createLayoutListener(Launcher activity) {
+ return LauncherLayoutListener.resetAndGet(activity);
+ }
+
+ @Override
+ public void onQuickInteractionStart(Launcher activity, RunningTaskInfo taskInfo,
+ boolean activityVisible, TouchInteractionLog touchInteractionLog) {
+ LauncherState fromState = activity.getStateManager().getState();
+ QuickScrubController controller = activity.<RecentsView>getOverviewPanel()
+ .getQuickScrubController();
+ boolean isQuickSwitch = controller.isQuickSwitch();
+ boolean animate = activityVisible;
+ if (isQuickSwitch && fromState == FAST_OVERVIEW && !animate) {
+ // We can already be in FAST_OVERVIEW if createActivityController() was called
+ // before us. This could happen, for instance, when launcher is slow to load when
+ // starting quick switch, causing us to call onQuickScrubStart() on the background
+ // thread. In this case, we also hadn't set isQuickSwitch = true before setting
+ // FAST_OVERVIEW, so we need to reapply FAST_OVERVIEW to take that into account.
+ activity.getStateManager().reapplyState();
+ } else {
+ activity.getStateManager().goToState(FAST_OVERVIEW, animate);
+ }
+
+ controller.onQuickScrubStart(activityVisible && !fromState.overviewUi, this,
+ touchInteractionLog);
+
+ if (!activityVisible) {
+ // For the duration of the gesture, lock the screen orientation to ensure that we
+ // do not rotate mid-quickscrub
+ activity.getRotationHelper().setStateHandlerRequest(REQUEST_LOCK);
+ }
+ }
+
+ @Override
+ public float getTranslationYForQuickScrub(TransformedRect targetRect, DeviceProfile dp,
+ Context context) {
+ // The padding calculations are exactly same as that of RecentsView.setInsets
+ int topMargin = context.getResources()
+ .getDimensionPixelSize(R.dimen.task_thumbnail_top_margin);
+ int paddingTop = targetRect.rect.top - topMargin - dp.getInsets().top;
+ int paddingBottom = dp.heightPx - dp.getInsets().bottom - targetRect.rect.bottom;
+
+ return FastOverviewState.OVERVIEW_TRANSLATION_FACTOR * (paddingBottom - paddingTop);
+ }
+
+ @Override
+ public void executeOnWindowAvailable(Launcher activity, Runnable action) {
+ activity.getWorkspace().runOnOverlayHidden(action);
+ }
+
+ @Override
+ public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context,
+ @InteractionType int interactionType, TransformedRect outRect) {
+ LayoutUtils.calculateLauncherTaskSize(context, dp, outRect.rect);
+ if (interactionType == INTERACTION_QUICK_SCRUB) {
+ outRect.scale = FastOverviewState.getOverviewScale(dp, outRect.rect, context,
+ FeatureFlags.QUICK_SWITCH.get());
+ }
+ if (dp.isVerticalBarLayout()) {
+ Rect targetInsets = dp.getInsets();
+ int hotseatInset = dp.isSeascape() ? targetInsets.left : targetInsets.right;
+ return dp.hotseatBarSizePx + hotseatInset;
+ } else {
+ return LayoutUtils.getShelfTrackingDistance(context, dp);
+ }
+ }
+
+ @Override
+ public void onTransitionCancelled(Launcher activity, boolean activityVisible) {
+ LauncherState startState = activity.getStateManager().getRestState();
+ activity.getStateManager().goToState(startState, activityVisible);
+ }
+
+ @Override
+ public void onSwipeUpComplete(Launcher activity) {
+ // Re apply state in case we did something funky during the transition.
+ activity.getStateManager().reapplyState();
+ DiscoveryBounce.showForOverviewIfNeeded(activity);
+ }
+
+ @NonNull
+ @Override
+ public HomeAnimationFactory prepareHomeUI(Launcher activity) {
+ DeviceProfile dp = activity.getDeviceProfile();
+
+ return new HomeAnimationFactory() {
+ @NonNull
+ @Override
+ public RectF getWindowTargetRect() {
+ int halfIconSize = dp.iconSizePx / 2;
+ float targetCenterX = dp.availableWidthPx / 2;
+ float targetCenterY = dp.availableHeightPx - dp.hotseatBarSizePx;
+ return new RectF(targetCenterX - halfIconSize, targetCenterY - halfIconSize,
+ targetCenterX + halfIconSize, targetCenterY + halfIconSize);
+ }
+
+ @NonNull
+ @Override
+ public Animator createActivityAnimationToHome() {
+ long accuracy = 2 * Math.max(dp.widthPx, dp.heightPx);
+ return activity.getStateManager().createAnimationToNewWorkspace(
+ NORMAL, accuracy).getTarget();
+ }
+ };
+ }
+
+ @Override
+ public AnimationFactory prepareRecentsUI(Launcher activity, boolean activityVisible,
+ boolean animateActivity, Consumer<AnimatorPlaybackController> callback) {
+ final LauncherState startState = activity.getStateManager().getState();
+
+ LauncherState resetState = startState;
+ if (startState.disableRestore) {
+ resetState = activity.getStateManager().getRestState();
+ }
+ activity.getStateManager().setRestState(resetState);
+
+ final LauncherState fromState;
+ if (!activityVisible) {
+ // Since the launcher is not visible, we can safely reset the scroll position.
+ // This ensures then the next swipe up to all-apps starts from scroll 0.
+ activity.getAppsView().reset(false /* animate */);
+ fromState = animateActivity ? BACKGROUND_APP : OVERVIEW;
+ activity.getStateManager().goToState(fromState, false);
+
+ // Optimization, hide the all apps view to prevent layout while initializing
+ activity.getAppsView().getContentView().setVisibility(View.GONE);
+
+ AccessibilityManagerCompat.sendEventToTest(
+ activity, TestProtocol.SWITCHED_TO_STATE_MESSAGE);
+ } else {
+ fromState = startState;
+ }
+
+ return new AnimationFactory() {
+ private Animator mShelfAnim;
+ private ShelfAnimState mShelfState;
+
+ @Override
+ public void createActivityController(long transitionLength,
+ @InteractionType int interactionType) {
+ createActivityControllerInternal(activity, activityVisible, fromState,
+ transitionLength, interactionType, callback);
+ }
+
+ @Override
+ public void onTransitionCancelled() {
+ activity.getStateManager().goToState(startState, false /* animate */);
+ }
+
+ @Override
+ public void setShelfState(ShelfAnimState shelfState, Interpolator interpolator,
+ long duration) {
+ if (mShelfState == shelfState) {
+ return;
+ }
+ mShelfState = shelfState;
+ if (mShelfAnim != null) {
+ mShelfAnim.cancel();
+ }
+ if (mShelfState == ShelfAnimState.CANCEL) {
+ return;
+ }
+ float shelfHiddenProgress = BACKGROUND_APP.getVerticalProgress(activity);
+ float shelfOverviewProgress = OVERVIEW.getVerticalProgress(activity);
+ float shelfPeekingProgress = shelfHiddenProgress
+ - (shelfHiddenProgress - shelfOverviewProgress) * 0.25f;
+ float toProgress = mShelfState == ShelfAnimState.HIDE
+ ? shelfHiddenProgress
+ : mShelfState == ShelfAnimState.PEEK
+ ? shelfPeekingProgress
+ : shelfOverviewProgress;
+ mShelfAnim = createShelfAnim(activity, toProgress);
+ mShelfAnim.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ mShelfAnim = null;
+ }
+ });
+ mShelfAnim.setInterpolator(interpolator);
+ mShelfAnim.setDuration(duration);
+ mShelfAnim.start();
+ }
+ };
+ }
+
+ private void createActivityControllerInternal(Launcher activity, boolean wasVisible,
+ LauncherState fromState, long transitionLength,
+ @InteractionType int interactionType,
+ Consumer<AnimatorPlaybackController> callback) {
+ LauncherState endState = interactionType == INTERACTION_QUICK_SCRUB
+ ? FAST_OVERVIEW : OVERVIEW;
+ if (wasVisible && fromState != BACKGROUND_APP) {
+ // If a translucent app was launched fom launcher, animate launcher states.
+ DeviceProfile dp = activity.getDeviceProfile();
+ long accuracy = 2 * Math.max(dp.widthPx, dp.heightPx);
+ callback.accept(activity.getStateManager()
+ .createAnimationToNewWorkspace(fromState, endState, accuracy));
+ return;
+ }
+ if (fromState == endState) {
+ return;
+ }
+
+ AnimatorSet anim = new AnimatorSet();
+ if (!activity.getDeviceProfile().isVerticalBarLayout()
+ && !FeatureFlags.SWIPE_HOME.get()) {
+ // Don't animate the shelf when SWIPE_HOME is true, because we update it atomically.
+ Animator shiftAnim = createShelfAnim(activity,
+ fromState.getVerticalProgress(activity),
+ endState.getVerticalProgress(activity));
+ anim.play(shiftAnim);
+ }
+
+ if (interactionType == INTERACTION_NORMAL) {
+ playScaleDownAnim(anim, activity, endState);
+ }
+
+ anim.setDuration(transitionLength * 2);
+ activity.getStateManager().setCurrentAnimation(anim);
+ AnimatorPlaybackController controller =
+ AnimatorPlaybackController.wrap(anim, transitionLength * 2);
+
+ // Since we are changing the start position of the UI, reapply the state, at the end
+ controller.setEndAction(() -> {
+ activity.getStateManager().goToState(
+ controller.getInterpolatedProgress() > 0.5 ? endState : fromState, false);
+ });
+ callback.accept(controller);
+ }
+
+ private Animator createShelfAnim(Launcher activity, float ... progressValues) {
+ Animator shiftAnim = new SpringObjectAnimator<>(activity.getAllAppsController(),
+ "allAppsSpringFromACH", activity.getAllAppsController().getShiftRange(),
+ SPRING_DAMPING_RATIO, SPRING_STIFFNESS, progressValues);
+ shiftAnim.setInterpolator(LINEAR);
+ return shiftAnim;
+ }
+
+ /**
+ * Scale down recents from the center task being full screen to being in overview.
+ */
+ private void playScaleDownAnim(AnimatorSet anim, Launcher launcher,
+ LauncherState endState) {
+ RecentsView recentsView = launcher.getOverviewPanel();
+ TaskView v = recentsView.getTaskViewAt(recentsView.getCurrentPage());
+ if (v == null) {
+ return;
+ }
+
+ // Setup the clip animation helper source/target rects in the final transformed state
+ // of the recents view (a scale/translationY may be applied prior to this animation
+ // starting to line up the side pages during swipe up)
+ float prevRvScale = recentsView.getScaleX();
+ float prevRvTransY = recentsView.getTranslationY();
+ float targetRvScale = endState.getOverviewScaleAndTranslationYFactor(launcher)[0];
+ SCALE_PROPERTY.set(recentsView, targetRvScale);
+ recentsView.setTranslationY(0);
+ ClipAnimationHelper clipHelper = new ClipAnimationHelper(launcher);
+ clipHelper.fromTaskThumbnailView(v.getThumbnail(), (RecentsView) v.getParent(), null);
+ SCALE_PROPERTY.set(recentsView, prevRvScale);
+ recentsView.setTranslationY(prevRvTransY);
+
+ if (!clipHelper.getSourceRect().isEmpty() && !clipHelper.getTargetRect().isEmpty()) {
+ float fromScale = clipHelper.getSourceRect().width()
+ / clipHelper.getTargetRect().width();
+ float fromTranslationY = clipHelper.getSourceRect().centerY()
+ - clipHelper.getTargetRect().centerY();
+ Animator scale = ObjectAnimator.ofFloat(recentsView, SCALE_PROPERTY, fromScale, 1);
+ Animator translateY = ObjectAnimator.ofFloat(recentsView, TRANSLATION_Y,
+ fromTranslationY, 0);
+ scale.setInterpolator(LINEAR);
+ translateY.setInterpolator(LINEAR);
+ anim.playTogether(scale, translateY);
+ }
+ }
+
+ @Override
+ public ActivityInitListener createActivityInitListener(
+ BiPredicate<Launcher, Boolean> onInitListener) {
+ return new LauncherInitListener(onInitListener);
+ }
+
+ @Nullable
+ @Override
+ public Launcher getCreatedActivity() {
+ LauncherAppState app = LauncherAppState.getInstanceNoCreate();
+ if (app == null) {
+ return null;
+ }
+ return (Launcher) app.getModel().getCallback();
+ }
+
+ @Nullable
+ @UiThread
+ private Launcher getVisibleLauncher() {
+ Launcher launcher = getCreatedActivity();
+ return (launcher != null) && launcher.isStarted() && launcher.hasWindowFocus() ?
+ launcher : null;
+ }
+
+ @Nullable
+ @Override
+ public RecentsView getVisibleRecentsView() {
+ Launcher launcher = getVisibleLauncher();
+ return launcher != null && launcher.getStateManager().getState().overviewUi
+ ? launcher.getOverviewPanel() : null;
+ }
+
+ @Override
+ public boolean switchToRecentsIfVisible(boolean fromRecentsButton) {
+ Launcher launcher = getVisibleLauncher();
+ if (launcher == null) {
+ return false;
+ }
+ if (fromRecentsButton) {
+ launcher.getUserEventDispatcher().logActionCommand(
+ LauncherLogProto.Action.Command.RECENTS_BUTTON,
+ getContainerType(),
+ LauncherLogProto.ContainerType.TASKSWITCHER);
+ }
+ launcher.getStateManager().goToState(OVERVIEW);
+ return true;
+ }
+
+ @Override
+ public boolean deferStartingActivity(int downHitTarget) {
+ return downHitTarget == HIT_TARGET_BACK || downHitTarget == HIT_TARGET_ROTATION;
+ }
+
+ @Override
+ public Rect getOverviewWindowBounds(Rect homeBounds, RemoteAnimationTargetCompat target) {
+ return homeBounds;
+ }
+
+ @Override
+ public boolean shouldMinimizeSplitScreen() {
+ return true;
+ }
+
+ @Override
+ public boolean supportsLongSwipe(Launcher activity) {
+ return !activity.getDeviceProfile().isVerticalBarLayout();
+ }
+
+ @Override
+ public LongSwipeHelper getLongSwipeController(Launcher activity, int runningTaskId) {
+ if (activity.getDeviceProfile().isVerticalBarLayout()) {
+ return null;
+ }
+ return new LongSwipeHelper(activity, runningTaskId);
+ }
+
+ @Override
+ public AlphaProperty getAlphaProperty(Launcher activity) {
+ return activity.getDragLayer().getAlphaProperty(DragLayer.ALPHA_INDEX_SWIPE_UP);
+ }
+
+ @Override
+ public int getContainerType() {
+ final Launcher launcher = getVisibleLauncher();
+ return launcher != null ? launcher.getStateManager().getState().containerType
+ : LauncherLogProto.ContainerType.APP;
+ }
+
+ @Override
+ public boolean isInLiveTileMode() {
+ Launcher launcher = getCreatedActivity();
+ return launcher != null && launcher.getStateManager().getState() == OVERVIEW &&
+ launcher.isStarted();
+ }
+}
\ No newline at end of file
diff --git a/quickstep/res/layout/overview_clear_all_button.xml b/quickstep/res/layout/overview_clear_all_button.xml
index ea7a494..fc06ba0 100644
--- a/quickstep/res/layout/overview_clear_all_button.xml
+++ b/quickstep/res/layout/overview_clear_all_button.xml
@@ -17,6 +17,7 @@
<com.android.quickstep.views.ClearAllButton
xmlns:android="http://schemas.android.com/apk/res/android"
style="@android:style/Widget.DeviceDefault.Button.Borderless"
+ android:id="@+id/clear_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/recents_clear_all"
diff --git a/quickstep/res/values-af/strings.xml b/quickstep/res/values-af/strings.xml
index 5ce3c0d..336eef8 100644
--- a/quickstep/res/values-af/strings.xml
+++ b/quickstep/res/values-af/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Programgebruikinstellings"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Vee alles uit"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Onlangse programme"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minuut"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Program in grysskaal"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> oor vandag"</string>
</resources>
diff --git a/quickstep/res/values-am/strings.xml b/quickstep/res/values-am/strings.xml
index 99dc137..8a565e4 100644
--- a/quickstep/res/values-am/strings.xml
+++ b/quickstep/res/values-am/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"የመተግበሪያ አጠቃቀም ቅንብሮች"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"ሁሉንም አጽዳ"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"የቅርብ ጊዜ መተግበሪያዎች"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>፣ <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 ደቂቃ"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"መተግበሪያ በግራጫ"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"ዛሬ <xliff:g id="TIME">%1$s</xliff:g> ቀርቷል"</string>
</resources>
diff --git a/quickstep/res/values-ar/strings.xml b/quickstep/res/values-ar/strings.xml
index 808082e..d96397c 100644
--- a/quickstep/res/values-ar/strings.xml
+++ b/quickstep/res/values-ar/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"إعدادات استخدام التطبيق"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"محو الكل"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"التطبيقات التي تمّ استخدامها مؤخرًا"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>، <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"أقل من دقيقة"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"التطبيق بالتدرّج الرمادي"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"يتبقى اليوم <xliff:g id="TIME">%1$s</xliff:g>."</string>
</resources>
diff --git a/quickstep/res/values-as/strings.xml b/quickstep/res/values-as/strings.xml
index eac2878..7216b4f 100644
--- a/quickstep/res/values-as/strings.xml
+++ b/quickstep/res/values-as/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"এপে ব্যৱহাৰ কৰা ডেটাৰ ছেটিংসমূহ"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"সকলো মচক"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"শেহতীয়া এপসমূহ"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< ১ মিনিট"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"এপ্ গ্ৰে’স্কে’লত আছে"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"আজি <xliff:g id="TIME">%1$s</xliff:g> বাকী আছ"</string>
</resources>
diff --git a/quickstep/res/values-az/strings.xml b/quickstep/res/values-az/strings.xml
index d707108..c07098e 100644
--- a/quickstep/res/values-az/strings.xml
+++ b/quickstep/res/values-az/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Tətbiq istifadə ayarları"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Hamısını silin"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Son tətbiqlər"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 dəq"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Tətbiq ağ-qara rejimdədir"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Bu gün <xliff:g id="TIME">%1$s</xliff:g> qaldı"</string>
</resources>
diff --git a/quickstep/res/values-b+sr+Latn/strings.xml b/quickstep/res/values-b+sr+Latn/strings.xml
index fd449b8..6fea458 100644
--- a/quickstep/res/values-b+sr+Latn/strings.xml
+++ b/quickstep/res/values-b+sr+Latn/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Podešavanja korišćenja aplikacije"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Obriši sve"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Nedavne aplikacije"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Aplikacija je u sivilu"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Još <xliff:g id="TIME">%1$s</xliff:g> danas"</string>
</resources>
diff --git a/quickstep/res/values-be/strings.xml b/quickstep/res/values-be/strings.xml
index fa1f28e..8147031 100644
--- a/quickstep/res/values-be/strings.xml
+++ b/quickstep/res/values-be/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Налады выкарыстання праграмы"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Ачысціць усё"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Нядаўнія праграмы"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 хв"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Праграма ў шэрым рэжыме"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Сёння засталося <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-bg/strings.xml b/quickstep/res/values-bg/strings.xml
index 0f817ac..00ba582 100644
--- a/quickstep/res/values-bg/strings.xml
+++ b/quickstep/res/values-bg/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Настройки за използването на приложенията"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Изчистване на всички"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Скорошни приложения"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 мин"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Прилож. е в сивата скала"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Оставащо време днес: <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-bn/strings.xml b/quickstep/res/values-bn/strings.xml
index c7342f3..9a30adf 100644
--- a/quickstep/res/values-bn/strings.xml
+++ b/quickstep/res/values-bn/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"অ্যাপ ব্যবহারের সেটিংস"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"সবকিছু খালি করুন"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"সম্প্রতি ব্যবহৃত অ্যাপ"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< ১ মি."</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"অ্যাপে গ্রেস্কেল"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"আজকে <xliff:g id="TIME">%1$s</xliff:g> বাকি আছে"</string>
</resources>
diff --git a/quickstep/res/values-bs/strings.xml b/quickstep/res/values-bs/strings.xml
index d0d0aa6..e940616 100644
--- a/quickstep/res/values-bs/strings.xml
+++ b/quickstep/res/values-bs/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Postavke korištenja aplikacije"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Obriši sve"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Nedavne aplikacije"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Apl. je u nijansi sive"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Preostalo vrijeme: <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-ca/strings.xml b/quickstep/res/values-ca/strings.xml
index 5bdd67d..d120a2c 100644
--- a/quickstep/res/values-ca/strings.xml
+++ b/quickstep/res/values-ca/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Configuració d\'ús d\'aplicacions"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Esborra-ho tot"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Aplicacions recents"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>; <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minut"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App en escala de grisos"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"temps restant avui: <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-cs/strings.xml b/quickstep/res/values-cs/strings.xml
index 5fe7088..435edd9 100644
--- a/quickstep/res/values-cs/strings.xml
+++ b/quickstep/res/values-cs/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Nastavení využití aplikací"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Vymazat vše"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Poslední aplikace"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minuta"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Aplikace se zešednutím"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"dnes zbývá: <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-da/strings.xml b/quickstep/res/values-da/strings.xml
index 4c3ec59..3db6ab3 100644
--- a/quickstep/res/values-da/strings.xml
+++ b/quickstep/res/values-da/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Indstillinger for appforbrug"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Ryd alt"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Seneste apps"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Nedtonet app"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> tilbage i dag"</string>
</resources>
diff --git a/quickstep/res/values-de/strings.xml b/quickstep/res/values-de/strings.xml
index fb428f7..48604f1 100644
--- a/quickstep/res/values-de/strings.xml
+++ b/quickstep/res/values-de/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Einstellungen zur App-Nutzung"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Alle Apps schließen"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Zuletzt aktive Apps"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App in Graustufen"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Heute noch <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-el/strings.xml b/quickstep/res/values-el/strings.xml
index 54d4677..fdc7464 100644
--- a/quickstep/res/values-el/strings.xml
+++ b/quickstep/res/values-el/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Ρυθμίσεις χρήσης εφαρμογής"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Διαγραφή όλων"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Πρόσφατες εφαρμογές"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 λ."</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Εφαρ. σε κλίμακα του γκρι"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Απομένουν <xliff:g id="TIME">%1$s</xliff:g> σήμερα"</string>
</resources>
diff --git a/quickstep/res/values-en-rAU/strings.xml b/quickstep/res/values-en-rAU/strings.xml
index df2fee8..d625b60 100644
--- a/quickstep/res/values-en-rAU/strings.xml
+++ b/quickstep/res/values-en-rAU/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"App usage settings"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Clear all"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Recent apps"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minute"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App in grayscale"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> left today"</string>
</resources>
diff --git a/quickstep/res/values-en-rGB/strings.xml b/quickstep/res/values-en-rGB/strings.xml
index df2fee8..d625b60 100644
--- a/quickstep/res/values-en-rGB/strings.xml
+++ b/quickstep/res/values-en-rGB/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"App usage settings"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Clear all"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Recent apps"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minute"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App in grayscale"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> left today"</string>
</resources>
diff --git a/quickstep/res/values-en-rIN/strings.xml b/quickstep/res/values-en-rIN/strings.xml
index df2fee8..d625b60 100644
--- a/quickstep/res/values-en-rIN/strings.xml
+++ b/quickstep/res/values-en-rIN/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"App usage settings"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Clear all"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Recent apps"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minute"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App in grayscale"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> left today"</string>
</resources>
diff --git a/quickstep/res/values-es-rUS/strings.xml b/quickstep/res/values-es-rUS/strings.xml
index 9d98d6b..a9d303a 100644
--- a/quickstep/res/values-es-rUS/strings.xml
+++ b/quickstep/res/values-es-rUS/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Configuración de uso de la app"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Borrar todo"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Apps recientes"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g> (<xliff:g id="REMAINING_TIME">%2$s</xliff:g>)"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minuto"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App en escala de grises"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Tiempo restante: <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-es/strings.xml b/quickstep/res/values-es/strings.xml
index b39262b..291512a 100644
--- a/quickstep/res/values-es/strings.xml
+++ b/quickstep/res/values-es/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Ajustes de uso de la aplicación"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Borrar todo"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Aplicaciones recientes"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g> (<xliff:g id="REMAINING_TIME">%2$s</xliff:g>)"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"<1 minuto"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App en escala de grises"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"tiempo restante: <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-et/strings.xml b/quickstep/res/values-et/strings.xml
index 9b859fd..96c27e7 100644
--- a/quickstep/res/values-et/strings.xml
+++ b/quickstep/res/values-et/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Rakenduse kasutuse seaded"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Sule kõik"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Hiljutised rakendused"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g> <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minut"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Rakendus halltoonides"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Tääna jäänud <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-eu/strings.xml b/quickstep/res/values-eu/strings.xml
index 096a849..15b682c 100644
--- a/quickstep/res/values-eu/strings.xml
+++ b/quickstep/res/values-eu/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Aplikazioen erabileraren ezarpenak"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Garbitu guztiak"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Azken aplikazioak"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g> (<xliff:g id="REMAINING_TIME">%2$s</xliff:g>)"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Aplikazioa grisen eskalan"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> gelditzen dira gaur"</string>
</resources>
diff --git a/quickstep/res/values-fa/strings.xml b/quickstep/res/values-fa/strings.xml
index 3ae1bd8..0a482f8 100644
--- a/quickstep/res/values-fa/strings.xml
+++ b/quickstep/res/values-fa/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"تنظیمات استفاده از برنامه"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"پاک کردن همه"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"برنامههای اخیر"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>، <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< ۱ دقیقه"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"برنامه بهصورت سیاهوسفید"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> باقیمانده برای امروز"</string>
</resources>
diff --git a/quickstep/res/values-fi/strings.xml b/quickstep/res/values-fi/strings.xml
index 79c2d6b..69686bb 100644
--- a/quickstep/res/values-fi/strings.xml
+++ b/quickstep/res/values-fi/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Sovelluksen käyttöasetukset"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Poista kaikki"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Viimeisimmät sovellukset"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Harmaasävyinen sovellus"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> jäljellä tänään"</string>
</resources>
diff --git a/quickstep/res/values-fr-rCA/strings.xml b/quickstep/res/values-fr-rCA/strings.xml
index e64985e..068fd08 100644
--- a/quickstep/res/values-fr-rCA/strings.xml
+++ b/quickstep/res/values-fr-rCA/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Paramètres d\'utilisation de l\'application"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Tout effacer"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Applications récentes"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g> : <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Application en nuances de gris"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Il reste <xliff:g id="TIME">%1$s</xliff:g> aujourd\'hui"</string>
</resources>
diff --git a/quickstep/res/values-fr/strings.xml b/quickstep/res/values-fr/strings.xml
index 03b2f68..ea5b0dc 100644
--- a/quickstep/res/values-fr/strings.xml
+++ b/quickstep/res/values-fr/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Paramètres de consommation de l\'application"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Tout effacer"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Applications récentes"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Appli en nuances de gris"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Encore <xliff:g id="TIME">%1$s</xliff:g> aujourd\'hui"</string>
</resources>
diff --git a/quickstep/res/values-gl/strings.xml b/quickstep/res/values-gl/strings.xml
index 2fefd82..a6995d0 100644
--- a/quickstep/res/values-gl/strings.xml
+++ b/quickstep/res/values-gl/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Configuración do uso de aplicacións"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Borrar todo"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Aplicacións recentes"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g> (<xliff:g id="REMAINING_TIME">%2$s</xliff:g>)"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"<1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App en escala de grises"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Tempo restante hoxe <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-gu/strings.xml b/quickstep/res/values-gu/strings.xml
index 2e5fdde..72b70b0 100644
--- a/quickstep/res/values-gu/strings.xml
+++ b/quickstep/res/values-gu/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"ઍપ વપરાશનું સેટિંગ"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"બધું સાફ કરો"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"તાજેતરની ઍપ"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 મિનિટ"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"ગ્રેસ્કેલમાં ઍપ"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> આજે બાકી"</string>
</resources>
diff --git a/quickstep/res/values-hi/strings.xml b/quickstep/res/values-hi/strings.xml
index a1107a2..4d15044 100644
--- a/quickstep/res/values-hi/strings.xml
+++ b/quickstep/res/values-hi/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"ऐप्लिकेशन इस्तेमाल की सेटिंग"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"सभी ऐप्लिकेशन बंद करें"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"हाल ही में इस्तेमाल किए गए एेप्लिकेशन"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"<1 मिनट"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"ग्रेस्केल में ऐप्लिकेशन"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"आज <xliff:g id="TIME">%1$s</xliff:g> और चलेगा"</string>
</resources>
diff --git a/quickstep/res/values-hr/strings.xml b/quickstep/res/values-hr/strings.xml
index f7e0caa..1cec1fb 100644
--- a/quickstep/res/values-hr/strings.xml
+++ b/quickstep/res/values-hr/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Postavke upotrebe aplikacija"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Izbriši sve"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Nedavne aplikacije"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Apl. u nijansama sive"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Još <xliff:g id="TIME">%1$s</xliff:g> danas"</string>
</resources>
diff --git a/quickstep/res/values-hu/strings.xml b/quickstep/res/values-hu/strings.xml
index c2f042c..112c481 100644
--- a/quickstep/res/values-hu/strings.xml
+++ b/quickstep/res/values-hu/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Alkalmazáshasználati beállítások"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Összes törlése"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Legutóbbi alkalmazások"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 perc"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Szürkeárnyalat aktív"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Ma még <xliff:g id="TIME">%1$s</xliff:g> van hátra"</string>
</resources>
diff --git a/quickstep/res/values-hy/strings.xml b/quickstep/res/values-hy/strings.xml
index b8a12c9..f39db5a 100644
--- a/quickstep/res/values-hy/strings.xml
+++ b/quickstep/res/values-hy/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Հավելվածի օգտագործման կարգավորումներ"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Փակել բոլորը"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Վերջին օգտագործած հավելվածները"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 ր"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Մոխրագույն երանգներ"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Այսօր մնացել է՝ <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-in/strings.xml b/quickstep/res/values-in/strings.xml
index 276c144..48892c9 100644
--- a/quickstep/res/values-in/strings.xml
+++ b/quickstep/res/values-in/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Setelan penggunaan aplikasi"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Hapus semua"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Aplikasi baru-baru ini"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 menit"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Aplikasi hitam putih"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> tersisa hari ini"</string>
</resources>
diff --git a/quickstep/res/values-is/strings.xml b/quickstep/res/values-is/strings.xml
index b4fb172..c3ec96c 100644
--- a/quickstep/res/values-is/strings.xml
+++ b/quickstep/res/values-is/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Notkunarstillingar forrits"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Hreinsa allt"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Nýleg forrit"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 mín."</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Forrit í grátónum"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> eftir í dag"</string>
</resources>
diff --git a/quickstep/res/values-it/strings.xml b/quickstep/res/values-it/strings.xml
index c44cc01..d7c57ee 100644
--- a/quickstep/res/values-it/strings.xml
+++ b/quickstep/res/values-it/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Impostazioni di utilizzo delle app"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Cancella tutto"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"App recenti"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App in scala di grigi"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Rimanente oggi: <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-iw/strings.xml b/quickstep/res/values-iw/strings.xml
index f7a0384..0b745cd 100644
--- a/quickstep/res/values-iw/strings.xml
+++ b/quickstep/res/values-iw/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"הגדרות שימוש באפליקציה"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"ניקוי הכול"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"אפליקציות אחרונות"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< דקה"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"האפליקציה בגווני אפור"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"הזמן שנותר להיום: <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-ja/strings.xml b/quickstep/res/values-ja/strings.xml
index fff8a0d..c76c4a6 100644
--- a/quickstep/res/values-ja/strings.xml
+++ b/quickstep/res/values-ja/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"アプリの使用状況の設定"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"すべてクリア"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"最近使ったアプリ"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>、<xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"1 分未満"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"グレースケールのアプリ"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"今日はあと <xliff:g id="TIME">%1$s</xliff:g>です"</string>
</resources>
diff --git a/quickstep/res/values-ka/strings.xml b/quickstep/res/values-ka/strings.xml
index cc0d594..700522f 100644
--- a/quickstep/res/values-ka/strings.xml
+++ b/quickstep/res/values-ka/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"აპების გამოყენების პარამეტრები"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"ყველას გასუფთავება"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"ბოლოდროინდელი აპები"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 წუთი"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"აპი ნაცრისფერ ტონებშია"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"დღეს დარჩენილია <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-kk/strings.xml b/quickstep/res/values-kk/strings.xml
index b0a1b4e..96f8956 100644
--- a/quickstep/res/values-kk/strings.xml
+++ b/quickstep/res/values-kk/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Қолданбаны пайдалану параметрлері"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Барлығын өшіру"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Соңғы пайдаланылған қолданбалар"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 мин"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Сұр түстегі қолданба"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Бүгін <xliff:g id="TIME">%1$s</xliff:g> қалды"</string>
</resources>
diff --git a/quickstep/res/values-km/strings.xml b/quickstep/res/values-km/strings.xml
index 7aa407c..323efdf 100644
--- a/quickstep/res/values-km/strings.xml
+++ b/quickstep/res/values-km/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"ការកំណត់ការប្រើប្រាស់កម្មវិធី"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"សម្អាតទាំងអស់"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"កម្មវិធីថ្មីៗ"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 នាទី"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"កម្មវិធីស្ថិតក្នុងមាត្រដ្ឋានពណ៌ប្រផេះ"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"នៅសល់ <xliff:g id="TIME">%1$s</xliff:g> ទៀតនៅថ្ងៃនេះ"</string>
</resources>
diff --git a/quickstep/res/values-kn/strings.xml b/quickstep/res/values-kn/strings.xml
index e5ac0df..b5e5738 100644
--- a/quickstep/res/values-kn/strings.xml
+++ b/quickstep/res/values-kn/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"ಆ್ಯಪ್ ಬಳಕೆಯ ಸೆಟ್ಟಿಂಗ್ಗಳು"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"ಎಲ್ಲವನ್ನೂ ತೆರವುಗೊಳಿಸಿ"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"ಇತ್ತೀಚಿನ ಅಪ್ಲಿಕೇಶನ್ಗಳು"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 ನಿ"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"ಗ್ರೇಸ್ಕೇಲ್ನಲ್ಲಿ ಆ್ಯಪ್"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"ಇಂದು <xliff:g id="TIME">%1$s</xliff:g> ಸಮಯ ಉಳಿದಿದೆ"</string>
</resources>
diff --git a/quickstep/res/values-ko/strings.xml b/quickstep/res/values-ko/strings.xml
index 8e7dcb1..5daa508 100644
--- a/quickstep/res/values-ko/strings.xml
+++ b/quickstep/res/values-ko/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"앱 사용 설정"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"모두 삭제"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"최근 앱"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1분"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"앱이 그레이 스케일로 전환됨"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"오늘 <xliff:g id="TIME">%1$s</xliff:g> 남음"</string>
</resources>
diff --git a/quickstep/res/values-ky/strings.xml b/quickstep/res/values-ky/strings.xml
index 13d8399..be960ec 100644
--- a/quickstep/res/values-ky/strings.xml
+++ b/quickstep/res/values-ky/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Колдонмону пайдалануу жөндөөлөрү"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Баарын тазалоо"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Акыркы колдонмолор"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 мүнөт"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Колдонмо жигерсиз"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Бүгүн <xliff:g id="TIME">%1$s</xliff:g> мүнөт калды"</string>
</resources>
diff --git a/quickstep/res/values-lo/strings.xml b/quickstep/res/values-lo/strings.xml
index 622118c..ef70ee7 100644
--- a/quickstep/res/values-lo/strings.xml
+++ b/quickstep/res/values-lo/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"ການຕັ້ງຄ່າການນຳໃຊ້ແອັບ"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"ລຶບລ້າງທັງໝົດ"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"ແອັບຫຼ້າສຸດ"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 ນາທີ"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"ແອັບເປັນສີຂາວດຳ"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"ເຫຼືອ <xliff:g id="TIME">%1$s</xliff:g> ມື້ນີ້"</string>
</resources>
diff --git a/quickstep/res/values-lt/strings.xml b/quickstep/res/values-lt/strings.xml
index 42e4fe8..f10866b 100644
--- a/quickstep/res/values-lt/strings.xml
+++ b/quickstep/res/values-lt/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Programos naudojimo nustatymai"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Išvalyti viską"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Naujausios programos"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min."</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Programa su pilkumo tonu"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Šiandien liko: <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-lv/strings.xml b/quickstep/res/values-lv/strings.xml
index c249928..9ae124a 100644
--- a/quickstep/res/values-lv/strings.xml
+++ b/quickstep/res/values-lv/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Lietotņu izmantošanas iestatījumi"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Notīrīt visu"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Pēdējās izmantotās lietotnes"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"<1 minūte"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Lietotne pelēktoņos"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Šodien atlicis: <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-mk/strings.xml b/quickstep/res/values-mk/strings.xml
index fa4e401..688cb93 100644
--- a/quickstep/res/values-mk/strings.xml
+++ b/quickstep/res/values-mk/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Поставки за користење на апликациите"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Исчисти ги сите"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Неодамнешни апликации"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 минута"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Апликација во сиви тонови"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Уште <xliff:g id="TIME">%1$s</xliff:g> за денес"</string>
</resources>
diff --git a/quickstep/res/values-ml/strings.xml b/quickstep/res/values-ml/strings.xml
index 4be84c8..e66116c 100644
--- a/quickstep/res/values-ml/strings.xml
+++ b/quickstep/res/values-ml/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"ആപ്പ് ഉപയോഗ ക്രമീകരണം"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"എല്ലാം മായ്ക്കുക"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"സമീപകാല ആപ്പുകൾ"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 മിനിറ്റ്"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"ആപ്പ് ഗ്രേസ്കെയിലിൽ"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"ഇന്ന് <xliff:g id="TIME">%1$s</xliff:g> ശേഷിക്കുന്നു"</string>
</resources>
diff --git a/quickstep/res/values-mn/strings.xml b/quickstep/res/values-mn/strings.xml
index b3e3d7f..5c57237 100644
--- a/quickstep/res/values-mn/strings.xml
+++ b/quickstep/res/values-mn/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Апп ашиглалтын тохиргоо"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Бүгдийг устгах"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Саяхны аппууд"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 минут"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Саарал өнгөтэй болсон апп"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Өнөөдөр <xliff:g id="TIME">%1$s</xliff:g> үлдсэн"</string>
</resources>
diff --git a/quickstep/res/values-mr/strings.xml b/quickstep/res/values-mr/strings.xml
index fa8574a..f4f2904 100644
--- a/quickstep/res/values-mr/strings.xml
+++ b/quickstep/res/values-mr/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"अॅप वापर सेटिंग्ज"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"सर्व साफ करा"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"अलीकडील अॅप्स"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"१मिहून कमी"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"ग्रेस्केल मधील अॅप"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"आज <xliff:g id="TIME">%1$s</xliff:g>शिल्लक आहे"</string>
</resources>
diff --git a/quickstep/res/values-ms/strings.xml b/quickstep/res/values-ms/strings.xml
index 975e127..d8561eb 100644
--- a/quickstep/res/values-ms/strings.xml
+++ b/quickstep/res/values-ms/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Tetapan penggunaan apl"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Kosongkan semua"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Apl terbaharu"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minit"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Apl dalam skala kelabu"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> lagi hari ini"</string>
</resources>
diff --git a/quickstep/res/values-my/strings.xml b/quickstep/res/values-my/strings.xml
index 52d4dae..f609c89 100644
--- a/quickstep/res/values-my/strings.xml
+++ b/quickstep/res/values-my/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"အက်ပ်အသုံးပြုမှု ဆက်တင်များ"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"အားလုံးကို ရှင်းရန်"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"လတ်တလောသုံး အက်ပ်များ"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>၊ <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< ၁ မိနစ်"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"အဖြူအမည်းနှင့်ပြသော အက်ပ်"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"ယနေ့ <xliff:g id="TIME">%1$s</xliff:g> ခု ကျန်သည်"</string>
</resources>
diff --git a/quickstep/res/values-nb/strings.xml b/quickstep/res/values-nb/strings.xml
index c681a1e..cff48d8 100644
--- a/quickstep/res/values-nb/strings.xml
+++ b/quickstep/res/values-nb/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Innstillinger for appbruk"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Fjern alt"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Nylige apper"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minutt"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App i gråtoner"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> gjenstår i dag"</string>
</resources>
diff --git a/quickstep/res/values-ne/strings.xml b/quickstep/res/values-ne/strings.xml
index 46e0eaf..cc450c4 100644
--- a/quickstep/res/values-ne/strings.xml
+++ b/quickstep/res/values-ne/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"अनुप्रयोगको उपयोगका सेटिङहरू"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"सबै खाली गर्नुहोस्"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"हालसालैका अनुप्रयोगहरू"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< १ मिनेट"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"ग्रेस्केल पारिएको एप"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"आज: <xliff:g id="TIME">%1$s</xliff:g> बाँकी"</string>
</resources>
diff --git a/quickstep/res/values-nl/strings.xml b/quickstep/res/values-nl/strings.xml
index dbbd2ec..4a3607d 100644
--- a/quickstep/res/values-nl/strings.xml
+++ b/quickstep/res/values-nl/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Instellingen voor app-gebruik"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Alles wissen"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Recente apps"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minuut"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App in grijstinten"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Nog <xliff:g id="TIME">%1$s</xliff:g> vandaag"</string>
</resources>
diff --git a/quickstep/res/values-or/strings.xml b/quickstep/res/values-or/strings.xml
index 60f7823..4dd5920 100644
--- a/quickstep/res/values-or/strings.xml
+++ b/quickstep/res/values-or/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"ଆପ୍ ବ୍ୟବହାର ସେଟିଂସ୍"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"ସବୁ ଖାଲି କରନ୍ତୁ"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"ସାମ୍ପ୍ରତିକ ଆପ୍"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g> <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 ମିନିଟ୍"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"ଗ୍ରେସ୍କେଲ୍ରେ ଥିବା ଆପ୍"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"ଆଜି <xliff:g id="TIME">%1$s</xliff:g> ବାକି ଅଛି"</string>
</resources>
diff --git a/quickstep/res/values-pa/strings.xml b/quickstep/res/values-pa/strings.xml
index 18b0468..078d8a0 100644
--- a/quickstep/res/values-pa/strings.xml
+++ b/quickstep/res/values-pa/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"ਐਪ ਵਰਤੋਂ ਦੀਆਂ ਸੈਟਿੰਗਾਂ"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"ਸਭ ਕਲੀਅਰ ਕਰੋ"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"ਹਾਲੀਆ ਐਪਾਂ"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 ਮਿੰਟ"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"ਐਪ ਗ੍ਰੇਸਕੇਲ ਵਿੱਚ ਹੈ"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"ਅੱਜ <xliff:g id="TIME">%1$s</xliff:g> ਬਾਕੀ"</string>
</resources>
diff --git a/quickstep/res/values-pl/strings.xml b/quickstep/res/values-pl/strings.xml
index 447cd60..aa7920c 100644
--- a/quickstep/res/values-pl/strings.xml
+++ b/quickstep/res/values-pl/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Ustawienia użycia aplikacji"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Wyczyść wszystko"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Ostatnie aplikacje"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"> 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Aplikacja wyszarzona"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Na dziś zostało <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-pt-rPT/strings.xml b/quickstep/res/values-pt-rPT/strings.xml
index e7dfedf..22dc654 100644
--- a/quickstep/res/values-pt-rPT/strings.xml
+++ b/quickstep/res/values-pt-rPT/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Definições de utilização de aplicações"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Limpar tudo"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Aplicações recentes"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minuto"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Aplic. na Escala de cinz."</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Resta(m) <xliff:g id="TIME">%1$s</xliff:g> hoje."</string>
</resources>
diff --git a/quickstep/res/values-pt/strings.xml b/quickstep/res/values-pt/strings.xml
index 5ebd0bd..b838c96 100644
--- a/quickstep/res/values-pt/strings.xml
+++ b/quickstep/res/values-pt/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Configurações de uso do app"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Limpar tudo"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Apps recentes"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App em escala de cinza"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> restante(s) hoje"</string>
</resources>
diff --git a/quickstep/res/values-ro/strings.xml b/quickstep/res/values-ro/strings.xml
index 5d9887d..a33524e 100644
--- a/quickstep/res/values-ro/strings.xml
+++ b/quickstep/res/values-ro/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Setări de utilizare a aplicației"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Ștergeți tot"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Aplicații recente"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minut"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Aplicație în tonuri de gri"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Au mai rămas <xliff:g id="TIME">%1$s</xliff:g> astăzi"</string>
</resources>
diff --git a/quickstep/res/values-ru/strings.xml b/quickstep/res/values-ru/strings.xml
index 992683c..2df583c 100644
--- a/quickstep/res/values-ru/strings.xml
+++ b/quickstep/res/values-ru/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Настройки использования приложения"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Очистить все"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Недавние приложения"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>: <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 мин."</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"В режиме оттенков серого"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Осталось сегодня: <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-si/strings.xml b/quickstep/res/values-si/strings.xml
index 050a765..010a56e 100644
--- a/quickstep/res/values-si/strings.xml
+++ b/quickstep/res/values-si/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"යෙදුම් භාවිත සැකසීම්"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"සියල්ල හිස් කරන්න"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"මෑත යෙදුම්"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 විනාඩියක්"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"අලු පැහැ යෙදුම"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"අද <xliff:g id="TIME">%1$s</xliff:g>ක් ඉතුරුයි"</string>
</resources>
diff --git a/quickstep/res/values-sk/strings.xml b/quickstep/res/values-sk/strings.xml
index 510220b..c73a597 100644
--- a/quickstep/res/values-sk/strings.xml
+++ b/quickstep/res/values-sk/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Nastavenia využívania aplikácie"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Vymazať všetko"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Nedávne aplikácie"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"Menej ako 1 minúta"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Aplikácia je odfarbená"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Dnes ešte zostáva: <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-sl/strings.xml b/quickstep/res/values-sl/strings.xml
index 29d1eec..a7f0704 100644
--- a/quickstep/res/values-sl/strings.xml
+++ b/quickstep/res/values-sl/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Nastavitve uporabe aplikacij"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Počisti vse"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Nedavne aplikacije"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Črnobela aplikacija"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Danes je ostalo še <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-sq/strings.xml b/quickstep/res/values-sq/strings.xml
index f2c955c..b70f142 100644
--- a/quickstep/res/values-sq/strings.xml
+++ b/quickstep/res/values-sq/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Cilësimet e përdorimit të aplikacionit"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Pastroji të gjitha"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Aplikacionet e fundit"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 minutë"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Apl. në shkallën e grisë"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> të mbetura sot"</string>
</resources>
diff --git a/quickstep/res/values-sr/strings.xml b/quickstep/res/values-sr/strings.xml
index e3837e7..2cf43f5 100644
--- a/quickstep/res/values-sr/strings.xml
+++ b/quickstep/res/values-sr/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Подешавања коришћења апликације"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Обриши све"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Недавне апликације"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 мин"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Апликација је у сивилу"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Још <xliff:g id="TIME">%1$s</xliff:g> данас"</string>
</resources>
diff --git a/quickstep/res/values-sv/strings.xml b/quickstep/res/values-sv/strings.xml
index 4eda58c..bec4893 100644
--- a/quickstep/res/values-sv/strings.xml
+++ b/quickstep/res/values-sv/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Inställningar för appanvändning"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Rensa alla"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Senaste apparna"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App visas i gråskala"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> kvar i dag"</string>
</resources>
diff --git a/quickstep/res/values-sw/strings.xml b/quickstep/res/values-sw/strings.xml
index 8888fef..53d095d 100644
--- a/quickstep/res/values-sw/strings.xml
+++ b/quickstep/res/values-sw/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Mipangilio ya matumizi ya programu"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Ondoa zote"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Programu za hivi karibuni"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< dak 1"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Programu katika kijivu"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Umebakisha <xliff:g id="TIME">%1$s</xliff:g> leo"</string>
</resources>
diff --git a/quickstep/res/values-ta/strings.xml b/quickstep/res/values-ta/strings.xml
index 5187564..ecc8f6c 100644
--- a/quickstep/res/values-ta/strings.xml
+++ b/quickstep/res/values-ta/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"ஆப்ஸ் உபயோக அமைப்புகள்"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"எல்லாம் அழி"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"சமீபத்திய ஆப்ஸ்"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 நி"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"கிரேஸ்கேலில் உள்ள ஆப்ஸ்"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"இன்று <xliff:g id="TIME">%1$s</xliff:g> மீதமுள்ளது"</string>
</resources>
diff --git a/quickstep/res/values-te/strings.xml b/quickstep/res/values-te/strings.xml
index ba9a558..b6eeb40 100644
--- a/quickstep/res/values-te/strings.xml
+++ b/quickstep/res/values-te/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"యాప్ వినియోగ సెట్టింగ్లు"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"అన్నీ తీసివేయండి"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"ఇటీవలి యాప్లు"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 నిమిషం"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"యాప్ గ్రేస్కేల్లో ఉంది"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"నేటికి <xliff:g id="TIME">%1$s</xliff:g> మిగిలి ఉంది"</string>
</resources>
diff --git a/quickstep/res/values-th/strings.xml b/quickstep/res/values-th/strings.xml
index c3a9a81..c2e173a 100644
--- a/quickstep/res/values-th/strings.xml
+++ b/quickstep/res/values-th/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"การตั้งค่าการใช้แอป"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"ล้างทั้งหมด"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"แอปล่าสุด"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g> <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"<1 นาที"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"แอปที่เป็นโทนสีเทา"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"วันนี้เหลืออีก <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-tl/strings.xml b/quickstep/res/values-tl/strings.xml
index 6ceaf21..5588d03 100644
--- a/quickstep/res/values-tl/strings.xml
+++ b/quickstep/res/values-tl/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Mga setting ng paggamit ng app"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"I-clear lahat"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Mga kamakailang app"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 min"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"App na grayscale"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> na lang ngayon"</string>
</resources>
diff --git a/quickstep/res/values-tr/strings.xml b/quickstep/res/values-tr/strings.xml
index cbebb26..40e0d89 100644
--- a/quickstep/res/values-tr/strings.xml
+++ b/quickstep/res/values-tr/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Uygulama kullanım ayarları"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Tümünü temizle"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Son uygulamalar"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 dk."</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Uygulama gri tonlamada"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Bugün <xliff:g id="TIME">%1$s</xliff:g> kaldı"</string>
</resources>
diff --git a/quickstep/res/values-uk/strings.xml b/quickstep/res/values-uk/strings.xml
index b9666b2..104c82c 100644
--- a/quickstep/res/values-uk/strings.xml
+++ b/quickstep/res/values-uk/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Налаштування використання додатка"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Очистити все"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Нещодавні додатки"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 хв"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Додаток у відтінку сірого"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Сьогодні залишилося <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-ur/strings.xml b/quickstep/res/values-ur/strings.xml
index 69ff632..481bda0 100644
--- a/quickstep/res/values-ur/strings.xml
+++ b/quickstep/res/values-ur/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"ایپ کے استعمال کی ترتیبات"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"سبھی کو صاف کریں"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"حالیہ ایپس"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>،<xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 منٹ"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"ایپ خاکستری کیا گیا"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"آج <xliff:g id="TIME">%1$s</xliff:g> بچا ہے"</string>
</resources>
diff --git a/quickstep/res/values-uz/strings.xml b/quickstep/res/values-uz/strings.xml
index 9edb9a5..7e9f955 100644
--- a/quickstep/res/values-uz/strings.xml
+++ b/quickstep/res/values-uz/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Ilovadan foydalanish sozlamalari"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Hammasini tozalash"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Yaqinda ishlatilgan ilovalar"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 daqiqa"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Ilova kulrang rejimida"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Bugun <xliff:g id="TIME">%1$s</xliff:g> qoldi"</string>
</resources>
diff --git a/quickstep/res/values-vi/strings.xml b/quickstep/res/values-vi/strings.xml
index 649e44d..3d42063 100644
--- a/quickstep/res/values-vi/strings.xml
+++ b/quickstep/res/values-vi/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Cài đặt mức sử dụng ứng dụng"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Xóa tất cả"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Ứng dụng gần đây"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 phút"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Ứng dụng có thang màu xám"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"Hôm nay còn <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-zh-rCN/strings.xml b/quickstep/res/values-zh-rCN/strings.xml
index b27931c..4a13d14 100644
--- a/quickstep/res/values-zh-rCN/strings.xml
+++ b/quickstep/res/values-zh-rCN/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"应用使用设置"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"全部清除"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"最近用过的应用"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>(<xliff:g id="REMAINING_TIME">%2$s</xliff:g>)"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"不到 1 分钟"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"灰度模式下的应用"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"今天还可使用 <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-zh-rHK/strings.xml b/quickstep/res/values-zh-rHK/strings.xml
index f8fe8de..02d9b8e 100644
--- a/quickstep/res/values-zh-rHK/strings.xml
+++ b/quickstep/res/values-zh-rHK/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"應用程式使用情況設定"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"全部清除"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"最近使用的應用程式"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>,<xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"少於 1 分鐘"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"切換至灰階螢幕的應用程式"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"今天剩餘時間:<xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-zh-rTW/strings.xml b/quickstep/res/values-zh-rTW/strings.xml
index ba51932..20181fd 100644
--- a/quickstep/res/values-zh-rTW/strings.xml
+++ b/quickstep/res/values-zh-rTW/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"應用程式使用情況設定"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"全部清除"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"最近使用的應用程式"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g> (<xliff:g id="REMAINING_TIME">%2$s</xliff:g>)"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 分鐘"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"切換為灰階模式的應用程式"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"今天還能使用 <xliff:g id="TIME">%1$s</xliff:g>"</string>
</resources>
diff --git a/quickstep/res/values-zu/strings.xml b/quickstep/res/values-zu/strings.xml
index d04a026..abbbc95 100644
--- a/quickstep/res/values-zu/strings.xml
+++ b/quickstep/res/values-zu/strings.xml
@@ -28,4 +28,8 @@
<string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Izilungiselelo zokusetshenziswa kohlelo lokusebenza"</string>
<string name="recents_clear_all" msgid="5328176793634888831">"Sula konke"</string>
<string name="accessibility_recent_apps" msgid="4058661986695117371">"Izinhlelo zokusebenza zakamuva"</string>
+ <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
+ <string name="shorter_duration_less_than_one_minute" msgid="4722015666335015336">"< 1 iminithi"</string>
+ <string name="app_in_grayscale" msgid="1108706002158384887">"Uhlelo lokusebenza nge-grayscale"</string>
+ <string name="time_left_for_app" msgid="3111996412933644358">"<xliff:g id="TIME">%1$s</xliff:g> esele namhlanje"</string>
</resources>
diff --git a/quickstep/res/values/dimens.xml b/quickstep/res/values/dimens.xml
index 04fd59c..2626481 100644
--- a/quickstep/res/values/dimens.xml
+++ b/quickstep/res/values/dimens.xml
@@ -39,6 +39,7 @@
<dimen name="motion_pause_detector_speed_somewhat_fast">0.285dp</dimen>
<dimen name="motion_pause_detector_speed_fast">0.5dp</dimen>
<dimen name="motion_pause_detector_min_displacement">48dp</dimen>
+ <dimen name="motion_pause_detector_max_orthogonal_displacement">48dp</dimen>
<!-- Launcher app transition -->
<dimen name="content_trans_y">50dp</dimen>
diff --git a/quickstep/res/values/strings.xml b/quickstep/res/values/strings.xml
index 0c741a1..f5e8fa8 100644
--- a/quickstep/res/values/strings.xml
+++ b/quickstep/res/values/strings.xml
@@ -52,7 +52,7 @@
<string name="task_contents_description_with_remaining_time"><xliff:g id="task_description" example="GMail">%1$s</xliff:g>, <xliff:g id="remaining_time" example="7 minutes left today">%2$s</xliff:g></string>
<!-- Text to show total app usage per day if it is less than 1 minute ("<" is the
- escaped form of '<'). [CHAR LIMIT=10] -->
+ escaped form of '<'). [CHAR LIMIT=15] -->
<string name="shorter_duration_less_than_one_minute">< 1 minute</string>
<!-- Annotation shown on an app card in Recents, telling that the app was switched to a
@@ -60,6 +60,6 @@
<string name="app_in_grayscale">App in grayscale</string>
<!-- Annotation shown on an app card in Recents, telling that the app has a usage limit set by
- the user, and a given time is left for it today [CHAR LIMIT=20] -->
+ the user, and a given time is left for it today [CHAR LIMIT=22] -->
<string name="time_left_for_app"><xliff:g id="time" example="7 minutes">%1$s</xliff:g> left today</string>
</resources>
\ No newline at end of file
diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
index fbb3618..0bdb578 100644
--- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java
+++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
@@ -15,38 +15,15 @@
*/
package com.android.quickstep;
-import static android.view.View.TRANSLATION_Y;
-
-import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS;
-import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
-import static com.android.launcher3.LauncherState.BACKGROUND_APP;
-import static com.android.launcher3.LauncherState.FAST_OVERVIEW;
-import static com.android.launcher3.LauncherState.NORMAL;
-import static com.android.launcher3.LauncherState.OVERVIEW;
-import static com.android.launcher3.allapps.AllAppsTransitionController.SPRING_DAMPING_RATIO;
-import static com.android.launcher3.allapps.AllAppsTransitionController.SPRING_STIFFNESS;
-import static com.android.launcher3.anim.Interpolators.LINEAR;
-import static com.android.launcher3.states.RotationHelper.REQUEST_LOCK;
-import static com.android.quickstep.TouchConsumer.INTERACTION_NORMAL;
-import static com.android.quickstep.TouchConsumer.INTERACTION_QUICK_SCRUB;
-import static com.android.quickstep.views.RecentsView.CONTENT_ALPHA;
-import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_BACK;
-import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_ROTATION;
-
import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.AnimatorSet;
-import android.animation.ObjectAnimator;
import android.annotation.TargetApi;
import android.app.ActivityManager.RunningTaskInfo;
-import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Build;
import android.os.Handler;
-import android.os.Looper;
import android.view.View;
import android.view.animation.Interpolator;
@@ -56,34 +33,15 @@
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.DeviceProfile;
-import com.android.launcher3.Launcher;
-import com.android.launcher3.LauncherAppState;
-import com.android.launcher3.LauncherInitListener;
-import com.android.launcher3.LauncherState;
-import com.android.launcher3.R;
-import com.android.launcher3.TestProtocol;
-import com.android.launcher3.allapps.DiscoveryBounce;
-import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.AnimatorPlaybackController;
-import com.android.launcher3.anim.SpringObjectAnimator;
-import com.android.launcher3.compat.AccessibilityManagerCompat;
-import com.android.launcher3.config.FeatureFlags;
-import com.android.launcher3.dragndrop.DragLayer;
-import com.android.launcher3.uioverrides.FastOverviewState;
-import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
import com.android.quickstep.TouchConsumer.InteractionType;
-import com.android.quickstep.util.ClipAnimationHelper;
-import com.android.quickstep.util.LayoutUtils;
import com.android.quickstep.util.RemoteAnimationProvider;
import com.android.quickstep.util.RemoteAnimationTargetSet;
import com.android.quickstep.util.TransformedRect;
-import com.android.quickstep.views.LauncherLayoutListener;
import com.android.quickstep.views.RecentsView;
-import com.android.quickstep.views.TaskView;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
-import java.util.Objects;
import java.util.function.BiPredicate;
import java.util.function.Consumer;
@@ -130,7 +88,7 @@
@UiThread
@Nullable
- RecentsView getVisibleRecentsView();
+ <T extends View> T getVisibleRecentsView();
@UiThread
boolean switchToRecentsIfVisible(boolean fromRecentsButton);
@@ -161,597 +119,6 @@
boolean isInLiveTileMode();
- class LauncherActivityControllerHelper implements ActivityControlHelper<Launcher> {
-
- @Override
- public LayoutListener createLayoutListener(Launcher activity) {
- return LauncherLayoutListener.resetAndGet(activity);
- }
-
- @Override
- public void onQuickInteractionStart(Launcher activity, RunningTaskInfo taskInfo,
- boolean activityVisible, TouchInteractionLog touchInteractionLog) {
- LauncherState fromState = activity.getStateManager().getState();
- QuickScrubController controller = activity.<RecentsView>getOverviewPanel()
- .getQuickScrubController();
- boolean isQuickSwitch = controller.isQuickSwitch();
- boolean animate = activityVisible;
- if (isQuickSwitch && fromState == FAST_OVERVIEW && !animate) {
- // We can already be in FAST_OVERVIEW if createActivityController() was called
- // before us. This could happen, for instance, when launcher is slow to load when
- // starting quick switch, causing us to call onQuickScrubStart() on the background
- // thread. In this case, we also hadn't set isQuickSwitch = true before setting
- // FAST_OVERVIEW, so we need to reapply FAST_OVERVIEW to take that into account.
- activity.getStateManager().reapplyState();
- } else {
- activity.getStateManager().goToState(FAST_OVERVIEW, animate);
- }
-
- controller.onQuickScrubStart(activityVisible && !fromState.overviewUi, this,
- touchInteractionLog);
-
- if (!activityVisible) {
- // For the duration of the gesture, lock the screen orientation to ensure that we
- // do not rotate mid-quickscrub
- activity.getRotationHelper().setStateHandlerRequest(REQUEST_LOCK);
- }
- }
-
- @Override
- public float getTranslationYForQuickScrub(TransformedRect targetRect, DeviceProfile dp,
- Context context) {
- // The padding calculations are exactly same as that of RecentsView.setInsets
- int topMargin = context.getResources()
- .getDimensionPixelSize(R.dimen.task_thumbnail_top_margin);
- int paddingTop = targetRect.rect.top - topMargin - dp.getInsets().top;
- int paddingBottom = dp.heightPx - dp.getInsets().bottom - targetRect.rect.bottom;
-
- return FastOverviewState.OVERVIEW_TRANSLATION_FACTOR * (paddingBottom - paddingTop);
- }
-
- @Override
- public void executeOnWindowAvailable(Launcher activity, Runnable action) {
- activity.getWorkspace().runOnOverlayHidden(action);
- }
-
- @Override
- public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context,
- @InteractionType int interactionType, TransformedRect outRect) {
- LayoutUtils.calculateLauncherTaskSize(context, dp, outRect.rect);
- if (interactionType == INTERACTION_QUICK_SCRUB) {
- outRect.scale = FastOverviewState.getOverviewScale(dp, outRect.rect, context,
- FeatureFlags.QUICK_SWITCH.get());
- }
- if (dp.isVerticalBarLayout()) {
- Rect targetInsets = dp.getInsets();
- int hotseatInset = dp.isSeascape() ? targetInsets.left : targetInsets.right;
- return dp.hotseatBarSizePx + hotseatInset;
- } else {
- return LayoutUtils.getShelfTrackingDistance(context, dp);
- }
- }
-
- @Override
- public void onTransitionCancelled(Launcher activity, boolean activityVisible) {
- LauncherState startState = activity.getStateManager().getRestState();
- activity.getStateManager().goToState(startState, activityVisible);
- }
-
- @Override
- public void onSwipeUpComplete(Launcher activity) {
- // Re apply state in case we did something funky during the transition.
- activity.getStateManager().reapplyState();
- DiscoveryBounce.showForOverviewIfNeeded(activity);
- }
-
- @NonNull
- @Override
- public HomeAnimationFactory prepareHomeUI(Launcher activity) {
- DeviceProfile dp = activity.getDeviceProfile();
-
- return new HomeAnimationFactory() {
- @NonNull
- @Override
- public RectF getWindowTargetRect() {
- int halfIconSize = dp.iconSizePx / 2;
- float targetCenterX = dp.availableWidthPx / 2;
- float targetCenterY = dp.availableHeightPx - dp.hotseatBarSizePx;
- return new RectF(targetCenterX - halfIconSize, targetCenterY - halfIconSize,
- targetCenterX + halfIconSize, targetCenterY + halfIconSize);
- }
-
- @NonNull
- @Override
- public Animator createActivityAnimationToHome() {
- long accuracy = 2 * Math.max(dp.widthPx, dp.heightPx);
- return activity.getStateManager().createAnimationToNewWorkspace(
- NORMAL, accuracy).getTarget();
- }
- };
- }
-
- @Override
- public AnimationFactory prepareRecentsUI(Launcher activity, boolean activityVisible,
- boolean animateActivity, Consumer<AnimatorPlaybackController> callback) {
- final LauncherState startState = activity.getStateManager().getState();
-
- LauncherState resetState = startState;
- if (startState.disableRestore) {
- resetState = activity.getStateManager().getRestState();
- }
- activity.getStateManager().setRestState(resetState);
-
- final LauncherState fromState;
- if (!activityVisible) {
- // Since the launcher is not visible, we can safely reset the scroll position.
- // This ensures then the next swipe up to all-apps starts from scroll 0.
- activity.getAppsView().reset(false /* animate */);
- fromState = animateActivity ? BACKGROUND_APP : OVERVIEW;
- activity.getStateManager().goToState(fromState, false);
-
- // Optimization, hide the all apps view to prevent layout while initializing
- activity.getAppsView().getContentView().setVisibility(View.GONE);
-
- AccessibilityManagerCompat.sendEventToTest(
- activity, TestProtocol.SWITCHED_TO_STATE_MESSAGE);
- } else {
- fromState = startState;
- }
-
- return new AnimationFactory() {
- private Animator mShelfAnim;
- private ShelfAnimState mShelfState;
-
- @Override
- public void createActivityController(long transitionLength,
- @InteractionType int interactionType) {
- createActivityControllerInternal(activity, activityVisible, fromState,
- transitionLength, interactionType, callback);
- }
-
- @Override
- public void onTransitionCancelled() {
- activity.getStateManager().goToState(startState, false /* animate */);
- }
-
- @Override
- public void setShelfState(ShelfAnimState shelfState, Interpolator interpolator,
- long duration) {
- if (mShelfState == shelfState) {
- return;
- }
- mShelfState = shelfState;
- if (mShelfAnim != null) {
- mShelfAnim.cancel();
- }
- if (mShelfState == ShelfAnimState.CANCEL) {
- return;
- }
- float shelfHiddenProgress = BACKGROUND_APP.getVerticalProgress(activity);
- float shelfOverviewProgress = OVERVIEW.getVerticalProgress(activity);
- float shelfPeekingProgress = shelfHiddenProgress
- - (shelfHiddenProgress - shelfOverviewProgress) * 0.25f;
- float toProgress = mShelfState == ShelfAnimState.HIDE
- ? shelfHiddenProgress
- : mShelfState == ShelfAnimState.PEEK
- ? shelfPeekingProgress
- : shelfOverviewProgress;
- mShelfAnim = createShelfAnim(activity, toProgress);
- mShelfAnim.addListener(new AnimatorListenerAdapter() {
- @Override
- public void onAnimationEnd(Animator animation) {
- mShelfAnim = null;
- }
- });
- mShelfAnim.setInterpolator(interpolator);
- mShelfAnim.setDuration(duration);
- mShelfAnim.start();
- }
- };
- }
-
- private void createActivityControllerInternal(Launcher activity, boolean wasVisible,
- LauncherState fromState, long transitionLength,
- @InteractionType int interactionType,
- Consumer<AnimatorPlaybackController> callback) {
- LauncherState endState = interactionType == INTERACTION_QUICK_SCRUB
- ? FAST_OVERVIEW : OVERVIEW;
- if (wasVisible) {
- DeviceProfile dp = activity.getDeviceProfile();
- long accuracy = 2 * Math.max(dp.widthPx, dp.heightPx);
- callback.accept(activity.getStateManager()
- .createAnimationToNewWorkspace(fromState, endState, accuracy));
- return;
- }
- if (fromState == endState) {
- return;
- }
-
- AnimatorSet anim = new AnimatorSet();
- if (!activity.getDeviceProfile().isVerticalBarLayout()
- && !FeatureFlags.SWIPE_HOME.get()) {
- // Don't animate the shelf when SWIPE_HOME is true, because we update it atomically.
- Animator shiftAnim = createShelfAnim(activity,
- fromState.getVerticalProgress(activity),
- endState.getVerticalProgress(activity));
- anim.play(shiftAnim);
- }
-
- if (interactionType == INTERACTION_NORMAL) {
- playScaleDownAnim(anim, activity, endState);
- }
-
- anim.setDuration(transitionLength * 2);
- activity.getStateManager().setCurrentAnimation(anim);
- AnimatorPlaybackController controller =
- AnimatorPlaybackController.wrap(anim, transitionLength * 2);
-
- // Since we are changing the start position of the UI, reapply the state, at the end
- controller.setEndAction(() -> {
- activity.getStateManager().goToState(
- controller.getInterpolatedProgress() > 0.5 ? endState : fromState, false);
- });
- callback.accept(controller);
- }
-
- private Animator createShelfAnim(Launcher activity, float ... progressValues) {
- Animator shiftAnim = new SpringObjectAnimator<>(activity.getAllAppsController(),
- "allAppsSpringFromACH", activity.getAllAppsController().getShiftRange(),
- SPRING_DAMPING_RATIO, SPRING_STIFFNESS, progressValues);
- shiftAnim.setInterpolator(LINEAR);
- return shiftAnim;
- }
-
- /**
- * Scale down recents from the center task being full screen to being in overview.
- */
- private void playScaleDownAnim(AnimatorSet anim, Launcher launcher,
- LauncherState endState) {
- RecentsView recentsView = launcher.getOverviewPanel();
- TaskView v = recentsView.getTaskViewAt(recentsView.getCurrentPage());
- if (v == null) {
- return;
- }
-
- // Setup the clip animation helper source/target rects in the final transformed state
- // of the recents view (a scale may be applied prior to this animation starting to
- // line up the side pages during swipe up)
- float prevRvScale = recentsView.getScaleX();
- float targetRvScale = endState.getOverviewScaleAndTranslationYFactor(launcher)[0];
- SCALE_PROPERTY.set(recentsView, targetRvScale);
- ClipAnimationHelper clipHelper = new ClipAnimationHelper(launcher);
- clipHelper.fromTaskThumbnailView(v.getThumbnail(), (RecentsView) v.getParent(), null);
- SCALE_PROPERTY.set(recentsView, prevRvScale);
-
- if (!clipHelper.getSourceRect().isEmpty() && !clipHelper.getTargetRect().isEmpty()) {
- float fromScale = clipHelper.getSourceRect().width()
- / clipHelper.getTargetRect().width();
- float fromTranslationY = clipHelper.getSourceRect().centerY()
- - clipHelper.getTargetRect().centerY();
- Animator scale = ObjectAnimator.ofFloat(recentsView, SCALE_PROPERTY, fromScale, 1);
- Animator translateY = ObjectAnimator.ofFloat(recentsView, TRANSLATION_Y,
- fromTranslationY, 0);
- scale.setInterpolator(LINEAR);
- translateY.setInterpolator(LINEAR);
- anim.playTogether(scale, translateY);
- }
- }
-
- @Override
- public ActivityInitListener createActivityInitListener(
- BiPredicate<Launcher, Boolean> onInitListener) {
- return new LauncherInitListener(onInitListener);
- }
-
- @Nullable
- @Override
- public Launcher getCreatedActivity() {
- LauncherAppState app = LauncherAppState.getInstanceNoCreate();
- if (app == null) {
- return null;
- }
- return (Launcher) app.getModel().getCallback();
- }
-
- @Nullable
- @UiThread
- private Launcher getVisibleLaucher() {
- Launcher launcher = getCreatedActivity();
- return (launcher != null) && launcher.isStarted() && launcher.hasWindowFocus() ?
- launcher : null;
- }
-
- @Nullable
- @Override
- public RecentsView getVisibleRecentsView() {
- Launcher launcher = getVisibleLaucher();
- return launcher != null && launcher.getStateManager().getState().overviewUi
- ? launcher.getOverviewPanel() : null;
- }
-
- @Override
- public boolean switchToRecentsIfVisible(boolean fromRecentsButton) {
- Launcher launcher = getVisibleLaucher();
- if (launcher != null) {
- if (fromRecentsButton) {
- launcher.getUserEventDispatcher().logActionCommand(
- LauncherLogProto.Action.Command.RECENTS_BUTTON,
- getContainerType(),
- LauncherLogProto.ContainerType.TASKSWITCHER);
- }
- launcher.getStateManager().goToState(OVERVIEW);
- return true;
- }
- return false;
- }
-
- @Override
- public boolean deferStartingActivity(int downHitTarget) {
- return downHitTarget == HIT_TARGET_BACK || downHitTarget == HIT_TARGET_ROTATION;
- }
-
- @Override
- public Rect getOverviewWindowBounds(Rect homeBounds, RemoteAnimationTargetCompat target) {
- return homeBounds;
- }
-
- @Override
- public boolean shouldMinimizeSplitScreen() {
- return true;
- }
-
- @Override
- public boolean supportsLongSwipe(Launcher activity) {
- return !activity.getDeviceProfile().isVerticalBarLayout();
- }
-
- @Override
- public LongSwipeHelper getLongSwipeController(Launcher activity, int runningTaskId) {
- if (activity.getDeviceProfile().isVerticalBarLayout()) {
- return null;
- }
- return new LongSwipeHelper(activity, runningTaskId);
- }
-
- @Override
- public AlphaProperty getAlphaProperty(Launcher activity) {
- return activity.getDragLayer().getAlphaProperty(DragLayer.ALPHA_INDEX_SWIPE_UP);
- }
-
- @Override
- public int getContainerType() {
- final Launcher launcher = getVisibleLaucher();
- return launcher != null ? launcher.getStateManager().getState().containerType
- : LauncherLogProto.ContainerType.APP;
- }
-
- @Override
- public boolean isInLiveTileMode() {
- Launcher launcher = getCreatedActivity();
- return launcher != null && launcher.getStateManager().getState() == OVERVIEW &&
- launcher.isStarted();
- }
- }
-
- class FallbackActivityControllerHelper implements ActivityControlHelper<RecentsActivity> {
-
- private final ComponentName mHomeComponent;
- private final Handler mUiHandler = new Handler(Looper.getMainLooper());
-
- public FallbackActivityControllerHelper(ComponentName homeComponent) {
- mHomeComponent = homeComponent;
- }
-
- @Override
- public void onQuickInteractionStart(RecentsActivity activity, RunningTaskInfo taskInfo,
- boolean activityVisible, TouchInteractionLog touchInteractionLog) {
- QuickScrubController controller = activity.<RecentsView>getOverviewPanel()
- .getQuickScrubController();
-
- // TODO: match user is as well
- boolean startingFromHome = !activityVisible &&
- (taskInfo == null || Objects.equals(taskInfo.topActivity, mHomeComponent));
- controller.onQuickScrubStart(startingFromHome, this, touchInteractionLog);
- if (activityVisible) {
- mUiHandler.postDelayed(controller::onFinishedTransitionToQuickScrub,
- OVERVIEW_TRANSITION_MS);
- }
- }
-
- @Override
- public float getTranslationYForQuickScrub(TransformedRect targetRect, DeviceProfile dp,
- Context context) {
- return 0;
- }
-
- @Override
- public void executeOnWindowAvailable(RecentsActivity activity, Runnable action) {
- action.run();
- }
-
- @Override
- public void onTransitionCancelled(RecentsActivity activity, boolean activityVisible) {
- // TODO:
- }
-
- @Override
- public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context,
- @InteractionType int interactionType, TransformedRect outRect) {
- LayoutUtils.calculateFallbackTaskSize(context, dp, outRect.rect);
- if (dp.isVerticalBarLayout()) {
- Rect targetInsets = dp.getInsets();
- int hotseatInset = dp.isSeascape() ? targetInsets.left : targetInsets.right;
- return dp.hotseatBarSizePx + hotseatInset;
- } else {
- return dp.heightPx - outRect.rect.bottom;
- }
- }
-
- @Override
- public void onSwipeUpComplete(RecentsActivity activity) {
- // TODO:
- }
-
- @NonNull
- @Override
- public HomeAnimationFactory prepareHomeUI(RecentsActivity activity) {
- RecentsView recentsView = activity.getOverviewPanel();
-
- return new HomeAnimationFactory() {
- @NonNull
- @Override
- public RectF getWindowTargetRect() {
- float centerX = recentsView.getPivotX();
- float centerY = recentsView.getPivotY();
- return new RectF(centerX, centerY, centerX, centerY);
- }
-
- @NonNull
- @Override
- public Animator createActivityAnimationToHome() {
- Animator anim = ObjectAnimator.ofFloat(recentsView, CONTENT_ALPHA, 0);
- anim.addListener(new AnimationSuccessListener() {
- @Override
- public void onAnimationSuccess(Animator animator) {
- recentsView.startHome();
- }
- });
- return anim;
- }
- };
- }
-
- @Override
- public AnimationFactory prepareRecentsUI(RecentsActivity activity, boolean activityVisible,
- boolean animateActivity, Consumer<AnimatorPlaybackController> callback) {
- if (activityVisible) {
- return (transitionLength, interactionType) -> { };
- }
-
- RecentsView rv = activity.getOverviewPanel();
- rv.setContentAlpha(0);
-
- return new AnimationFactory() {
-
- boolean isAnimatingToRecents = false;
-
- @Override
- public void onRemoteAnimationReceived(RemoteAnimationTargetSet targets) {
- isAnimatingToRecents = targets != null && targets.isAnimatingHome();
- if (!isAnimatingToRecents) {
- rv.setContentAlpha(1);
- }
- createActivityController(getSwipeUpDestinationAndLength(
- activity.getDeviceProfile(), activity, INTERACTION_NORMAL,
- new TransformedRect()), INTERACTION_NORMAL);
- }
-
- @Override
- public void createActivityController(long transitionLength, int interactionType) {
- if (!isAnimatingToRecents) {
- return;
- }
-
- ObjectAnimator anim = ObjectAnimator.ofFloat(rv, CONTENT_ALPHA, 0, 1);
- anim.setDuration(transitionLength).setInterpolator(LINEAR);
- AnimatorSet animatorSet = new AnimatorSet();
- animatorSet.play(anim);
- callback.accept(AnimatorPlaybackController.wrap(animatorSet, transitionLength));
- }
- };
- }
-
- @Override
- public LayoutListener createLayoutListener(RecentsActivity activity) {
- // We do not change anything as part of layout changes in fallback activity. Return a
- // default layout listener.
- return new LayoutListener() {
- @Override
- public void open() { }
-
- @Override
- public void setHandler(WindowTransformSwipeHandler handler) { }
-
- @Override
- public void finish() { }
-
- @Override
- public void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect,
- float cornerRadius) { }
- };
- }
-
- @Override
- public ActivityInitListener createActivityInitListener(
- BiPredicate<RecentsActivity, Boolean> onInitListener) {
- return new RecentsActivityTracker(onInitListener);
- }
-
- @Nullable
- @Override
- public RecentsActivity getCreatedActivity() {
- return RecentsActivityTracker.getCurrentActivity();
- }
-
- @Nullable
- @Override
- public RecentsView getVisibleRecentsView() {
- RecentsActivity activity = getCreatedActivity();
- if (activity != null && activity.hasWindowFocus()) {
- return activity.getOverviewPanel();
- }
- return null;
- }
-
- @Override
- public boolean switchToRecentsIfVisible(boolean fromRecentsButton) {
- return false;
- }
-
- @Override
- public boolean deferStartingActivity(int downHitTarget) {
- // Always defer starting the activity when using fallback
- return true;
- }
-
- @Override
- public Rect getOverviewWindowBounds(Rect homeBounds, RemoteAnimationTargetCompat target) {
- // TODO: Remove this once b/77875376 is fixed
- return target.sourceContainerBounds;
- }
-
- @Override
- public boolean shouldMinimizeSplitScreen() {
- // TODO: Remove this once b/77875376 is fixed
- return false;
- }
-
- @Override
- public boolean supportsLongSwipe(RecentsActivity activity) {
- return false;
- }
-
- @Override
- public LongSwipeHelper getLongSwipeController(RecentsActivity activity, int runningTaskId) {
- return null;
- }
-
- @Override
- public AlphaProperty getAlphaProperty(RecentsActivity activity) {
- return activity.getDragLayer().getAlphaProperty(0);
- }
-
- @Override
- public int getContainerType() {
- return LauncherLogProto.ContainerType.SIDELOADED_LAUNCHER;
- }
-
- @Override
- public boolean isInLiveTileMode() {
- return false;
- }
- }
-
interface LayoutListener {
void open();
diff --git a/quickstep/src/com/android/quickstep/AppToOverviewAnimationProvider.java b/quickstep/src/com/android/quickstep/AppToOverviewAnimationProvider.java
new file mode 100644
index 0000000..e0eeda5
--- /dev/null
+++ b/quickstep/src/com/android/quickstep/AppToOverviewAnimationProvider.java
@@ -0,0 +1,180 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.quickstep;
+
+import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
+import static com.android.launcher3.anim.Interpolators.TOUCH_RESPONSE_INTERPOLATOR;
+import static com.android.quickstep.TouchConsumer.INTERACTION_NORMAL;
+import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING;
+import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING;
+
+import android.animation.Animator;
+import android.animation.AnimatorSet;
+import android.animation.ValueAnimator;
+import android.graphics.Rect;
+import android.util.Log;
+import android.view.View;
+
+import com.android.launcher3.AbstractFloatingView;
+import com.android.launcher3.BaseDraggingActivity;
+import com.android.launcher3.anim.AnimationSuccessListener;
+import com.android.quickstep.util.ClipAnimationHelper;
+import com.android.quickstep.util.RemoteAnimationProvider;
+import com.android.quickstep.util.RemoteAnimationTargetSet;
+import com.android.quickstep.util.TransformedRect;
+import com.android.quickstep.views.RecentsView;
+import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
+import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat;
+import com.android.systemui.shared.system.TransactionCompat;
+
+/**
+ * Provider for the atomic remote window animation from the app to the overview.
+ *
+ * @param <T> activity that contains the overview
+ */
+final class AppToOverviewAnimationProvider<T extends BaseDraggingActivity> implements
+ RemoteAnimationProvider {
+
+ private static final long RECENTS_LAUNCH_DURATION = 250;
+ private static final String TAG = "AppToOverviewAnimationProvider";
+
+ private final ActivityControlHelper<T> mHelper;
+ // The id of the currently running task that is transitioning to overview.
+ private final int mTargetTaskId;
+
+ private T mActivity;
+ private RecentsView mRecentsView;
+
+ AppToOverviewAnimationProvider(ActivityControlHelper<T> helper, int targetTaskId) {
+ mHelper = helper;
+ mTargetTaskId = targetTaskId;
+ }
+
+ /**
+ * Callback for when the activity is ready/initialized.
+ *
+ * @param activity the activity that is ready
+ * @param wasVisible true if it was visible before
+ */
+ boolean onActivityReady(T activity, Boolean wasVisible) {
+ activity.<RecentsView>getOverviewPanel().setCurrentTask(mTargetTaskId);
+ AbstractFloatingView.closeAllOpenViews(activity, wasVisible);
+ ActivityControlHelper.AnimationFactory factory =
+ mHelper.prepareRecentsUI(activity, wasVisible,
+ false /* animate activity */, (controller) -> {
+ controller.dispatchOnStart();
+ ValueAnimator anim = controller.getAnimationPlayer()
+ .setDuration(RECENTS_LAUNCH_DURATION);
+ anim.setInterpolator(FAST_OUT_SLOW_IN);
+ anim.start();
+ });
+ factory.onRemoteAnimationReceived(null);
+ factory.createActivityController(RECENTS_LAUNCH_DURATION, INTERACTION_NORMAL);
+ mActivity = activity;
+ mRecentsView = mActivity.getOverviewPanel();
+ return false;
+ }
+
+ /**
+ * Create remote window animation from the currently running app to the overview panel.
+ *
+ * @param targetCompats the target apps
+ * @return animation from app to overview
+ */
+ @Override
+ public AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] targetCompats) {
+ if (mRecentsView != null) {
+ mRecentsView.setRunningTaskIconScaledDown(true);
+ }
+ AnimatorSet anim = new AnimatorSet();
+ anim.addListener(new AnimationSuccessListener() {
+ @Override
+ public void onAnimationSuccess(Animator animator) {
+ if (mRecentsView != null) {
+ mRecentsView.animateUpRunningTaskIconScale();
+ }
+ }
+ });
+ if (mActivity == null) {
+ Log.e(TAG, "Animation created, before activity");
+ anim.play(ValueAnimator.ofInt(0, 1).setDuration(RECENTS_LAUNCH_DURATION));
+ return anim;
+ }
+
+ RemoteAnimationTargetSet targetSet =
+ new RemoteAnimationTargetSet(targetCompats, MODE_CLOSING);
+
+ // Use the top closing app to determine the insets for the animation
+ RemoteAnimationTargetCompat runningTaskTarget = targetSet.findTask(mTargetTaskId);
+ if (runningTaskTarget == null) {
+ Log.e(TAG, "No closing app");
+ anim.play(ValueAnimator.ofInt(0, 1).setDuration(RECENTS_LAUNCH_DURATION));
+ return anim;
+ }
+
+ final ClipAnimationHelper clipHelper = new ClipAnimationHelper(mActivity);
+
+ // At this point, the activity is already started and laid-out. Get the home-bounds
+ // relative to the screen using the rootView of the activity.
+ int loc[] = new int[2];
+ View rootView = mActivity.getRootView();
+ rootView.getLocationOnScreen(loc);
+ Rect homeBounds = new Rect(loc[0], loc[1],
+ loc[0] + rootView.getWidth(), loc[1] + rootView.getHeight());
+ clipHelper.updateSource(homeBounds, runningTaskTarget);
+
+ TransformedRect targetRect = new TransformedRect();
+ mHelper.getSwipeUpDestinationAndLength(mActivity.getDeviceProfile(), mActivity,
+ INTERACTION_NORMAL, targetRect);
+ clipHelper.updateTargetRect(targetRect);
+ clipHelper.prepareAnimation(false /* isOpening */);
+
+ ClipAnimationHelper.TransformParams params = new ClipAnimationHelper.TransformParams()
+ .setSyncTransactionApplier(new SyncRtSurfaceTransactionApplierCompat(rootView));
+ ValueAnimator valueAnimator = ValueAnimator.ofFloat(0, 1);
+ valueAnimator.setDuration(RECENTS_LAUNCH_DURATION);
+ valueAnimator.setInterpolator(TOUCH_RESPONSE_INTERPOLATOR);
+ valueAnimator.addUpdateListener((v) -> {
+ params.setProgress((float) v.getAnimatedValue());
+ clipHelper.applyTransform(targetSet, params);
+ });
+
+ if (targetSet.isAnimatingHome()) {
+ // If we are animating home, fade in the opening targets
+ RemoteAnimationTargetSet openingSet =
+ new RemoteAnimationTargetSet(targetCompats, MODE_OPENING);
+
+ TransactionCompat transaction = new TransactionCompat();
+ valueAnimator.addUpdateListener((v) -> {
+ for (RemoteAnimationTargetCompat app : openingSet.apps) {
+ transaction.setAlpha(app.leash, (float) v.getAnimatedValue());
+ }
+ transaction.apply();
+ });
+ }
+ anim.play(valueAnimator);
+ return anim;
+ }
+
+ /**
+ * Get duration of animation from app to overview.
+ *
+ * @return duration of animation
+ */
+ long getRecentsLaunchDuration() {
+ return RECENTS_LAUNCH_DURATION;
+ }
+}
diff --git a/quickstep/src/com/android/quickstep/FallbackActivityControllerHelper.java b/quickstep/src/com/android/quickstep/FallbackActivityControllerHelper.java
new file mode 100644
index 0000000..aba6060
--- /dev/null
+++ b/quickstep/src/com/android/quickstep/FallbackActivityControllerHelper.java
@@ -0,0 +1,276 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.quickstep;
+
+import static com.android.launcher3.LauncherAnimUtils.OVERVIEW_TRANSITION_MS;
+import static com.android.launcher3.anim.Interpolators.LINEAR;
+import static com.android.quickstep.TouchConsumer.INTERACTION_NORMAL;
+import static com.android.quickstep.views.RecentsView.CONTENT_ALPHA;
+
+import android.animation.Animator;
+import android.animation.AnimatorSet;
+import android.animation.ObjectAnimator;
+import android.app.ActivityManager.RunningTaskInfo;
+import android.content.ComponentName;
+import android.content.Context;
+import android.graphics.Rect;
+import android.graphics.RectF;
+import android.os.Handler;
+import android.os.Looper;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.anim.AnimationSuccessListener;
+import com.android.launcher3.anim.AnimatorPlaybackController;
+import com.android.launcher3.userevent.nano.LauncherLogProto;
+import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
+import com.android.quickstep.TouchConsumer.InteractionType;
+import com.android.quickstep.util.LayoutUtils;
+import com.android.quickstep.util.RemoteAnimationTargetSet;
+import com.android.quickstep.util.TransformedRect;
+import com.android.quickstep.views.RecentsView;
+import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
+
+import java.util.Objects;
+import java.util.function.BiPredicate;
+import java.util.function.Consumer;
+
+/**
+ * {@link ActivityControlHelper} for recents when the default launcher is different than the
+ * currently running one and apps should interact with the {@link RecentsActivity} as opposed
+ * to the in-launcher one.
+ */
+public final class FallbackActivityControllerHelper implements
+ ActivityControlHelper<RecentsActivity> {
+
+ private final ComponentName mHomeComponent;
+ private final Handler mUiHandler = new Handler(Looper.getMainLooper());
+
+ public FallbackActivityControllerHelper(ComponentName homeComponent) {
+ mHomeComponent = homeComponent;
+ }
+
+ @Override
+ public void onQuickInteractionStart(RecentsActivity activity, RunningTaskInfo taskInfo,
+ boolean activityVisible, TouchInteractionLog touchInteractionLog) {
+ QuickScrubController controller = activity.<RecentsView>getOverviewPanel()
+ .getQuickScrubController();
+
+ // TODO: match user is as well
+ boolean startingFromHome = !activityVisible &&
+ (taskInfo == null || Objects.equals(taskInfo.topActivity, mHomeComponent));
+ controller.onQuickScrubStart(startingFromHome, this, touchInteractionLog);
+ if (activityVisible) {
+ mUiHandler.postDelayed(controller::onFinishedTransitionToQuickScrub,
+ OVERVIEW_TRANSITION_MS);
+ }
+ }
+
+ @Override
+ public float getTranslationYForQuickScrub(TransformedRect targetRect, DeviceProfile dp,
+ Context context) {
+ return 0;
+ }
+
+ @Override
+ public void executeOnWindowAvailable(RecentsActivity activity, Runnable action) {
+ action.run();
+ }
+
+ @Override
+ public void onTransitionCancelled(RecentsActivity activity, boolean activityVisible) {
+ // TODO:
+ }
+
+ @Override
+ public int getSwipeUpDestinationAndLength(DeviceProfile dp, Context context,
+ @InteractionType int interactionType, TransformedRect outRect) {
+ LayoutUtils.calculateFallbackTaskSize(context, dp, outRect.rect);
+ if (dp.isVerticalBarLayout()) {
+ Rect targetInsets = dp.getInsets();
+ int hotseatInset = dp.isSeascape() ? targetInsets.left : targetInsets.right;
+ return dp.hotseatBarSizePx + hotseatInset;
+ } else {
+ return dp.heightPx - outRect.rect.bottom;
+ }
+ }
+
+ @Override
+ public void onSwipeUpComplete(RecentsActivity activity) {
+ // TODO:
+ }
+
+ @NonNull
+ @Override
+ public HomeAnimationFactory prepareHomeUI(RecentsActivity activity) {
+ RecentsView recentsView = activity.getOverviewPanel();
+
+ return new HomeAnimationFactory() {
+ @NonNull
+ @Override
+ public RectF getWindowTargetRect() {
+ float centerX = recentsView.getPivotX();
+ float centerY = recentsView.getPivotY();
+ return new RectF(centerX, centerY, centerX, centerY);
+ }
+
+ @NonNull
+ @Override
+ public Animator createActivityAnimationToHome() {
+ Animator anim = ObjectAnimator.ofFloat(recentsView, CONTENT_ALPHA, 0);
+ anim.addListener(new AnimationSuccessListener() {
+ @Override
+ public void onAnimationSuccess(Animator animator) {
+ recentsView.startHome();
+ }
+ });
+ return anim;
+ }
+ };
+ }
+
+ @Override
+ public AnimationFactory prepareRecentsUI(RecentsActivity activity, boolean activityVisible,
+ boolean animateActivity, Consumer<AnimatorPlaybackController> callback) {
+ if (activityVisible) {
+ return (transitionLength, interactionType) -> { };
+ }
+
+ RecentsView rv = activity.getOverviewPanel();
+ rv.setContentAlpha(0);
+
+ return new AnimationFactory() {
+
+ boolean isAnimatingToRecents = false;
+
+ @Override
+ public void onRemoteAnimationReceived(RemoteAnimationTargetSet targets) {
+ isAnimatingToRecents = targets != null && targets.isAnimatingHome();
+ if (!isAnimatingToRecents) {
+ rv.setContentAlpha(1);
+ }
+ createActivityController(getSwipeUpDestinationAndLength(
+ activity.getDeviceProfile(), activity, INTERACTION_NORMAL,
+ new TransformedRect()), INTERACTION_NORMAL);
+ }
+
+ @Override
+ public void createActivityController(long transitionLength, int interactionType) {
+ if (!isAnimatingToRecents) {
+ return;
+ }
+
+ ObjectAnimator anim = ObjectAnimator.ofFloat(rv, CONTENT_ALPHA, 0, 1);
+ anim.setDuration(transitionLength).setInterpolator(LINEAR);
+ AnimatorSet animatorSet = new AnimatorSet();
+ animatorSet.play(anim);
+ callback.accept(AnimatorPlaybackController.wrap(animatorSet, transitionLength));
+ }
+ };
+ }
+
+ @Override
+ public LayoutListener createLayoutListener(RecentsActivity activity) {
+ // We do not change anything as part of layout changes in fallback activity. Return a
+ // default layout listener.
+ return new LayoutListener() {
+ @Override
+ public void open() { }
+
+ @Override
+ public void setHandler(WindowTransformSwipeHandler handler) { }
+
+ @Override
+ public void finish() { }
+
+ @Override
+ public void update(boolean shouldFinish, boolean isLongSwipe, RectF currentRect,
+ float cornerRadius) { }
+ };
+ }
+
+ @Override
+ public ActivityInitListener createActivityInitListener(
+ BiPredicate<RecentsActivity, Boolean> onInitListener) {
+ return new RecentsActivityTracker(onInitListener);
+ }
+
+ @Nullable
+ @Override
+ public RecentsActivity getCreatedActivity() {
+ return RecentsActivityTracker.getCurrentActivity();
+ }
+
+ @Nullable
+ @Override
+ public RecentsView getVisibleRecentsView() {
+ RecentsActivity activity = getCreatedActivity();
+ if (activity != null && activity.hasWindowFocus()) {
+ return activity.getOverviewPanel();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean switchToRecentsIfVisible(boolean fromRecentsButton) {
+ return false;
+ }
+
+ @Override
+ public boolean deferStartingActivity(int downHitTarget) {
+ // Always defer starting the activity when using fallback
+ return true;
+ }
+
+ @Override
+ public Rect getOverviewWindowBounds(Rect homeBounds, RemoteAnimationTargetCompat target) {
+ // TODO: Remove this once b/77875376 is fixed
+ return target.sourceContainerBounds;
+ }
+
+ @Override
+ public boolean shouldMinimizeSplitScreen() {
+ // TODO: Remove this once b/77875376 is fixed
+ return false;
+ }
+
+ @Override
+ public boolean supportsLongSwipe(RecentsActivity activity) {
+ return false;
+ }
+
+ @Override
+ public LongSwipeHelper getLongSwipeController(RecentsActivity activity, int runningTaskId) {
+ return null;
+ }
+
+ @Override
+ public AlphaProperty getAlphaProperty(RecentsActivity activity) {
+ return activity.getDragLayer().getAlphaProperty(0);
+ }
+
+ @Override
+ public int getContainerType() {
+ return LauncherLogProto.ContainerType.SIDELOADED_LAUNCHER;
+ }
+
+ @Override
+ public boolean isInLiveTileMode() {
+ return false;
+ }
+}
diff --git a/quickstep/src/com/android/quickstep/LongSwipeHelper.java b/quickstep/src/com/android/quickstep/LongSwipeHelper.java
index 80d37ae..88dc520 100644
--- a/quickstep/src/com/android/quickstep/LongSwipeHelper.java
+++ b/quickstep/src/com/android/quickstep/LongSwipeHelper.java
@@ -19,6 +19,7 @@
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.anim.Interpolators.DEACCEL;
+import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.config.FeatureFlags.QUICKSTEP_SPRINGS;
import static com.android.quickstep.WindowTransformSwipeHandler.MAX_SWIPE_DURATION;
import static com.android.quickstep.WindowTransformSwipeHandler.MIN_OVERSHOOT_DURATION;
@@ -173,5 +174,9 @@
0);
callback.run();
+
+ if (ENABLE_QUICKSTEP_LIVE_TILE.get() && toAllApps) {
+ rv.finishRecentsAnimation(true, null);
+ }
}
}
diff --git a/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java b/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java
index 5755205..a7f5f0b 100644
--- a/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java
+++ b/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java
@@ -201,7 +201,11 @@
dispatchMotion(ev, displacement - mStartDisplacement, null);
if (FeatureFlags.SWIPE_HOME.get()) {
- mMotionPauseDetector.addPosition(displacement);
+ boolean isLandscape = isNavBarOnLeft() || isNavBarOnRight();
+ float orthogonalDisplacement = !isLandscape
+ ? ev.getX() - mDownPos.x
+ : ev.getY() - mDownPos.y;
+ mMotionPauseDetector.addPosition(displacement, orthogonalDisplacement);
}
}
break;
diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
index da4a3de..5b4f673 100644
--- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
+++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
@@ -15,44 +15,25 @@
*/
package com.android.quickstep;
-import static com.android.launcher3.anim.Interpolators.FAST_OUT_SLOW_IN;
-import static com.android.launcher3.anim.Interpolators.TOUCH_RESPONSE_INTERPOLATOR;
-import static com.android.quickstep.TouchConsumer.INTERACTION_NORMAL;
import static com.android.systemui.shared.system.ActivityManagerWrapper
.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
-import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_CLOSING;
-import static com.android.systemui.shared.system.RemoteAnimationTargetCompat.MODE_OPENING;
-import android.animation.Animator;
import android.animation.AnimatorSet;
-import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.content.Context;
-import android.graphics.Rect;
import android.os.Build;
import android.os.SystemClock;
-import android.util.Log;
-import android.view.View;
import android.view.ViewConfiguration;
-import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.BaseDraggingActivity;
import com.android.launcher3.MainThreadExecutor;
-import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.logging.UserEventDispatcher;
-import com.android.launcher3.userevent.nano.LauncherLogProto.Action;
-import com.android.launcher3.userevent.nano.LauncherLogProto.ContainerType;
+import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.quickstep.ActivityControlHelper.ActivityInitListener;
-import com.android.quickstep.ActivityControlHelper.AnimationFactory;
-import com.android.quickstep.util.ClipAnimationHelper;
-import com.android.quickstep.util.RemoteAnimationTargetSet;
-import com.android.quickstep.util.TransformedRect;
import com.android.quickstep.views.RecentsView;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.LatencyTrackerCompat;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
-import com.android.systemui.shared.system.SyncRtSurfaceTransactionApplierCompat;
-import com.android.systemui.shared.system.TransactionCompat;
/**
* Helper class to handle various atomic commands for switching between Overview.
@@ -60,10 +41,6 @@
@TargetApi(Build.VERSION_CODES.P)
public class OverviewCommandHelper {
- private static final long RECENTS_LAUNCH_DURATION = 250;
-
- private static final String TAG = "OverviewCommandHelper";
-
private final Context mContext;
private final ActivityManagerWrapper mAM;
private final RecentsModel mRecentsModel;
@@ -111,18 +88,17 @@
protected final ActivityControlHelper<T> mHelper;
private final long mCreateTime;
- private final int mRunningTaskId;
+ private final AppToOverviewAnimationProvider<T> mAnimationProvider;
- private ActivityInitListener mListener;
- private T mActivity;
- private RecentsView mRecentsView;
private final long mToggleClickedTime = SystemClock.uptimeMillis();
private boolean mUserEventLogged;
+ private ActivityInitListener mListener;
public RecentsActivityCommand() {
mHelper = mOverviewComponentObserver.getActivityControlHelper();
mCreateTime = SystemClock.elapsedRealtime();
- mRunningTaskId = RecentsModel.getRunningTaskId();
+ mAnimationProvider =
+ new AppToOverviewAnimationProvider<>(mHelper, RecentsModel.getRunningTaskId());
// Preload the plan
mRecentsModel.getTasks(null);
@@ -133,16 +109,21 @@
long elapsedTime = mCreateTime - mLastToggleTime;
mLastToggleTime = mCreateTime;
- if (!handleCommand(elapsedTime)) {
- // Start overview
- if (!mHelper.switchToRecentsIfVisible(true)) {
- mListener = mHelper.createActivityInitListener(this::onActivityReady);
- mListener.registerAndStartActivity(
- mOverviewComponentObserver.getOverviewIntent(),
- this::createWindowAnimation, mContext, mMainThreadExecutor.getHandler(),
- RECENTS_LAUNCH_DURATION);
- }
+ if (handleCommand(elapsedTime)) {
+ // Command already handled.
+ return;
}
+
+ if (mHelper.switchToRecentsIfVisible(true)) {
+ // If successfully switched, then return
+ return;
+ }
+
+ // Otherwise, start overview.
+ mListener = mHelper.createActivityInitListener(this::onActivityReady);
+ mListener.registerAndStartActivity(mOverviewComponentObserver.getOverviewIntent(),
+ this::createWindowAnimation, mContext, mMainThreadExecutor.getHandler(),
+ mAnimationProvider.getRecentsLaunchDuration());
}
protected boolean handleCommand(long elapsedTime) {
@@ -163,26 +144,14 @@
}
private boolean onActivityReady(T activity, Boolean wasVisible) {
- activity.<RecentsView>getOverviewPanel().setCurrentTask(mRunningTaskId);
- AbstractFloatingView.closeAllOpenViews(activity, wasVisible);
- AnimationFactory factory = mHelper.prepareRecentsUI(activity, wasVisible,
- false /* animate activity */, (controller) -> {
- controller.dispatchOnStart();
- ValueAnimator anim = controller.getAnimationPlayer()
- .setDuration(RECENTS_LAUNCH_DURATION);
- anim.setInterpolator(FAST_OUT_SLOW_IN);
- anim.start();
- });
- factory.onRemoteAnimationReceived(null);
- factory.createActivityController(RECENTS_LAUNCH_DURATION, INTERACTION_NORMAL);
- mActivity = activity;
- mRecentsView = mActivity.getOverviewPanel();
if (!mUserEventLogged) {
- activity.getUserEventDispatcher().logActionCommand(Action.Command.RECENTS_BUTTON,
- mHelper.getContainerType(), ContainerType.TASKSWITCHER);
+ activity.getUserEventDispatcher().logActionCommand(
+ LauncherLogProto.Action.Command.RECENTS_BUTTON,
+ mHelper.getContainerType(),
+ LauncherLogProto.ContainerType.TASKSWITCHER);
mUserEventLogged = true;
}
- return false;
+ return mAnimationProvider.onActivityReady(activity, wasVisible);
}
private AnimatorSet createWindowAnimation(RemoteAnimationTargetCompat[] targetCompats) {
@@ -191,80 +160,9 @@
(int) (SystemClock.uptimeMillis() - mToggleClickedTime));
}
- if (mListener != null) {
- mListener.unregister();
- }
- if (mRecentsView != null) {
- mRecentsView.setRunningTaskIconScaledDown(true);
- }
- AnimatorSet anim = new AnimatorSet();
- anim.addListener(new AnimationSuccessListener() {
- @Override
- public void onAnimationSuccess(Animator animator) {
- if (mRecentsView != null) {
- mRecentsView.animateUpRunningTaskIconScale();
- }
- }
- });
- if (mActivity == null) {
- Log.e(TAG, "Animation created, before activity");
- anim.play(ValueAnimator.ofInt(0, 1).setDuration(100));
- return anim;
- }
+ mListener.unregister();
- RemoteAnimationTargetSet targetSet =
- new RemoteAnimationTargetSet(targetCompats, MODE_CLOSING);
-
- // Use the top closing app to determine the insets for the animation
- RemoteAnimationTargetCompat runningTaskTarget = targetSet.findTask(mRunningTaskId);
- if (runningTaskTarget == null) {
- Log.e(TAG, "No closing app");
- anim.play(ValueAnimator.ofInt(0, 1).setDuration(100));
- return anim;
- }
-
- final ClipAnimationHelper clipHelper = new ClipAnimationHelper(mActivity);
-
- // At this point, the activity is already started and laid-out. Get the home-bounds
- // relative to the screen using the rootView of the activity.
- int loc[] = new int[2];
- View rootView = mActivity.getRootView();
- rootView.getLocationOnScreen(loc);
- Rect homeBounds = new Rect(loc[0], loc[1],
- loc[0] + rootView.getWidth(), loc[1] + rootView.getHeight());
- clipHelper.updateSource(homeBounds, runningTaskTarget);
-
- TransformedRect targetRect = new TransformedRect();
- mHelper.getSwipeUpDestinationAndLength(mActivity.getDeviceProfile(), mActivity,
- INTERACTION_NORMAL, targetRect);
- clipHelper.updateTargetRect(targetRect);
- clipHelper.prepareAnimation(false /* isOpening */);
-
- ClipAnimationHelper.TransformParams params = new ClipAnimationHelper.TransformParams()
- .setSyncTransactionApplier(new SyncRtSurfaceTransactionApplierCompat(rootView));
- ValueAnimator valueAnimator = ValueAnimator.ofFloat(0, 1);
- valueAnimator.setDuration(RECENTS_LAUNCH_DURATION);
- valueAnimator.setInterpolator(TOUCH_RESPONSE_INTERPOLATOR);
- valueAnimator.addUpdateListener((v) -> {
- params.setProgress((float) v.getAnimatedValue());
- clipHelper.applyTransform(targetSet, params);
- });
-
- if (targetSet.isAnimatingHome()) {
- // If we are animating home, fade in the opening targets
- RemoteAnimationTargetSet openingSet =
- new RemoteAnimationTargetSet(targetCompats, MODE_OPENING);
-
- TransactionCompat transaction = new TransactionCompat();
- valueAnimator.addUpdateListener((v) -> {
- for (RemoteAnimationTargetCompat app : openingSet.apps) {
- transaction.setAlpha(app.leash, (float) v.getAnimatedValue());
- }
- transaction.apply();
- });
- }
- anim.play(valueAnimator);
- return anim;
+ return mAnimationProvider.createWindowAnimation(targetCompats);
}
}
}
diff --git a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
index e119e53..b6741f4 100644
--- a/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
+++ b/quickstep/src/com/android/quickstep/OverviewComponentObserver.java
@@ -31,8 +31,6 @@
import android.content.pm.ResolveInfo;
import android.os.PatternMatcher;
-import com.android.quickstep.ActivityControlHelper.FallbackActivityControllerHelper;
-import com.android.quickstep.ActivityControlHelper.LauncherActivityControllerHelper;
import com.android.systemui.shared.system.PackageManagerWrapper;
import java.util.ArrayList;
diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java
index 164c9bd..d5de3ff 100644
--- a/quickstep/src/com/android/quickstep/TouchInteractionService.java
+++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java
@@ -347,7 +347,8 @@
startTouchTracking(ev, true /* updateLocationOffset */);
break;
case ACTION_MOVE: {
- float displacement = ev.getY() - mDownPos.y;
+ float displacement = mActivity.getDeviceProfile().isLandscape ?
+ ev.getX() - mDownPos.x : ev.getY() - mDownPos.y;
if (Math.abs(displacement) >= mTouchSlop) {
// Start tracking only when mTouchSlop is crossed.
startTouchTracking(ev, true /* updateLocationOffset */);
diff --git a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
index 86a8081..c1417dd 100644
--- a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
+++ b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
@@ -478,6 +478,7 @@
SyncRtSurfaceTransactionApplierCompat.create(mRecentsView, (applier) -> {
mSyncTransactionApplier = applier;
});
+ mRecentsView.setEnableFreeScroll(false);
mRecentsView.setOnScrollChangeListener((v, scrollX, scrollY, oldScrollX, oldScrollY) -> {
if (!mBgLongSwipeMode && !mIsGoingToHome) {
updateFinalShift();
@@ -910,7 +911,8 @@
Interpolator interpolator = DEACCEL;
final int nextPage = mRecentsView != null ? mRecentsView.getNextPage() : -1;
final int runningTaskIndex = mRecentsView != null ? mRecentsView.getRunningTaskIndex() : -1;
- boolean goingToNewTask = mRecentsView != null && nextPage != runningTaskIndex;
+ boolean goingToNewTask = mRecentsView != null && nextPage != runningTaskIndex
+ && mRecentsView.getTaskViewAt(nextPage) != null;
final boolean reachedOverviewThreshold = currentShift >= MIN_PROGRESS_FOR_OVERVIEW;
if (!isFling) {
if (SWIPE_HOME.get()) {
@@ -922,7 +924,11 @@
endTarget = currentShift < MIN_PROGRESS_FOR_OVERVIEW ? LAST_TASK : HOME;
}
} else {
- endTarget = reachedOverviewThreshold && mGestureStarted ? RECENTS : LAST_TASK;
+ endTarget = reachedOverviewThreshold && mGestureStarted
+ ? RECENTS
+ : goingToNewTask
+ ? NEW_TASK
+ : LAST_TASK;
}
endShift = endTarget.endShift;
long expectedDuration = Math.abs(Math.round((endShift - currentShift)
@@ -932,7 +938,9 @@
interpolator = endTarget == RECENTS ? OVERSHOOT_1_2 : DEACCEL;
} else {
if (SWIPE_HOME.get() && endVelocity < 0 && !mIsShelfPeeking) {
- endTarget = HOME;
+ // If swiping at a diagonal, base end target on the faster velocity.
+ endTarget = goingToNewTask && Math.abs(velocityX) > Math.abs(endVelocity)
+ ? NEW_TASK : HOME;
} else if (endVelocity < 0 && (!goingToNewTask || reachedOverviewThreshold)) {
// If user scrolled to a new task, only go to recents if they already passed
// the overview threshold. Otherwise, we'll snap to the new task and launch it.
@@ -970,27 +978,21 @@
duration = Math.max(MIN_OVERSHOOT_DURATION, duration);
} else if (endTarget == RECENTS) {
mRecentsAnimationWrapper.enableTouchProxy();
+ if (mRecentsView != null) {
+ duration = Math.max(duration, mRecentsView.getScroller().getDuration());
+ }
if (SWIPE_HOME.get()) {
setShelfState(ShelfAnimState.OVERVIEW, interpolator, duration);
}
} else if (endTarget == NEW_TASK) {
- // We aren't goingToRecents, and user scrolled/flung to a new task; snap to the closest
- // task in that direction and launch it (in startNewTask()).
- int taskToLaunch = runningTaskIndex + (nextPage > runningTaskIndex ? 1 : -1);
- if (taskToLaunch >= mRecentsView.getTaskViewCount()) {
+ // Let RecentsView handle the scrolling to the task, which we launch in startNewTask().
+ if (mRecentsView != null) {
+ duration = Math.max(duration, mRecentsView.getScroller().getDuration());
+ }
+ } else if (endTarget == LAST_TASK) {
+ if (mRecentsView != null && nextPage != runningTaskIndex) {
// Scrolled to Clear all button, snap back to current task and resume it.
mRecentsView.snapToPage(runningTaskIndex, Math.toIntExact(duration));
- goingToNewTask = false;
- } else {
- float distance = Math.abs(mRecentsView.getScrollForPage(taskToLaunch)
- - mRecentsView.getScrollX());
- int durationX = (int) Math.abs(distance / velocityXPxPerMs);
- if (durationX > MAX_SWIPE_DURATION) {
- durationX = Math.toIntExact(MAX_SWIPE_DURATION);
- }
- interpolator = Interpolators.scrollInterpolatorForVelocity(velocityXPxPerMs);
- mRecentsView.snapToPage(taskToLaunch, durationX, interpolator);
- duration = Math.max(duration, durationX);
}
}
animateToProgress(startShift, endShift, duration, interpolator, endTarget, velocityPxPerMs);
@@ -1162,11 +1164,18 @@
@UiThread
private void startNewTask() {
// Launch the task user scrolled to (mRecentsView.getNextPage()).
- mRecentsAnimationWrapper.finish(true /* toRecents */, () -> {
+ if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
+ // We finish recents animation inside launchTask() when live tile is enabled.
mRecentsView.getTaskViewAt(mRecentsView.getNextPage()).launchTask(false,
result -> setStateOnUiThread(STATE_HANDLER_INVALIDATED),
mMainThreadHandler);
- });
+ } else {
+ mRecentsAnimationWrapper.finish(true /* toRecents */, () -> {
+ mRecentsView.getTaskViewAt(mRecentsView.getNextPage()).launchTask(false,
+ result -> setStateOnUiThread(STATE_HANDLER_INVALIDATED),
+ mMainThreadHandler);
+ });
+ }
mTouchInteractionLog.finishRecentsAnimation(false);
doLogGesture(NEW_TASK);
}
@@ -1195,6 +1204,7 @@
mLayoutListener.finish();
mActivityControlHelper.getAlphaProperty(mActivity).setValue(1);
+ mRecentsView.setEnableFreeScroll(true);
mRecentsView.setRunningTaskIconScaledDown(false);
mRecentsView.setOnScrollChangeListener(null);
mQuickScrubController.cancelActiveQuickscrub();
diff --git a/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java b/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java
index c612b05..57400bd 100644
--- a/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java
+++ b/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java
@@ -32,7 +32,6 @@
import android.os.Build;
import android.os.RemoteException;
import android.view.animation.Interpolator;
-
import androidx.annotation.Nullable;
import com.android.launcher3.BaseDraggingActivity;
@@ -277,7 +276,8 @@
updateStackBoundsToMultiWindowTaskSize(activity);
} else {
mSourceStackBounds.set(mHomeStackBounds);
- mSourceInsets.set(ttv.getInsets());
+ Rect fallback = dl.getInsets();
+ mSourceInsets.set(ttv.getInsets(fallback));
}
TransformedRect targetRect = new TransformedRect();
diff --git a/quickstep/src/com/android/quickstep/util/MotionPauseDetector.java b/quickstep/src/com/android/quickstep/util/MotionPauseDetector.java
index 7969eec..1156b87 100644
--- a/quickstep/src/com/android/quickstep/util/MotionPauseDetector.java
+++ b/quickstep/src/com/android/quickstep/util/MotionPauseDetector.java
@@ -36,12 +36,15 @@
private final float mSpeedSomewhatFast;
private final float mSpeedFast;
private final float mMinDisplacementForPause;
+ private final float mMaxOrthogonalDisplacementForPause;
private Long mPreviousTime = null;
private Float mPreviousPosition = null;
private Float mPreviousVelocity = null;
+ private TotalDisplacement mTotalDisplacement = new TotalDisplacement();
private Float mFirstPosition = null;
+ private Float mFirstOrthogonalPosition = null;
private OnMotionPauseListener mOnMotionPauseListener;
private boolean mIsPaused;
@@ -54,6 +57,8 @@
mSpeedSomewhatFast = res.getDimension(R.dimen.motion_pause_detector_speed_somewhat_fast);
mSpeedFast = res.getDimension(R.dimen.motion_pause_detector_speed_fast);
mMinDisplacementForPause = res.getDimension(R.dimen.motion_pause_detector_min_displacement);
+ mMaxOrthogonalDisplacementForPause = res.getDimension(
+ R.dimen.motion_pause_detector_max_orthogonal_displacement);
}
/**
@@ -70,20 +75,26 @@
/**
* Computes velocity and acceleration to determine whether the motion is paused.
* @param position The x or y component of the motion being tracked.
+ * @param orthogonalPosition The x or y component (opposite of {@param position}) of the motion.
*
* TODO: Use historical positions as well, e.g. {@link MotionEvent#getHistoricalY(int, int)}.
*/
- public void addPosition(float position) {
+ public void addPosition(float position, float orthogonalPosition) {
if (mFirstPosition == null) {
mFirstPosition = position;
}
+ if (mFirstOrthogonalPosition == null) {
+ mFirstOrthogonalPosition = orthogonalPosition;
+ }
long time = SystemClock.uptimeMillis();
if (mPreviousTime != null && mPreviousPosition != null) {
long changeInTime = Math.max(1, time - mPreviousTime);
float changeInPosition = position - mPreviousPosition;
float velocity = changeInPosition / changeInTime;
if (mPreviousVelocity != null) {
- checkMotionPaused(velocity, mPreviousVelocity, Math.abs(position - mFirstPosition));
+ mTotalDisplacement.set(Math.abs(position - mFirstPosition),
+ Math.abs(orthogonalPosition - mFirstOrthogonalPosition));
+ checkMotionPaused(velocity, mPreviousVelocity, mTotalDisplacement);
}
mPreviousVelocity = velocity;
}
@@ -91,7 +102,8 @@
mPreviousPosition = position;
}
- private void checkMotionPaused(float velocity, float prevVelocity, float totalDisplacement) {
+ private void checkMotionPaused(float velocity, float prevVelocity,
+ TotalDisplacement totalDisplacement) {
float speed = Math.abs(velocity);
float previousSpeed = Math.abs(prevVelocity);
boolean isPaused;
@@ -113,8 +125,10 @@
}
}
}
- boolean passedMinDisplacement = totalDisplacement >= mMinDisplacementForPause;
- isPaused &= passedMinDisplacement;
+ boolean passedMinDisplacement = totalDisplacement.primary >= mMinDisplacementForPause;
+ boolean passedMaxOrthogonalDisplacement =
+ totalDisplacement.orthogonal >= mMaxOrthogonalDisplacementForPause;
+ isPaused &= passedMinDisplacement && !passedMaxOrthogonalDisplacement;
if (mIsPaused != isPaused) {
mIsPaused = isPaused;
if (mIsPaused) {
@@ -131,6 +145,8 @@
mPreviousPosition = null;
mPreviousVelocity = null;
mFirstPosition = null;
+ mFirstOrthogonalPosition = null;
+ mTotalDisplacement.set(0, 0);
setOnMotionPauseListener(null);
mIsPaused = mHasEverBeenPaused = false;
}
@@ -142,4 +158,18 @@
public interface OnMotionPauseListener {
void onMotionPauseChanged(boolean isPaused);
}
+
+ /**
+ * Contains the displacement from the first tracked position,
+ * along both the primary and orthogonal axes.
+ */
+ private class TotalDisplacement {
+ public float primary;
+ public float orthogonal;
+
+ public void set(float primaryDisplacement, float orthogonalDisplacement) {
+ this.primary = primaryDisplacement;
+ this.orthogonal = orthogonalDisplacement;
+ }
+ }
}
diff --git a/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java b/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java
index 9ad750b..bbcd425 100644
--- a/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java
+++ b/quickstep/src/com/android/quickstep/views/DigitalWellBeingToast.java
@@ -16,6 +16,8 @@
package com.android.quickstep.views;
+import static android.provider.Settings.ACTION_APP_USAGE_SETTINGS;
+
import android.app.ActivityOptions;
import android.content.ActivityNotFoundException;
import android.content.Context;
@@ -47,6 +49,8 @@
import java.util.Locale;
public final class DigitalWellBeingToast extends LinearLayout {
+ static final Intent OPEN_APP_USAGE_SETTINGS_TEMPLATE = new Intent(ACTION_APP_USAGE_SETTINGS);
+
public interface InitializeCallback {
void call(float saturation, String contentDescription);
}
@@ -189,7 +193,7 @@
}
public void openAppUsageSettings() {
- final Intent intent = new Intent(TaskView.SEE_TIME_IN_APP_TEMPLATE)
+ final Intent intent = new Intent(OPEN_APP_USAGE_SETTINGS_TEMPLATE)
.putExtra(Intent.EXTRA_PACKAGE_NAME,
mTask.getTopComponent().getPackageName()).addFlags(
Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index c6f293d..5925c4c 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -83,6 +83,7 @@
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
+import com.android.launcher3.util.OverScroller;
import com.android.launcher3.util.PendingAnimation;
import com.android.launcher3.util.Themes;
import com.android.launcher3.util.ViewPool;
@@ -119,7 +120,7 @@
public static final float SPRING_MIN_VISIBLE_CHANGE = 0.001f;
public static final float SPRING_DAMPING_RATIO = SpringForce.DAMPING_RATIO_MEDIUM_BOUNCY;
- public static final float SPRING_STIFFNESS = SpringForce.STIFFNESS_LOW;
+ public static final float SPRING_STIFFNESS = SpringForce.STIFFNESS_MEDIUM;
public static final FloatProperty<RecentsView> CONTENT_ALPHA =
new FloatProperty<RecentsView>("contentAlpha") {
@@ -339,6 +340,10 @@
updateEmptyMessage();
}
+ public OverScroller getScroller() {
+ return mScroller;
+ }
+
public boolean isRtl() {
return mIsRtl;
}
@@ -412,7 +417,7 @@
public TaskView getTaskView(int taskId) {
for (int i = 0; i < getTaskViewCount(); i++) {
TaskView tv = (TaskView) getChildAt(i);
- if (tv.getTask().key != null && tv.getTask().key.id == taskId) {
+ if (tv.getTask() != null && tv.getTask().key != null && tv.getTask().key.id == taskId) {
return tv;
}
}
@@ -1580,7 +1585,7 @@
mClipAnimationHelper = clipAnimationHelper;
}
- public void finishRecentsAnimation(boolean toHome, Runnable onFinishComplete) {
+ public void finishRecentsAnimation(boolean toRecents, Runnable onFinishComplete) {
if (mRecentsAnimationWrapper == null) {
if (onFinishComplete != null) {
onFinishComplete.run();
@@ -1588,10 +1593,11 @@
return;
}
- mRecentsAnimationWrapper.finish(toHome, onFinishComplete);
+ mRecentsAnimationWrapper.finish(toRecents, onFinishComplete);
}
- public void takeScreenshotAndFinishRecentsAnimation(boolean toHome, Runnable onFinishComplete) {
+ public void takeScreenshotAndFinishRecentsAnimation(boolean toRecents,
+ Runnable onFinishComplete) {
if (mRecentsAnimationWrapper == null || getRunningTaskView() == null) {
if (onFinishComplete != null) {
onFinishComplete.run();
@@ -1626,7 +1632,7 @@
}
detach();
- mRecentsAnimationWrapper.finish(toHome, () -> {
+ mRecentsAnimationWrapper.finish(toRecents, () -> {
onFinishComplete.run();
mRunningTaskId = -1;
});
diff --git a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
index d0289d0..90604ef 100644
--- a/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskThumbnailView.java
@@ -169,11 +169,11 @@
return mDimAlpha;
}
- public Rect getInsets() {
+ public Rect getInsets(Rect fallback) {
if (mThumbnailData != null) {
return mThumbnailData.insets;
}
- return new Rect();
+ return fallback;
}
public int getSysUiStatusNavFlags() {
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java
index ad63c24..71ca22d 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskView.java
@@ -133,9 +133,6 @@
}
};
- static final Intent SEE_TIME_IN_APP_TEMPLATE =
- new Intent("com.android.settings.action.TIME_SPENT_IN_APP");
-
private final OnAttachStateChangeListener mTaskMenuStateListener =
new OnAttachStateChangeListener() {
@Override
diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
index 8f7cf92..e9d8bce 100644
--- a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
+++ b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
@@ -176,6 +176,13 @@
// Test UIDevice.pressHome, once we are in AllApps.
mDevice.pressHome();
waitForState("Launcher internal state didn't switch to Home", LauncherState.NORMAL);
+
+ // Test dismissing all tasks.
+ mLauncher.getWorkspace().switchToOverview().dismissAllTasks();
+ waitForState("Launcher internal state didn't switch to Home", LauncherState.NORMAL);
+ executeOnLauncher(
+ launcher -> assertEquals("Still have tasks after dismissing all",
+ 0, getTaskCount(launcher)));
}
private int getCurrentOverviewPage(Launcher launcher) {
@@ -221,4 +228,20 @@
assertTrue("Launcher internal state didn't switch to Overview",
isInState(LauncherState.OVERVIEW));
}
+
+ @Test
+ @PortraitLandscape
+ public void testAllAppsFromHome() throws Exception {
+ // Test opening all apps
+ assertNotNull("switchToAllApps() returned null",
+ mLauncher.getWorkspace().switchToAllApps());
+
+ TaplTestsLauncher3.runAllAppsTest(this, mLauncher.getAllApps());
+
+ // Testing pressHome.
+ assertTrue("Launcher internal state is not All Apps", isInState(LauncherState.ALL_APPS));
+ assertNotNull("pressHome returned null", mLauncher.pressHome());
+ assertTrue("Launcher internal state is not Home", isInState(LauncherState.NORMAL));
+ assertNotNull("getHome returned null", mLauncher.getWorkspace());
+ }
}
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 08abb4b..49d5f56 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -33,7 +33,7 @@
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"ダブルタップ後に押し続けてウィジェットを選択するか、カスタム操作を使用してください。"</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$dx%2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"幅 %1$d、高さ %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"押し続けると、手動で追加できます"</string>
+ <string name="add_item_request_drag_hint" msgid="5899764264480397019">"長押しすると、手動で追加できます"</string>
<string name="place_automatically" msgid="8064208734425456485">"自動的に追加"</string>
<string name="all_apps_search_bar_hint" msgid="1390553134053255246">"アプリを検索"</string>
<string name="all_apps_loading_message" msgid="5813968043155271636">"アプリを読み込んでいます…"</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 9f7e503..7bdf9c4 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -33,7 +33,7 @@
<string name="long_accessible_way_to_add" msgid="4289502106628154155">"Miniaplikáciu pridáte dvojitým klepnutím a pridržaním alebo pomocou vlastných akcií."</string>
<string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"šírka %1$d, výška %2$d"</string>
- <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Položku umiestnite ručne klepnutím a podržaním"</string>
+ <string name="add_item_request_drag_hint" msgid="5899764264480397019">"Ak chcete položku umiestniť ručne, pridržte ju"</string>
<string name="place_automatically" msgid="8064208734425456485">"Pridať automaticky"</string>
<string name="all_apps_search_bar_hint" msgid="1390553134053255246">"Hľadať aplikácie"</string>
<string name="all_apps_loading_message" msgid="5813968043155271636">"Načítavajú sa aplikácie…"</string>
diff --git a/robolectric_tests/src/com/android/launcher3/model/BaseModelUpdateTaskTestCase.java b/robolectric_tests/src/com/android/launcher3/model/BaseModelUpdateTaskTestCase.java
index 92d065e..ab39274 100644
--- a/robolectric_tests/src/com/android/launcher3/model/BaseModelUpdateTaskTestCase.java
+++ b/robolectric_tests/src/com/android/launcher3/model/BaseModelUpdateTaskTestCase.java
@@ -25,11 +25,9 @@
import com.android.launcher3.LauncherModel.Callbacks;
import com.android.launcher3.LauncherModel.ModelUpdateTask;
import com.android.launcher3.LauncherProvider;
-import com.android.launcher3.icons.BitmapInfo;
import com.android.launcher3.icons.IconCache;
import com.android.launcher3.icons.cache.CachingLogic;
import com.android.launcher3.util.ComponentKey;
-import com.android.launcher3.util.Provider;
import com.android.launcher3.util.TestLauncherProvider;
import org.junit.Before;
@@ -45,6 +43,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.Executor;
+import java.util.function.Supplier;
import androidx.annotation.NonNull;
@@ -196,7 +195,7 @@
@Override
protected <T> CacheEntry cacheLocked(
@NonNull ComponentName componentName,
- UserHandle user, @NonNull Provider<T> infoProvider,
+ UserHandle user, @NonNull Supplier<T> infoProvider,
@NonNull CachingLogic<T> cachingLogic,
boolean usePackageIcon, boolean useLowResIcon) {
CacheEntry entry = mCache.get(new ComponentKey(componentName, user));
diff --git a/src/com/android/launcher3/BaseDraggingActivity.java b/src/com/android/launcher3/BaseDraggingActivity.java
index 5b9b172..ff9dd13 100644
--- a/src/com/android/launcher3/BaseDraggingActivity.java
+++ b/src/com/android/launcher3/BaseDraggingActivity.java
@@ -44,10 +44,6 @@
private static final String TAG = "BaseDraggingActivity";
- // The Intent extra that defines whether to ignore the launch animation
- public static final String INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION =
- "com.android.launcher3.intent.extra.shortcut.INGORE_LAUNCH_ANIMATION";
-
// When starting an action mode, setting this tag will cause the action mode to be cancelled
// automatically when user interacts with the launcher.
public static final Object AUTO_CANCEL_ACTION_MODE = new Object();
@@ -158,14 +154,7 @@
return false;
}
- // Only launch using the new animation if the shortcut has not opted out (this is a
- // private contract between launcher and may be ignored in the future).
- boolean useLaunchAnimation = (v != null) &&
- !intent.hasExtra(INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION);
- Bundle optsBundle = useLaunchAnimation
- ? getActivityLaunchOptionsAsBundle(v)
- : null;
-
+ Bundle optsBundle = (v != null) ? getActivityLaunchOptionsAsBundle(v) : null;
UserHandle user = item == null ? null : item.user;
// Prepare intent
diff --git a/src/com/android/launcher3/InstallShortcutReceiver.java b/src/com/android/launcher3/InstallShortcutReceiver.java
index ea59fff..5c5f5e4 100644
--- a/src/com/android/launcher3/InstallShortcutReceiver.java
+++ b/src/com/android/launcher3/InstallShortcutReceiver.java
@@ -57,6 +57,7 @@
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -172,7 +173,7 @@
Log.d(TAG, "APPS_PENDING_INSTALL: " + strings
+ ", removing packages: " + packageNames);
}
- if (Utilities.isEmpty(strings)) {
+ if (strings == null || ((Collection) strings).isEmpty()) {
return;
}
Set<String> newStrings = new HashSet<>(strings);
@@ -268,7 +269,7 @@
HashSet<ShortcutKey> result = new HashSet<>();
Set<String> strings = Utilities.getPrefs(context).getStringSet(APPS_PENDING_INSTALL, null);
- if (Utilities.isEmpty(strings)) {
+ if (strings == null || ((Collection) strings).isEmpty()) {
return result;
}
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 1084e7a..73fba4e 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -146,6 +146,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import java.util.function.Predicate;
import androidx.annotation.Nullable;
@@ -153,7 +154,8 @@
* Default launcher application.
*/
public class Launcher extends BaseDraggingActivity implements LauncherExterns,
- LauncherModel.Callbacks, LauncherProviderChangeListener, UserEventDelegate{
+ LauncherModel.Callbacks, LauncherProviderChangeListener, UserEventDelegate,
+ InvariantDeviceProfile.OnIDPChangeListener {
public static final String TAG = "Launcher";
static final boolean LOGD = false;
@@ -285,8 +287,9 @@
LauncherAppState app = LauncherAppState.getInstance(this);
mOldConfig = new Configuration(getResources().getConfiguration());
mModel = app.setLauncher(this);
- initDeviceProfile(app.getInvariantDeviceProfile());
-
+ InvariantDeviceProfile idp = app.getInvariantDeviceProfile();
+ initDeviceProfile(idp);
+ idp.addOnChangeListener(this);
mSharedPrefs = Utilities.getPrefs(this);
mIconCache = app.getIconCache();
mAccessibilityDelegate = new LauncherAccessibilityDelegate(this);
@@ -406,6 +409,12 @@
}
}
+ @Override
+ public void onIdpChanged(int changeFlags, InvariantDeviceProfile idp) {
+ initDeviceProfile(idp);
+ getRootView().dispatchInsets();
+ }
+
private void initDeviceProfile(InvariantDeviceProfile idp) {
// Load configuration-specific DeviceProfile
mDeviceProfile = idp.getDeviceProfile(this);
@@ -1110,7 +1119,7 @@
}
};
- public void updateNotificationDots(final Set<PackageUserKey> updatedDots) {
+ public void updateNotificationDots(Predicate<PackageUserKey> updatedDots) {
mWorkspace.updateNotificationDots(updatedDots);
mAppsView.getAppsStore().updateNotificationDots(updatedDots);
@@ -1322,7 +1331,7 @@
TextKeyListener.getInstance().release();
clearPendingBinds();
-
+ LauncherAppState.getIDP(this).removeOnChangeListener(this);
if (mLauncherCallbacks != null) {
mLauncherCallbacks.onDestroy();
}
@@ -1383,11 +1392,6 @@
}
private void setWorkspaceLoading(boolean value) {
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845", "setWorkspaceLoading " + value + " @ " +
- android.util.Log.getStackTraceString(new Throwable()));
- }
mWorkspaceLoading = value;
}
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index c38423a..5ab6eea 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -208,11 +208,6 @@
static void checkItemInfoLocked(
final int itemId, final ItemInfo item, StackTraceElement[] stackTrace) {
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- "Checking item: " + android.util.Log.getStackTraceString(new Throwable()));
- }
ItemInfo modelItem = sBgDataModel.itemsIdMap.get(itemId);
if (modelItem != null && item != modelItem) {
// check all the data is consistent
@@ -408,11 +403,6 @@
* @return true if the page could be bound synchronously.
*/
public boolean startLoader(int synchronousBindPage) {
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- android.util.Log.getStackTraceString(new Throwable()));
- }
// Enable queue before starting loader. It will get disabled in Launcher#finishBindingItems
InstallShortcutReceiver.enableInstallQueue(InstallShortcutReceiver.FLAG_LOADER_RUNNING);
synchronized (mLock) {
@@ -512,11 +502,6 @@
synchronized (mLock) {
// Everything loaded bind the data.
mModelLoaded = true;
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- android.util.Log.getStackTraceString(new Throwable()));
- }
}
}
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java
index 8f9e7c8..018ec5f 100644
--- a/src/com/android/launcher3/PagedView.java
+++ b/src/com/android/launcher3/PagedView.java
@@ -1053,7 +1053,7 @@
}
- protected void setEnableFreeScroll(boolean freeScroll) {
+ public void setEnableFreeScroll(boolean freeScroll) {
boolean wasFreeScroll = mFreeScroll;
mFreeScroll = freeScroll;
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index c847120..60dfbb7 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -57,8 +57,6 @@
import java.io.Closeable;
import java.io.IOException;
import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.HashSet;
import java.util.Locale;
import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
@@ -514,47 +512,12 @@
}
}
- /**
- * Returns true if {@param original} contains all entries defined in {@param updates} and
- * have the same value.
- * The comparison uses {@link Object#equals(Object)} to compare the values.
- */
- public static boolean containsAll(Bundle original, Bundle updates) {
- for (String key : updates.keySet()) {
- Object value1 = updates.get(key);
- Object value2 = original.get(key);
- if (value1 == null) {
- if (value2 != null) {
- return false;
- }
- } else if (!value1.equals(value2)) {
- return false;
- }
- }
- return true;
- }
-
- /** Returns whether the collection is null or empty. */
- public static boolean isEmpty(Collection c) {
- return c == null || c.isEmpty();
- }
-
public static boolean isBinderSizeError(Exception e) {
return e.getCause() instanceof TransactionTooLargeException
|| e.getCause() instanceof DeadObjectException;
}
/**
- * Returns a HashSet with a single element. We use this instead of Collections.singleton()
- * because HashSet ensures all operations, such as remove, are supported.
- */
- public static <T> HashSet<T> singletonHashSet(T elem) {
- HashSet<T> hashSet = new HashSet<>(1);
- hashSet.add(elem);
- return hashSet;
- }
-
- /**
* Utility method to post a runnable on the handler, skipping the synchronization barriers.
*/
public static void postAsyncCallback(Handler handler, Runnable callback) {
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 3438a26..2db6cd9 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -98,6 +98,7 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
+import java.util.function.Predicate;
/**
* The workspace is a wide area with a wallpaper and a finite number of pages.
@@ -3059,7 +3060,7 @@
});
}
- public void updateNotificationDots(final Set<PackageUserKey> updatedDots) {
+ public void updateNotificationDots(Predicate<PackageUserKey> updatedDots) {
final PackageUserKey packageUserKey = new PackageUserKey(null, null);
final IntSet folderIds = new IntSet();
mapOverItems(MAP_RECURSE, new ItemOperator() {
@@ -3067,7 +3068,7 @@
public boolean evaluate(ItemInfo info, View v) {
if (info instanceof ShortcutInfo && v instanceof BubbleTextView) {
if (!packageUserKey.updateFromItemInfo(info)
- || updatedDots.contains(packageUserKey)) {
+ || updatedDots.test(packageUserKey)) {
((BubbleTextView) v).applyDotState(info, true /* animate */);
folderIds.add(info.container);
}
diff --git a/src/com/android/launcher3/allapps/AllAppsStore.java b/src/com/android/launcher3/allapps/AllAppsStore.java
index 52d7d28..8e7fec8 100644
--- a/src/com/android/launcher3/allapps/AllAppsStore.java
+++ b/src/com/android/launcher3/allapps/AllAppsStore.java
@@ -31,6 +31,7 @@
import java.util.List;
import java.util.Set;
import java.util.function.Consumer;
+import java.util.function.Predicate;
/**
* A utility class to maintain the collection of all apps.
@@ -122,11 +123,11 @@
mIconContainers.remove(container);
}
- public void updateNotificationDots(Set<PackageUserKey> updatedDots) {
+ public void updateNotificationDots(Predicate<PackageUserKey> updatedDots) {
updateAllIcons((child) -> {
if (child.getTag() instanceof ItemInfo) {
ItemInfo info = (ItemInfo) child.getTag();
- if (mTempKey.updateFromItemInfo(info) && updatedDots.contains(mTempKey)) {
+ if (mTempKey.updateFromItemInfo(info) && updatedDots.test(mTempKey)) {
child.applyDotState(info, true /* animate */);
}
}
diff --git a/src/com/android/launcher3/anim/AnimatorPlaybackController.java b/src/com/android/launcher3/anim/AnimatorPlaybackController.java
index cf070c5..2c440bb 100644
--- a/src/com/android/launcher3/anim/AnimatorPlaybackController.java
+++ b/src/com/android/launcher3/anim/AnimatorPlaybackController.java
@@ -236,7 +236,7 @@
private void dispatchOnStartRecursively(Animator animator) {
List<AnimatorListener> listeners = animator instanceof SpringObjectAnimator
- ? nonNullList(((SpringObjectAnimator) animator).getSuperListeners())
+ ? nonNullList(((SpringObjectAnimator) animator).getObjectAnimatorListeners())
: nonNullList(animator.getListeners());
for (AnimatorListener l : listeners) {
diff --git a/src/com/android/launcher3/anim/SpringObjectAnimator.java b/src/com/android/launcher3/anim/SpringObjectAnimator.java
index 4f45c05..cc70e32 100644
--- a/src/com/android/launcher3/anim/SpringObjectAnimator.java
+++ b/src/com/android/launcher3/anim/SpringObjectAnimator.java
@@ -85,7 +85,7 @@
// We use this listener and track mListeners so that we can sync the animator and spring
// listeners.
- super.addListener(new AnimatorListenerAdapter() {
+ mObjectAnimator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
mAnimatorEnded = false;
@@ -157,8 +157,8 @@
mListeners.add(listener);
}
- public ArrayList<AnimatorListener> getSuperListeners() {
- return super.getListeners();
+ public ArrayList<AnimatorListener> getObjectAnimatorListeners() {
+ return mObjectAnimator.getListeners();
}
@Override
diff --git a/src/com/android/launcher3/model/BaseLoaderResults.java b/src/com/android/launcher3/model/BaseLoaderResults.java
index 23c6faf..210f744 100644
--- a/src/com/android/launcher3/model/BaseLoaderResults.java
+++ b/src/com/android/launcher3/model/BaseLoaderResults.java
@@ -251,11 +251,6 @@
protected void bindWorkspaceItems(final ArrayList<ItemInfo> workspaceItems,
final Executor executor) {
-
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- Log.d("b/117332845", Log.getStackTraceString(new Throwable()));
- }
// Bind the workspace items
int N = workspaceItems.size();
for (int i = 0; i < N; i += ITEMS_CHUNK) {
diff --git a/src/com/android/launcher3/model/LoaderTask.java b/src/com/android/launcher3/model/LoaderTask.java
index 4fe0c85..7275576 100644
--- a/src/com/android/launcher3/model/LoaderTask.java
+++ b/src/com/android/launcher3/model/LoaderTask.java
@@ -124,11 +124,6 @@
mPackageInstaller = PackageInstallerCompat.getInstance(mApp.getContext());
mAppWidgetManager = AppWidgetManagerCompat.getInstance(mApp.getContext());
mIconCache = mApp.getIconCache();
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- android.util.Log.getStackTraceString(new Throwable()));
- }
}
protected synchronized void waitForIdle() {
diff --git a/src/com/android/launcher3/model/ModelWriter.java b/src/com/android/launcher3/model/ModelWriter.java
index d8d9930..ac5076c 100644
--- a/src/com/android/launcher3/model/ModelWriter.java
+++ b/src/com/android/launcher3/model/ModelWriter.java
@@ -109,11 +109,6 @@
}
private void checkItemInfoLocked(int itemId, ItemInfo item, StackTraceElement[] stackTrace) {
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- "Checking item: " + android.util.Log.getStackTraceString(new Throwable()));
- }
ItemInfo modelItem = mBgDataModel.itemsIdMap.get(itemId);
if (modelItem != null && item != modelItem) {
// check all the data is consistent
@@ -363,11 +358,6 @@
private final int mItemId;
UpdateItemRunnable(ItemInfo item, ContentWriter writer) {
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- android.util.Log.getStackTraceString(new Throwable()));
- }
mItem = item;
mWriter = writer;
mItemId = item.id;
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
index 288d568..9b23f3f 100644
--- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java
+++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java
@@ -73,6 +73,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.function.Predicate;
/**
* A container for shortcuts to deep links and notifications associated with an app.
@@ -463,10 +464,10 @@
/**
* Updates the notification header if the original icon's dot updated.
*/
- public void updateNotificationHeader(Set<PackageUserKey> updatedDots) {
+ public void updateNotificationHeader(Predicate<PackageUserKey> updatedDots) {
ItemInfo itemInfo = (ItemInfo) mOriginalIcon.getTag();
PackageUserKey packageUser = PackageUserKey.fromItemInfo(itemInfo);
- if (updatedDots.contains(packageUser)) {
+ if (updatedDots.test(packageUser)) {
updateNotificationHeader();
}
}
diff --git a/src/com/android/launcher3/popup/PopupDataProvider.java b/src/com/android/launcher3/popup/PopupDataProvider.java
index 984a03d..f4da858 100644
--- a/src/com/android/launcher3/popup/PopupDataProvider.java
+++ b/src/com/android/launcher3/popup/PopupDataProvider.java
@@ -85,7 +85,7 @@
}
}
if (dotShouldBeRefreshed) {
- mLauncher.updateNotificationDots(Utilities.singletonHashSet(postedPackageUserKey));
+ mLauncher.updateNotificationDots(t -> postedPackageUserKey.equals(t));
}
}
@@ -97,7 +97,7 @@
if (oldDotInfo.getNotificationKeys().size() == 0) {
mPackageUserToDotInfos.remove(removedPackageUserKey);
}
- mLauncher.updateNotificationDots(Utilities.singletonHashSet(removedPackageUserKey));
+ mLauncher.updateNotificationDots(t -> removedPackageUserKey.equals(t));
trimNotifications(mPackageUserToDotInfos);
}
}
@@ -133,7 +133,7 @@
}
if (!updatedDots.isEmpty()) {
- mLauncher.updateNotificationDots(updatedDots.keySet());
+ mLauncher.updateNotificationDots(updatedDots::containsKey);
}
trimNotifications(updatedDots);
}
diff --git a/src/com/android/launcher3/qsb/QsbContainerView.java b/src/com/android/launcher3/qsb/QsbContainerView.java
index 57a458b..c2bae6d 100644
--- a/src/com/android/launcher3/qsb/QsbContainerView.java
+++ b/src/com/android/launcher3/qsb/QsbContainerView.java
@@ -159,7 +159,7 @@
mQsb.setId(R.id.qsb_widget);
if (!isInPreviewMode()) {
- if (!Utilities.containsAll(AppWidgetManager.getInstance(context)
+ if (!containsAll(AppWidgetManager.getInstance(context)
.getAppWidgetOptions(widgetId), opts)) {
mQsb.updateAppWidgetOptions(opts);
}
@@ -296,4 +296,24 @@
QsbWidgetHostView newView(Context context);
}
+
+ /**
+ * Returns true if {@param original} contains all entries defined in {@param updates} and
+ * have the same value.
+ * The comparison uses {@link Object#equals(Object)} to compare the values.
+ */
+ private static boolean containsAll(Bundle original, Bundle updates) {
+ for (String key : updates.keySet()) {
+ Object value1 = updates.get(key);
+ Object value2 = original.get(key);
+ if (value1 == null) {
+ if (value2 != null) {
+ return false;
+ }
+ } else if (!value1.equals(value2)) {
+ return false;
+ }
+ }
+ return true;
+ }
}
diff --git a/src/com/android/launcher3/views/OptionsPopupView.java b/src/com/android/launcher3/views/OptionsPopupView.java
index 6ba2f40..71bf781 100644
--- a/src/com/android/launcher3/views/OptionsPopupView.java
+++ b/src/com/android/launcher3/views/OptionsPopupView.java
@@ -15,7 +15,6 @@
*/
package com.android.launcher3.views;
-import static com.android.launcher3.BaseDraggingActivity.INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION;
import static com.android.launcher3.Utilities.EXTRA_WALLPAPER_OFFSET;
import android.content.Context;
@@ -195,16 +194,12 @@
return false;
}
Intent intent = new Intent(Intent.ACTION_SET_WALLPAPER)
+ .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra(EXTRA_WALLPAPER_OFFSET,
launcher.getWorkspace().getWallpaperOffsetForCenterPage());
- intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
-
String pickerPackage = launcher.getString(R.string.wallpaper_picker_package);
if (!TextUtils.isEmpty(pickerPackage)) {
intent.setPackage(pickerPackage);
- } else {
- // If there is no target package, use the default intent chooser animation
- intent.putExtra(INTENT_EXTRA_IGNORE_LAUNCH_ANIMATION, true);
}
return launcher.startActivitySafely(v, intent, null);
}
diff --git a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
index f2a8da5..02f5502 100644
--- a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
+++ b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
@@ -216,11 +216,6 @@
}
protected void resetLoaderState() {
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- "START " + android.util.Log.getStackTraceString(new Throwable()));
- }
try {
mMainThreadExecutor.execute(new Runnable() {
@Override
@@ -232,11 +227,6 @@
throw new IllegalArgumentException(t);
}
waitForModelLoaded();
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- "FINISH " + android.util.Log.getStackTraceString(new Throwable()));
- }
}
protected void waitForModelLoaded() {
diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
index 701e33b..ab5761d 100644
--- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
+++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
@@ -181,22 +181,6 @@
@Test
@PortraitLandscape
- public void testAllAppsFromHome() throws Exception {
- // Test opening all apps
- assertNotNull("switchToAllApps() returned null",
- mLauncher.getWorkspace().switchToAllApps());
-
- runAllAppsTest(this, mLauncher.getAllApps());
-
- // Testing pressHome.
- assertTrue("Launcher internal state is not All Apps", isInState(LauncherState.ALL_APPS));
- assertNotNull("pressHome returned null", mLauncher.pressHome());
- assertTrue("Launcher internal state is not Home", isInState(LauncherState.NORMAL));
- assertNotNull("getHome returned null", mLauncher.getWorkspace());
- }
-
- @Test
- @PortraitLandscape
public void testWorkspaceSwitchToAllApps() {
assertNotNull("switchToAllApps() returned null",
mLauncher.getWorkspace().switchToAllApps());
diff --git a/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java
index 8b8e436..fbb4f51 100644
--- a/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java
+++ b/tests/src/com/android/launcher3/ui/widget/BindWidgetTest.java
@@ -84,11 +84,6 @@
@Override
@Before
public void setUp() throws Exception {
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- android.util.Log.getStackTraceString(new Throwable()));
- }
super.setUp();
mResolver = mTargetContext.getContentResolver();
@@ -110,11 +105,6 @@
}
super.tearDown();
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- android.util.Log.getStackTraceString(new Throwable()));
- }
}
@Test
@@ -157,10 +147,6 @@
@Test
public void testPendingWidget_autoRestored() {
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- "Test Started @ " + android.util.Log.getStackTraceString(new Throwable()));
- }
// A non-restored widget with no config screen gets restored automatically.
LauncherAppWidgetProviderInfo info = TestViewHelpers.findWidgetProvider(this, false);
@@ -170,21 +156,10 @@
setupContents(item);
verifyWidgetPresent(info);
-
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- "Test Ended @ " + android.util.Log.getStackTraceString(new Throwable()));
- }
}
@Test
public void testPendingWidget_withConfigScreen() {
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- "Test Started @ " + android.util.Log.getStackTraceString(new Throwable()));
- }
// A non-restored widget with config screen get bound and shows a 'Click to setup' UI.
LauncherAppWidgetProviderInfo info = TestViewHelpers.findWidgetProvider(this, true);
@@ -206,11 +181,6 @@
assertNotNull(AppWidgetManager.getInstance(mTargetContext)
.getAppWidgetInfo(mCursor.getInt(mCursor.getColumnIndex(
LauncherSettings.Favorites.APPWIDGET_ID))));
- if (com.android.launcher3.Utilities.IS_RUNNING_IN_TEST_HARNESS
- && com.android.launcher3.Utilities.IS_DEBUG_DEVICE) {
- android.util.Log.d("b/117332845",
- "Test Ended @ " + android.util.Log.getStackTraceString(new Throwable()));
- }
}
@Test @Ignore
diff --git a/tests/src/com/android/launcher3/util/Wait.java b/tests/src/com/android/launcher3/util/Wait.java
index 0e41c02..593cce8 100644
--- a/tests/src/com/android/launcher3/util/Wait.java
+++ b/tests/src/com/android/launcher3/util/Wait.java
@@ -23,7 +23,7 @@
return;
}
} catch (Throwable t) {
- // Ignore
+ throw new RuntimeException(t);
}
SystemClock.sleep(sleepMillis);
}
@@ -34,7 +34,7 @@
return;
}
} catch (Throwable t) {
- // Ignore
+ throw new RuntimeException(t);
}
Assert.fail(message);
}
diff --git a/tests/tapl/com/android/launcher3/tapl/BaseOverview.java b/tests/tapl/com/android/launcher3/tapl/BaseOverview.java
index 5f60113..0ff3070 100644
--- a/tests/tapl/com/android/launcher3/tapl/BaseOverview.java
+++ b/tests/tapl/com/android/launcher3/tapl/BaseOverview.java
@@ -17,6 +17,7 @@
package com.android.launcher3.tapl;
import androidx.annotation.NonNull;
+import androidx.test.uiautomator.BySelector;
import androidx.test.uiautomator.Direction;
import androidx.test.uiautomator.UiObject2;
@@ -28,6 +29,7 @@
*/
public class BaseOverview extends LauncherInstrumentation.VisibleContainer {
private static final int DEFAULT_FLING_SPEED = 15000;
+ private static final int FLINGS_FOR_DISMISS_LIMIT = 5;
BaseOverview(LauncherInstrumentation launcher) {
super(launcher);
@@ -50,6 +52,22 @@
}
/**
+ * Dismissed all tasks by scrolling to Clear-all button and pressing it.
+ */
+ public Workspace dismissAllTasks() {
+ final BySelector clearAllSelector = mLauncher.getLauncherObjectSelector("clear_all");
+ for (int i = 0;
+ i < FLINGS_FOR_DISMISS_LIMIT
+ && verifyActiveContainer().findObject(clearAllSelector) == null;
+ ++i) {
+ flingForward();
+ }
+
+ mLauncher.getObjectInContainer(verifyActiveContainer(), clearAllSelector).click();
+ return new Workspace(mLauncher);
+ }
+
+ /**
* Flings backward (right) and waits the fling's end.
*/
public void flingBackward() {