Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bec27eaf authored by Felipe Leme's avatar Felipe Leme
Browse files

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
parent 3709d3ef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment