Delay user unlocking until boot complete on HSUM.
- When user 0 and user 10+ are unlocked early in the boot process on devices that use headless system user mode (HSUM), vold creates and mounts emulated volumes for these users before boot completed. On boot complete, vold is reset by StorageManagerService, causing vold to unmount previously mounted emulated volumes. This leads to vold killing apps/services that use these volumes. On some occasions, these killings have caused the system to become unstable and crash, or some apps to crash. This creates bad user experience on HSUM. - In order to avoid this issue, delay user unlocking until boot complete on HSUM. Thus, emulated volume creation + mount and vold reset will happen after boot complete. - To mitigate the risk of this CL impacting non-automotive builds, it is explicitly checking for HSUM in a way that minimize the code changes; a more robust solution be provided on master (commit 3d3a13419fd34ae460fffd68de97c13bc47295d7will). Test: atest --rerun-until-failure 10 AtsCarWatchdogHostTests on tm-qpr-dev build id 8877634. AtsCarWatchdogHostTests has high failure rate on this build. So, tested the fix on this build to ensure the fix works. Test: atest UserControllerTest Bug: 240112925 Bug: 241929666 Change-Id: I2c1f2db625177511eaeeba56fba9d500d16b92d7
Loading
Please register or sign in to comment