Guard absent SplitScreen in PipTaskOrganizer
Current code assumes the presence of SplitScreen, so it crashes if SplitScreen doesn't exist. Bug: 207495281 Test: Transition in and out of PIP still works on phones. Test: Transition from PIP to split screen on phones. Change-Id: I6f2f05a1237c9e64f1df95b05347a1affa9b5a27
This commit is contained in:
@@ -1282,6 +1282,9 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
|
||||
}
|
||||
|
||||
private boolean isPipTopLeft() {
|
||||
if (!mSplitScreenOptional.isPresent()) {
|
||||
return false;
|
||||
}
|
||||
final Rect topLeft = new Rect();
|
||||
final Rect bottomRight = new Rect();
|
||||
mSplitScreenOptional.get().getStageBounds(topLeft, bottomRight);
|
||||
|
||||
Reference in New Issue
Block a user