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

Commit b8460066 authored by Shawn Lin's avatar Shawn Lin Committed by Android (Google) Code Review
Browse files

Merge "Update Home task bounds when display size changed in kids mode" into tm-qpr-dev

parents 78266a85 b42ed1c2
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 -> {