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

Commit f138b8a2 authored by Jeff Chang's avatar Jeff Chang Committed by android-build-merger
Browse files

Merge "Introduce the display ID to TaskKey" into qt-dev am: 6d856d33

am: b1ad8888

Change-Id: I8e2c9f5dcfe8925faca57abbb65ee0b04944b727
parents 6af77d96 b1ad8888
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ public class RecentsTaskLoadPlan {
                    : t.realActivity;
            final int windowingMode = t.configuration.windowConfiguration.getWindowingMode();
            TaskKey taskKey = new TaskKey(t.persistentId, windowingMode, t.baseIntent,
                    sourceComponent, t.userId, t.lastActiveTime);
                    sourceComponent, t.userId, t.lastActiveTime, t.displayId);

            boolean isFreeformTask = windowingMode == WINDOWING_MODE_FREEFORM;
            boolean isStackTask = !isFreeformTask;
+22 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.systemui.shared.recents.model;

import static android.view.Display.DEFAULT_DISPLAY;

import android.app.ActivityManager;
import android.app.ActivityManager.TaskDescription;
import android.content.ComponentName;
@@ -62,6 +64,12 @@ public class Task {
        @ViewDebug.ExportedProperty(category="recents")
        public long lastActiveTime;

        /**
         * The id of the task was running from which display.
         */
        @ViewDebug.ExportedProperty(category = "recents")
        public final int displayId;

        // The source component name which started this task
        public final ComponentName sourceComponent;

@@ -79,6 +87,7 @@ public class Task {
            this.sourceComponent = sourceComponent;
            this.userId = t.userId;
            this.lastActiveTime = t.lastActiveTime;
            this.displayId = t.displayId;
            updateHashCode();
        }

@@ -90,6 +99,19 @@ public class Task {
            this.sourceComponent = sourceComponent;
            this.userId = userId;
            this.lastActiveTime = lastActiveTime;
            this.displayId = DEFAULT_DISPLAY;
            updateHashCode();
        }

        public TaskKey(int id, int windowingMode, Intent intent,
                ComponentName sourceComponent, int userId, long lastActiveTime, int displayId) {
            this.id = id;
            this.windowingMode = windowingMode;
            this.baseIntent = intent;
            this.sourceComponent = sourceComponent;
            this.userId = userId;
            this.lastActiveTime = lastActiveTime;
            this.displayId = displayId;
            updateHashCode();
        }