Get list of unlocked users from vold
When StorageManagerService is started, initialize mLocalUnlockedUsers to
the list of users that vold knows is unlocked rather than an empty list.
This fixes StorageManagerService.isUserKeyUnlocked() to return true
instead of false for already-unlocked users after a userspace reboot.
So far this bug hadn't been causing real problems, since UserController
will always try to unlock users without providing a secret, and that
happened to succeed with a vold warning for users that vold already
knows are unlocked -- even if a secret would normally be required.
However, in order to eliminate misleading error messages from the log,
system_server needs to stop asking vold to unlock users that require a
secret without providing one. To keep that from breaking userspace
reboot, we need to fix mLocalUnlockedUsers to properly reflect the
initial state and not have to be fixed up "by accident" later.
Bug: 146206679
Test: see I482ed8017f7bbc8f7d4fd5a2c0f58629317ce4ed
Change-Id: Ife12ba9fbb2e65822b8d54de8f7a050b6ebe10a9
1 file changed