Loading quickstep/src/com/android/quickstep/views/TaskView.java +9 −5 Original line number Diff line number Diff line Loading @@ -645,6 +645,7 @@ public class TaskView extends FrameLayout implements Reusable { */ public void bind(Task task, RecentsOrientedState orientedState) { cancelPendingLoadTasks(); testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.bind: task=" + task); mTask = task; mTaskIdContainer[0] = mTask.key.id; mTaskIdAttributeContainer[0] = new TaskIdAttributeContainer(task, mSnapshotView, mIconView, Loading Loading @@ -852,6 +853,8 @@ public class TaskView extends FrameLayout implements Reusable { */ @Nullable public RunnableList launchTaskAnimated() { testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.launchTaskAnimated: mTask=" + mTask); if (mTask != null) { testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.launchTaskAnimated: startActivityFromRecentsAsync"); Loading Loading @@ -902,6 +905,7 @@ public class TaskView extends FrameLayout implements Reusable { * Starts the task associated with this view without any animation */ public void launchTask(@NonNull Consumer<Boolean> callback, boolean isQuickswitch) { testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.launchTask: mTask=" + mTask); if (mTask != null) { testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.launchTask: startActivityFromRecentsAsync"); Loading Loading @@ -972,6 +976,9 @@ public class TaskView extends FrameLayout implements Reusable { public RunnableList launchTasks() { RecentsView recentsView = getRecentsView(); RemoteTargetHandle[] remoteTargetHandles = recentsView.mRemoteTargetHandles; testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.launchTasks: isRunningTask=" + isRunningTask() + ", " + "remoteTargetHandles == null?" + (remoteTargetHandles == null)); if (isRunningTask() && remoteTargetHandles != null) { if (!mIsClickableAsLiveTile) { Log.e(TAG, "TaskView is not clickable as a live tile; returning to home."); Loading Loading @@ -999,7 +1006,7 @@ public class TaskView extends FrameLayout implements Reusable { // 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. testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.java - launchTasks: recents animation is cancelled"); "TaskView.launchTasks: recents animation is cancelled"); RunnableList runnableList = launchTaskAnimated(); if (runnableList == null) { Log.e(TAG, "Recents animation cancelled and cannot launch task as non-live tile" Loading @@ -1021,7 +1028,7 @@ public class TaskView extends FrameLayout implements Reusable { public void onAnimationEnd(Animator animator) { if (mTask != null && mTask.key.displayId != getRootViewDisplayId()) { testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.java - launchTasks: onAnimationEnd"); "TaskView.launchTasks: onAnimationEnd"); launchTaskAnimated(); } mIsClickableAsLiveTile = true; Loading @@ -1041,9 +1048,6 @@ public class TaskView extends FrameLayout implements Reusable { recentsView.onTaskLaunchedInLiveTileMode(); return runnableList; } else { testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.java - launchTasks: isRunningTask=" + isRunningTask() + "||" + "remoteTargetHandles == null?" + (remoteTargetHandles == null)); return launchTaskAnimated(); } } Loading Loading
quickstep/src/com/android/quickstep/views/TaskView.java +9 −5 Original line number Diff line number Diff line Loading @@ -645,6 +645,7 @@ public class TaskView extends FrameLayout implements Reusable { */ public void bind(Task task, RecentsOrientedState orientedState) { cancelPendingLoadTasks(); testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.bind: task=" + task); mTask = task; mTaskIdContainer[0] = mTask.key.id; mTaskIdAttributeContainer[0] = new TaskIdAttributeContainer(task, mSnapshotView, mIconView, Loading Loading @@ -852,6 +853,8 @@ public class TaskView extends FrameLayout implements Reusable { */ @Nullable public RunnableList launchTaskAnimated() { testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.launchTaskAnimated: mTask=" + mTask); if (mTask != null) { testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.launchTaskAnimated: startActivityFromRecentsAsync"); Loading Loading @@ -902,6 +905,7 @@ public class TaskView extends FrameLayout implements Reusable { * Starts the task associated with this view without any animation */ public void launchTask(@NonNull Consumer<Boolean> callback, boolean isQuickswitch) { testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.launchTask: mTask=" + mTask); if (mTask != null) { testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.launchTask: startActivityFromRecentsAsync"); Loading Loading @@ -972,6 +976,9 @@ public class TaskView extends FrameLayout implements Reusable { public RunnableList launchTasks() { RecentsView recentsView = getRecentsView(); RemoteTargetHandle[] remoteTargetHandles = recentsView.mRemoteTargetHandles; testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.launchTasks: isRunningTask=" + isRunningTask() + ", " + "remoteTargetHandles == null?" + (remoteTargetHandles == null)); if (isRunningTask() && remoteTargetHandles != null) { if (!mIsClickableAsLiveTile) { Log.e(TAG, "TaskView is not clickable as a live tile; returning to home."); Loading Loading @@ -999,7 +1006,7 @@ public class TaskView extends FrameLayout implements Reusable { // 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. testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.java - launchTasks: recents animation is cancelled"); "TaskView.launchTasks: recents animation is cancelled"); RunnableList runnableList = launchTaskAnimated(); if (runnableList == null) { Log.e(TAG, "Recents animation cancelled and cannot launch task as non-live tile" Loading @@ -1021,7 +1028,7 @@ public class TaskView extends FrameLayout implements Reusable { public void onAnimationEnd(Animator animator) { if (mTask != null && mTask.key.displayId != getRootViewDisplayId()) { testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.java - launchTasks: onAnimationEnd"); "TaskView.launchTasks: onAnimationEnd"); launchTaskAnimated(); } mIsClickableAsLiveTile = true; Loading @@ -1041,9 +1048,6 @@ public class TaskView extends FrameLayout implements Reusable { recentsView.onTaskLaunchedInLiveTileMode(); return runnableList; } else { testLogD(SUCCESSFUL_GESTURE_MISMATCH_EVENTS, "TaskView.java - launchTasks: isRunningTask=" + isRunningTask() + "||" + "remoteTargetHandles == null?" + (remoteTargetHandles == null)); return launchTaskAnimated(); } } Loading