Merge "End recents animation when entering split select" into sc-v2-dev am: 6c71f688b2

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15321610

Change-Id: I77de6e1f72594fa8764c68c042e3989ed3fc44ee
This commit is contained in:
TreeHugger Robot
2021-07-21 19:20:01 +00:00
committed by Automerger Merge Worker
3 changed files with 17 additions and 8 deletions
@@ -358,7 +358,7 @@ public class SystemUiProxy implements ISystemUiProxy,
try { try {
mSystemUiProxy.setSplitScreenMinimized(minimized); mSystemUiProxy.setSplitScreenMinimized(minimized);
} catch (RemoteException e) { } catch (RemoteException e) {
Log.w(TAG, "Failed call stopScreenPinning", e); Log.w(TAG, "Failed call setSplitScreenMinimized", e);
} }
} }
} }
@@ -3090,6 +3090,9 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
splitController.getLayoutParamsForActivePosition(getResources(), splitController.getLayoutParamsForActivePosition(getResources(),
mActivity.getDeviceProfile())); mActivity.getDeviceProfile()));
mSplitPlaceholderView.setIcon(taskView.getIconView()); mSplitPlaceholderView.setIcon(taskView.getIconView());
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
finishRecentsAnimation(true, null);
}
} }
public PendingAnimation createSplitSelectInitAnimation() { public PendingAnimation createSplitSelectInitAnimation() {
@@ -531,6 +531,9 @@ public class TaskView extends FrameLayout implements Reusable {
if (getTask() == null) { if (getTask() == null) {
return; return;
} }
if (confirmSecondSplitSelectApp()) {
return;
}
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && isRunningTask()) { if (ENABLE_QUICKSTEP_LIVE_TILE.get() && isRunningTask()) {
if (!mIsClickableAsLiveTile) { if (!mIsClickableAsLiveTile) {
return; return;
@@ -549,7 +552,7 @@ public class TaskView extends FrameLayout implements Reusable {
if (targets == null) { if (targets == null) {
// If the recents animation is cancelled somehow between the parent if block and // If the recents animation is cancelled somehow between the parent if block and
// here, try to launch the task as a non live tile task. // here, try to launch the task as a non live tile task.
launcherNonLiveTileTask(); launchTaskAnimated();
return; return;
} }
@@ -567,19 +570,22 @@ public class TaskView extends FrameLayout implements Reusable {
}); });
anim.start(); anim.start();
} else { } else {
launcherNonLiveTileTask(); launchTaskAnimated();
} }
mActivity.getStatsLogManager().logger().withItemInfo(getItemInfo()) mActivity.getStatsLogManager().logger().withItemInfo(getItemInfo())
.log(LAUNCHER_TASK_LAUNCH_TAP); .log(LAUNCHER_TASK_LAUNCH_TAP);
} }
private void launcherNonLiveTileTask() { /**
if (mActivity.isInState(OVERVIEW_SPLIT_SELECT)) { * @return {@code true} if user is already in split select mode and this tap was to choose the
// User tapped to select second split screen app * second app. {@code false} otherwise
*/
private boolean confirmSecondSplitSelectApp() {
boolean isSelectingSecondSplitApp = mActivity.isInState(OVERVIEW_SPLIT_SELECT);
if (isSelectingSecondSplitApp) {
getRecentsView().confirmSplitSelect(this); getRecentsView().confirmSplitSelect(this);
} else {
launchTaskAnimated();
} }
return isSelectingSecondSplitApp;
} }
/** /**