Merge "Import translations. DO NOT MERGE ANYWHERE" into sc-v2-dev
diff --git a/quickstep/res/values/strings.xml b/quickstep/res/values/strings.xml
index 7158287..52bd48b 100644
--- a/quickstep/res/values/strings.xml
+++ b/quickstep/res/values/strings.xml
@@ -193,6 +193,8 @@
<string name="action_screenshot">Screenshot</string>
<!-- Label for a button that enters split screen selection mode. [CHAR_LIMIT=20] -->
<string name="action_split">Split</string>
+ <!-- Label for toast with instructions for split screen selection mode. [CHAR_LIMIT=50] -->
+ <string name="toast_split_select_app">Tap another app to use splitscreen</string>
<!-- Message shown when an action is blocked by a policy enforced by the app or the organization managing the device. [CHAR_LIMIT=NONE] -->
<string name="blocked_by_policy">This action isn\'t allowed by the app or your organization</string>
diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
index f210e3a..ddb20a1 100644
--- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
+++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
@@ -1555,11 +1555,13 @@
if (anim == null) {
anim = new AnimatorSet();
- boolean playFallBackAnimation = mLauncher.isInState(LauncherState.ALL_APPS)
+ View workspaceView = findWorkspaceView(appTargets);
+ boolean isWorkspaceViewVisible = workspaceView != null
+ && !mLauncher.isInState(LauncherState.ALL_APPS);
+ boolean playFallBackAnimation = !isWorkspaceViewVisible
&& (launcherIsATargetWithMode(appTargets, MODE_OPENING)
|| mLauncher.isForceInvisible());
- View workspaceView = findWorkspaceView(appTargets);
boolean playWorkspaceReveal = true;
if (mFromUnlock) {
anim.play(getUnlockWindowAnimator(appTargets, wallpaperTargets));
diff --git a/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java b/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java
index d531339..f752822 100644
--- a/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java
+++ b/quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java
@@ -58,12 +58,6 @@
FeatureFlags.ENABLE_OVERVIEW_SHARE.get());
return response;
}
-
- case TestProtocol.REQUEST_OVERVIEW_CONTENT_PUSH_ENABLED: {
- response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD,
- FeatureFlags.ENABLE_OVERVIEW_CONTENT_PUSH.get());
- return response;
- }
}
return super.call(method, arg);
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 1c1dc9c..98f8b72 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -103,6 +103,7 @@
import android.view.animation.Interpolator;
import android.widget.ListView;
import android.widget.OverScroller;
+import android.widget.Toast;
import androidx.annotation.Nullable;
import androidx.annotation.UiThread;
@@ -591,6 +592,8 @@
private TaskView mSplitHiddenTaskView;
private TaskView mSecondSplitHiddenTaskView;
private SplitConfigurationOptions.StagedSplitBounds mSplitBoundsConfig;
+ private final Toast mSplitToast = Toast.makeText(getContext(),
+ R.string.toast_split_select_app, Toast.LENGTH_SHORT);
/**
* Keeps track of the index of the TaskView that split screen was initialized with so we know
@@ -2679,6 +2682,11 @@
mFirstFloatingTaskView.setAlpha(1);
mFirstFloatingTaskView.addAnimation(anim, startingTaskRect,
mTempRect, mSplitHiddenTaskView, true /*fadeWithThumbnail*/);
+ anim.addEndListener(success -> {
+ if (success) {
+ mSplitToast.show();
+ }
+ });
}
/**
@@ -3810,6 +3818,7 @@
}
public void confirmSplitSelect(TaskView taskView) {
+ mSplitToast.cancel();
RectF secondTaskStartingBounds = new RectF();
Rect secondTaskEndingBounds = new Rect();
// TODO(194414938) starting bounds seem slightly off, investigate
@@ -3851,6 +3860,7 @@
splitController.resetState();
int duration = mActivity.getStateManager().getState().getTransitionDuration(getContext());
PendingAnimation pendingAnim = new PendingAnimation(duration);
+ mSplitToast.cancel();
if (!animate) {
resetFromSplitSelectionState();
return pendingAnim;
@@ -3928,9 +3938,9 @@
pendingAnim.addOnFrameCallback(this::updateCurveProperties);
}
- pendingAnim.addListener(new AnimationSuccessListener() {
+ pendingAnim.addListener(new AnimatorListenerAdapter() {
@Override
- public void onAnimationSuccess(Animator animator) {
+ public void onAnimationEnd(Animator animation) {
// TODO(b/186800707) Figure out how to undo for grid view
// Need to handle cases where dismissed task is
// * Top Row
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 49e0171..e89549d 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -166,9 +166,6 @@
"ENABLE_OVERVIEW_SHARING_TO_PEOPLE", true,
"Show indicators for content on Overview to share with top people. ");
- public static final BooleanFlag ENABLE_OVERVIEW_CONTENT_PUSH = getDebugFlag(
- "ENABLE_OVERVIEW_CONTENT_PUSH", false, "Show Content Push button in Overview Actions");
-
public static final BooleanFlag ENABLE_DATABASE_RESTORE = getDebugFlag(
"ENABLE_DATABASE_RESTORE", false,
"Enable database restore when new restore session is created");
diff --git a/src/com/android/launcher3/testing/TestProtocol.java b/src/com/android/launcher3/testing/TestProtocol.java
index 9e52dac..232acd9 100644
--- a/src/com/android/launcher3/testing/TestProtocol.java
+++ b/src/com/android/launcher3/testing/TestProtocol.java
@@ -111,8 +111,6 @@
public static final String REQUEST_DISABLE_DEBUG_TRACING = "disable-debug-tracing";
public static final String REQUEST_OVERVIEW_SHARE_ENABLED = "overview-share-enabled";
- public static final String REQUEST_OVERVIEW_CONTENT_PUSH_ENABLED =
- "overview-content-push-enabled";
public static boolean sDisableSensorRotation;
public static final String REQUEST_MOCK_SENSOR_ROTATION = "mock-sensor-rotation";
diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
index 0360a7d..69c97c5 100644
--- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
+++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java
@@ -1460,11 +1460,6 @@
TestProtocol.TEST_INFO_RESPONSE_FIELD);
}
- boolean overviewContentPushEnabled() {
- return getTestInfo(TestProtocol.REQUEST_OVERVIEW_CONTENT_PUSH_ENABLED).getBoolean(
- TestProtocol.TEST_INFO_RESPONSE_FIELD);
- }
-
private void disableSensorRotation() {
getTestInfo(TestProtocol.REQUEST_MOCK_SENSOR_ROTATION);
}
diff --git a/tests/tapl/com/android/launcher3/tapl/OverviewActions.java b/tests/tapl/com/android/launcher3/tapl/OverviewActions.java
index 950c052..aa4cc4c 100644
--- a/tests/tapl/com/android/launcher3/tapl/OverviewActions.java
+++ b/tests/tapl/com/android/launcher3/tapl/OverviewActions.java
@@ -34,27 +34,6 @@
}
/**
- * Clicks content push button.
- */
- @NonNull
- public Overview clickAndDismissContentPush() {
- if (mLauncher.overviewContentPushEnabled()) {
- try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck();
- LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
- "want to click content push button and exit screenshot ui")) {
- UiObject2 exo = mLauncher.waitForObjectInContainer(mOverviewActions,
- "action_content_push");
- mLauncher.clickLauncherObject(exo);
- try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer(
- "clicked content push button")) {
- return new Overview(mLauncher);
- }
- }
- }
- return new Overview(mLauncher);
- }
-
- /**
* Clicks screenshot button and closes screenshot ui.
*/
@NonNull