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

Commit 76370b6f authored by Leon Jeng's avatar Leon Jeng
Browse files

Revert "Not show size compat UI when task is not visible"

This reverts commit adb92508.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=coral-userdebug&lkgb=7530814&lkbb=7530923&fkbb=7530923, bug b/193105445

Bug: 193105445
Change-Id: I697229da6986d6466d7f13872e9ae7a727b80838
parent 2b14f17e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -361,8 +361,7 @@ public class TaskInfo {
                && (!topActivityInSizeCompat || configuration.windowConfiguration.getBounds()
                    .equals(that.configuration.windowConfiguration.getBounds()))
                && (!topActivityInSizeCompat || configuration.getLayoutDirection()
                    == that.configuration.getLayoutDirection())
                && (!topActivityInSizeCompat || isVisible == that.isVisible);
                    == that.configuration.getLayoutDirection());
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -497,7 +497,7 @@ public class ShellTaskOrganizer extends TaskOrganizer {
        // The task is vanished or doesn't support size compat UI, notify to remove size compat UI
        // on this Task if there is any.
        if (taskListener == null || !taskListener.supportSizeCompatUI()
                || !taskInfo.topActivityInSizeCompat || !taskInfo.isVisible) {
                || !taskInfo.topActivityInSizeCompat) {
            mSizeCompatUI.onSizeCompatInfoChanged(taskInfo.displayId, taskInfo.taskId,
                    null /* taskConfig */, null /* sizeCompatActivity*/,
                    null /* taskListener */);
+0 −13
Original line number Diff line number Diff line
@@ -306,23 +306,10 @@ public class ShellTaskOrganizerTests {
        taskInfo2.displayId = taskInfo1.displayId;
        taskInfo2.topActivityToken = taskInfo1.topActivityToken;
        taskInfo2.topActivityInSizeCompat = true;
        taskInfo2.isVisible = true;
        mOrganizer.onTaskInfoChanged(taskInfo2);
        verify(mSizeCompatUI).onSizeCompatInfoChanged(taskInfo1.displayId, taskInfo1.taskId,
                taskInfo1.configuration, taskInfo1.topActivityToken, taskListener);

        // Not show size compat UI if task is not visible.
        clearInvocations(mSizeCompatUI);
        final RunningTaskInfo taskInfo3 =
                createTaskInfo(taskInfo1.taskId, taskInfo1.getWindowingMode());
        taskInfo3.displayId = taskInfo1.displayId;
        taskInfo3.topActivityToken = taskInfo1.topActivityToken;
        taskInfo3.topActivityInSizeCompat = true;
        taskInfo3.isVisible = false;
        mOrganizer.onTaskInfoChanged(taskInfo3);
        verify(mSizeCompatUI).onSizeCompatInfoChanged(taskInfo1.displayId, taskInfo1.taskId,
                null /* taskConfig */, null /* sizeCompatActivity*/, null /* taskListener */);

        clearInvocations(mSizeCompatUI);
        mOrganizer.onTaskVanished(taskInfo1);
        verify(mSizeCompatUI).onSizeCompatInfoChanged(taskInfo1.displayId, taskInfo1.taskId,