Merge "Try to handle side-task launches even if not fully transitioned to overview" into udc-dev am: a5fb95df57
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23425161 Change-Id: Ic70e08cbb508b8c28e74fd39016e7cabcd015153 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2260,6 +2260,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
|||||||
targetCompat.taskId == mGestureState.getLastStartedTaskId())
|
targetCompat.taskId == mGestureState.getLastStartedTaskId())
|
||||||
.findFirst();
|
.findFirst();
|
||||||
if (!taskTargetOptional.isPresent()) {
|
if (!taskTargetOptional.isPresent()) {
|
||||||
|
ActiveGestureLog.INSTANCE.addLog("No appeared task matching started task id");
|
||||||
finishRecentsAnimationOnTasksAppeared(null /* onFinishComplete */);
|
finishRecentsAnimationOnTasksAppeared(null /* onFinishComplete */);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2267,6 +2268,7 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>,
|
|||||||
TaskView taskView = mRecentsView == null
|
TaskView taskView = mRecentsView == null
|
||||||
? null : mRecentsView.getTaskViewByTaskId(taskTarget.taskId);
|
? null : mRecentsView.getTaskViewByTaskId(taskTarget.taskId);
|
||||||
if (taskView == null || !taskView.getThumbnail().shouldShowSplashView()) {
|
if (taskView == null || !taskView.getThumbnail().shouldShowSplashView()) {
|
||||||
|
ActiveGestureLog.INSTANCE.addLog("Invalid task view splash state");
|
||||||
finishRecentsAnimationOnTasksAppeared(null /* onFinishComplete */);
|
finishRecentsAnimationOnTasksAppeared(null /* onFinishComplete */);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
|
|||||||
|
|
||||||
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
|
||||||
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
||||||
|
import static com.android.quickstep.GestureState.GestureEndTarget.RECENTS;
|
||||||
import static com.android.quickstep.GestureState.STATE_RECENTS_ANIMATION_INITIALIZED;
|
import static com.android.quickstep.GestureState.STATE_RECENTS_ANIMATION_INITIALIZED;
|
||||||
import static com.android.quickstep.GestureState.STATE_RECENTS_ANIMATION_STARTED;
|
import static com.android.quickstep.GestureState.STATE_RECENTS_ANIMATION_STARTED;
|
||||||
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.START_RECENTS_ANIMATION;
|
import static com.android.quickstep.util.ActiveGestureErrorDetector.GestureEvent.START_RECENTS_ANIMATION;
|
||||||
@@ -174,16 +175,21 @@ public class TaskAnimationManager implements RecentsAnimationCallbacks.RecentsAn
|
|||||||
if (nonAppTargets == null) {
|
if (nonAppTargets == null) {
|
||||||
nonAppTargets = new RemoteAnimationTarget[0];
|
nonAppTargets = new RemoteAnimationTarget[0];
|
||||||
}
|
}
|
||||||
if (activityInterface.isInLiveTileMode()
|
if ((activityInterface.isInLiveTileMode()
|
||||||
|
|| mLastGestureState.getEndTarget() == RECENTS)
|
||||||
&& activityInterface.getCreatedActivity() != null) {
|
&& activityInterface.getCreatedActivity() != null) {
|
||||||
RecentsView recentsView =
|
RecentsView recentsView =
|
||||||
activityInterface.getCreatedActivity().getOverviewPanel();
|
activityInterface.getCreatedActivity().getOverviewPanel();
|
||||||
if (recentsView != null) {
|
if (recentsView != null) {
|
||||||
|
ActiveGestureLog.INSTANCE.addLog("Launching side task id="
|
||||||
|
+ appearedTaskTarget.taskId);
|
||||||
recentsView.launchSideTaskInLiveTileMode(appearedTaskTarget.taskId,
|
recentsView.launchSideTaskInLiveTileMode(appearedTaskTarget.taskId,
|
||||||
appearedTaskTargets,
|
appearedTaskTargets,
|
||||||
new RemoteAnimationTarget[0] /* wallpaper */,
|
new RemoteAnimationTarget[0] /* wallpaper */,
|
||||||
nonAppTargets /* nonApps */);
|
nonAppTargets /* nonApps */);
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
ActiveGestureLog.INSTANCE.addLog("Unable to launch side task (no recents)");
|
||||||
}
|
}
|
||||||
} else if (nonAppTargets.length > 0) {
|
} else if (nonAppTargets.length > 0) {
|
||||||
TaskViewUtils.createSplitAuxiliarySurfacesAnimator(nonAppTargets /* nonApps */,
|
TaskViewUtils.createSplitAuxiliarySurfacesAnimator(nonAppTargets /* nonApps */,
|
||||||
|
|||||||
Reference in New Issue
Block a user