Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09268637 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias Committed by Android (Google) Code Review
Browse files

Merge "Add debug logs to TaskView" into main

parents 02f0c92e 148cbffd
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -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,
@@ -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");
@@ -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");
@@ -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.");
@@ -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"
@@ -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;
@@ -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();
        }
    }