Restore lost unlocked users after vold reset
- In automotive, vold reset / resetIfBootedAndConnected() call can lose pending unlock request for a user if boot completion and unlock happens at the same time. In automotive, user unlock can happen before boot complete. - After vold reset, check for such lost user (=marked unlocking or unlocked in UserManager level but is still locked in StorageManager level) and retry unlocking. - This also undo previous CL to keep handler messages as that cannot prevent all the race, especially race of vold reset right after onUnlockUser call. But handler update is kept inside the service. - The restoration is done only for automotive device for now as phone does not have such case. Bug: 151457974 Test: try reboot in auto devices where this race can happen. Change-Id: I3b50750f5602c805e79f79f061eed44f880b25bd
Loading
Please register or sign in to comment