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

Commit 0d9fb182 authored by Adam Bookatz's avatar Adam Bookatz
Browse files

Don't exempt MainUser in startUserInBackgroundTemp

startUserInBackgroundTemporarily() uses the same infrastructure as
config_backgroundUserScheduledStopTimeSecs. However, for the latter we
want to exempt the MainUser from being automatically stopped, whereas we
have no such desire for the former (since it is being stopped by
request, rather than just due to inactivity). We therefore slightly
separate the two, having the MainUser exemption only apply to the
latter.

For simplicity, we also make it so that requested duration in
startUserInBackgroundTemporarily() replaces that of
config_backgroundUserScheduledStopTimeSecs when this method is called.
We previously took the smallest value between them, but that seems
overly complicated now. It isn't even clear what the best policy is, so
we may as well adopt the simpler one for now.

Bug: 401340391
Bug: 330351042
Test: UserControllerTest
Flag: android.multiuser.schedule_stop_of_background_user
Change-Id: I0f7b2fdd2a13219e2c392276929f427a3dca8a0f
parent 4cb20f20
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment