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

Commit 0be2cfec authored by Andrii Kulian's avatar Andrii Kulian
Browse files

Fix exception when trying to update config of detached stack

There is an NullPointerException which can be reproduced with following steps
on angler:
1. In split-screen open activities from the same app.
   Make sure to launch them from launcher.
2. Rotate device to landscape.
3. Force-stop the app using adb command.

After killing the app it will try to open launcher, which is fixed in
portrait mode on that device. This will update the configuration for all the
stacks, including already detached.

Bug: 28786255
Change-Id: Ia326c09cff9f1a3fb43cca5b48db29718553346a
parent 16323615
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -380,6 +380,11 @@ public class TaskStack implements DimLayer.DimLayerUser,
    }

    private boolean updateBoundsAfterConfigChange() {
        if (mDisplayContent == null) {
            // If the stack is already detached we're not updating anything,
            // as it's going away soon anyway.
            return false;
        }
        final int newRotation = getDisplayInfo().rotation;
        final int newDensity = getDisplayInfo().logicalDensityDpi;