Desks: Do not reuse to-be-removed desk
Default desk creation may happen as a result of removing the last desk. If that desk was no longer associated to any user, it will have been scheduled for deletion. This means that there can be a race where the creation request may be received by RootTaskDesksOrganizer before the last desk is completely deleted, which results in the organizer providing the DesktopTasksController/Repository a deskId that will soon have no associated root to it, ultimately causing a crash the next a task is attempted to be moved into desktop. This change adds manual tracking of pending root removals, so that those roots can be ignored on create requests. Flag: com.android.window.flags.enable_multiple_desktops_backend Bug: 406333979 Test: enter desktop, swipe it up to remove it from overview or through adb command, then try to re-enter desktop - verify there's no crash Change-Id: I0699b92217fe54e03e92509124752f0120b3f37a
Loading
Please register or sign in to comment