Schedule stopping inactive background users
When a full user enters the background, we can now schedule it to be stopped at a later time (if it doesn't become the foreground user before then). This way, it will no longer use up resources. The idea is that, if the device does switch back to the user on a short- or intermediate-timescale, the background user will be ready to go, reducing the user start/switch time; however, if the device does not switch back to the user on a long timescale, there is no point in the user taking up RAM, and it is therefore stopped. The stopping time is configurable and can be disabled entirely. We further make no absolete guarantees that the background user will be stopped; we do so at our discretion. Bug: 330351042 Test: atest UserControllerTest#testScheduleStopOfBackgroundUser_switch Test: atest UserControllerTest#testScheduleStopOfBackgroundUser_startInBackground Test: atest UserControllerTest Change-Id: Ibd94ef70ec601834a8157e29eac49471ec7435f0
Loading
Please register or sign in to comment