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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user