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

Commit b92b229a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Launch activity if click on a TaskView which has the task running on...

Merge "Launch activity if click on a TaskView which has the task running on different display wit root."
parents 30fc033b 4ece098f
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.quickstep.views;

import static android.view.Display.DEFAULT_DISPLAY;
import static android.widget.Toast.LENGTH_SHORT;

import static com.android.launcher3.AbstractFloatingView.TYPE_TASK_MENU;
@@ -51,6 +52,7 @@ import android.os.Bundle;
import android.util.AttributeSet;
import android.util.FloatProperty;
import android.util.Log;
import android.view.Display;
import android.view.MotionEvent;
import android.view.TouchDelegate;
import android.view.View;
@@ -638,6 +640,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.
                launchTaskAnimated();
                mIsClickableAsLiveTile = true;
                return;
            }

@@ -659,6 +662,9 @@ public class TaskView extends FrameLayout implements Reusable {

                @Override
                public void onAnimationEnd(Animator animator) {
                    if (mTask != null && mTask.key.displayId != getRootViewDisplayId()) {
                        launchTaskAnimated();
                    }
                    mIsClickableAsLiveTile = true;
                }
            });
@@ -1519,7 +1525,8 @@ public class TaskView extends FrameLayout implements Reusable {


    private int getRootViewDisplayId() {
        return getRootView().getDisplay().getDisplayId();
        Display  display = getRootView().getDisplay();
        return display != null ? display.getDisplayId() : DEFAULT_DISPLAY;
    }

    /**