Fix NPE when converting final screen to empty screen.
Bug: 194553613 Test: manual Change-Id: Id29b8574964688f6f6aa96dd5b1b8a4d8b9110c0
This commit is contained in:
1 parent
e52a4e39af
commit
26de7be984
1 file changed
+3
-2
@@ -687,8 +687,9 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
|
||||
CellLayout finalScreen = mWorkspaceScreens.get(finalScreenId);
|
||||
|
||||
// If the final screen is empty, convert it to the extra empty screen
|
||||
if (finalScreen.getShortcutsAndWidgets().getChildCount() == 0 &&
|
||||
!finalScreen.isDropPending()) {
|
||||
if (finalScreen != null
|
||||
&& finalScreen.getShortcutsAndWidgets().getChildCount() == 0
|
||||
&& !finalScreen.isDropPending()) {
|
||||
mWorkspaceScreens.remove(finalScreenId);
|
||||
mScreenOrder.removeValue(finalScreenId);
|
||||
|
||||
|
||||
Reference in new issue
Block a user