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

Commit b42ed1c2 authored by Shawn Lin's avatar Shawn Lin
Browse files

Update Home task bounds when display size changed in kids mode

Otherwise the Home task would show incorrect size on different
orientation.

Bug: 266507175
Test: Enter Kids mode launcher and rotate device
Change-Id: Icf258a1bc7b3399f56983ea2670316824bfafe68
parent 9fb9f4cf
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -247,6 +247,11 @@ public class KidsModeTaskOrganizer extends ShellTaskOrganizer {
            mLaunchRootTask = taskInfo;
        }

        if (mHomeTask != null && mHomeTask.taskId == taskInfo.taskId
                && !taskInfo.equals(mHomeTask)) {
            mHomeTask = taskInfo;
        }

        super.onTaskInfoChanged(taskInfo);
    }

@@ -364,6 +369,7 @@ public class KidsModeTaskOrganizer extends ShellTaskOrganizer {
        final WindowContainerTransaction wct = getWindowContainerTransaction();
        final Rect taskBounds = calculateBounds();
        wct.setBounds(mLaunchRootTask.token, taskBounds);
        wct.setBounds(mHomeTask.token, new Rect(0, 0, mDisplayWidth, mDisplayHeight));
        mSyncQueue.queue(wct);
        final SurfaceControl finalLeash = mLaunchRootLeash;
        mSyncQueue.runInSync(t -> {