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

Skip to content
Commit 55f7f698 authored by Jahdiel Alvarez's avatar Jahdiel Alvarez
Browse files

Refactored NMS to handle user switch via the onUserSwitching method

The NotificationManagerService listens for user switch events via the
ACTION_USER_SWITCHED broadcast intent. This change refactors the logic
to handle user switch events by overriding SystemService's
onUserSwitching method. The onUserSwitching method is an earlier and
more stable signal for user switch than the broadcast. SystemServices
should rely on SystemService user lifecycle methods for user-aware
operations.

With respect to the stopping previous user apps feature, this results
in the early killing ocurring after NotificationManagerService has
handled the user switch events, which avoids it from restarting early
killed packages.

Test: atest NotificationManagerServiceTest
Test: Manually run user switch on device
Bug: 337077643
Bug: 323200731
Change-Id: I90c2ecb2fcfd0693bdc6c01aa9f4b83705e56ce8
parent 22ed7392
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