Prevent Sysui crash when user is deleted.
When User is deleted, we need to make sure that we don't call context#startServiceAsUser. We can do this by ensuring that the user is in the list of alive users in Usermanager. I also added a test. Fixes: 296305878 Test: Do repro steps described in bug. Make user and skip set up wizard and remove user. Observe no crash. Merged-In: Ib7af8ca3b5405e2d10eda7c52e4210ed9dfae024 Change-Id: Ib7af8ca3b5405e2d10eda7c52e4210ed9dfae024 (cherry picked from commit 0973118d)
Showing
- packages/SystemUI/src/com/android/systemui/user/domain/interactor/UserInteractor.kt 6 additions, 0 deletions...android/systemui/user/domain/interactor/UserInteractor.kt
- packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/UserInteractorTest.kt 12 additions, 1 deletion...oid/systemui/user/domain/interactor/UserInteractorTest.kt
Loading
Please register or sign in to comment