Loading
Fixed SSM.switchUser() so it doesn't crash the system.
SystemServiceManager (SSM) keeps a cache of the TargetUsers it uses on user lifecycle events, and this cache is only valid from user start to user stopped. But on user switch, the callback also needs the TargetUser for the previous user, so if that user is removed, currently it would crash. Fixes: 169027200 Test: adb shell pm create-user ZedsDeadBaby && \ adb shell am switch-user 10 && sleep 10s && \ adb shell am switch-user 0 && adb shell pm remove-user 10 Change-Id: Ia5a3ac88040a89a9af5f99502846bb05b7ce680b