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

Commit c56730a0 authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Add isAppBubble in TaskInfo" into main

parents 542411bd 1fbcfd73
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -357,6 +357,14 @@ public class TaskInfo {
     */
    public AppCompatTaskInfo appCompatTaskInfo = AppCompatTaskInfo.create();

    /**
     * Whether the Task should be an App Bubble.
     * Please use this with caution. This is just a short-term solution which should be migrated
     * to a more generic model vs. implying the Task is an App Bubble here.
     * @hide
     */
    public boolean isAppBubble;

    /**
     * The top activity's main window frame if it doesn't match the top activity bounds.
     * {@code null}, otherwise.
@@ -511,7 +519,8 @@ public class TaskInfo {
                && topActivityRequestOpenInBrowserEducationTimestamp
                    == that.topActivityRequestOpenInBrowserEducationTimestamp
                && appCompatTaskInfo.equalsForTaskOrganizer(that.appCompatTaskInfo)
                && Objects.equals(topActivityMainWindowFrame, that.topActivityMainWindowFrame);
                && Objects.equals(topActivityMainWindowFrame, that.topActivityMainWindowFrame)
                && isAppBubble == that.isAppBubble;
    }

    /**
@@ -590,6 +599,7 @@ public class TaskInfo {
        topActivityRequestOpenInBrowserEducationTimestamp = source.readLong();
        appCompatTaskInfo = source.readTypedObject(AppCompatTaskInfo.CREATOR);
        topActivityMainWindowFrame = source.readTypedObject(Rect.CREATOR);
        isAppBubble = source.readBoolean();
    }

    /**
@@ -647,6 +657,7 @@ public class TaskInfo {
        dest.writeLong(topActivityRequestOpenInBrowserEducationTimestamp);
        dest.writeTypedObject(appCompatTaskInfo, flags);
        dest.writeTypedObject(topActivityMainWindowFrame, flags);
        dest.writeBoolean(isAppBubble);
    }

    @Override
@@ -696,6 +707,7 @@ public class TaskInfo {
                + topActivityRequestOpenInBrowserEducationTimestamp
                + " appCompatTaskInfo=" + appCompatTaskInfo
                + " topActivityMainWindowFrame=" + topActivityMainWindowFrame
                + " isAppBubble=" + isAppBubble
                + "}";
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -3436,6 +3436,8 @@ class Task extends TaskFragment {
                        : WindowInsets.Type.defaultVisible();
        AppCompatUtils.fillAppCompatTaskInfo(this, info, top);
        info.topActivityMainWindowFrame = calculateTopActivityMainWindowFrameForTaskInfo(top);
        // If new Tasks launched from this Task should be Bubble, this should also be a Bubble.
        info.isAppBubble = mLaunchNextToBubble;
    }

    /**