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

Commit 1c2cfed7 authored by Shawn Lin's avatar Shawn Lin Committed by Automerger Merge Worker
Browse files

Merge "Fix NPE when leaving kids mode" into tm-qpr-dev am: ef35f3a6

parents 64956361 ef35f3a6
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -316,12 +316,14 @@ public class KidsModeTaskOrganizer extends ShellTaskOrganizer {
                true /* onTop */);
        wct.reorder(rootToken, mEnabled /* onTop */);
        mSyncQueue.queue(wct);
        if (mEnabled) {
            final SurfaceControl rootLeash = mLaunchRootLeash;
            mSyncQueue.runInSync(t -> {
                t.setPosition(rootLeash, taskBounds.left, taskBounds.top);
                t.setWindowCrop(rootLeash, taskBounds.width(), taskBounds.height());
            });
        }
    }

    private Rect calculateBounds() {
        final Rect bounds = new Rect(0, 0, mDisplayWidth, mDisplayHeight);