Skip to content
Commit 270db90c authored by Eric Biggers's avatar Eric Biggers
Browse files

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
parent 006b746b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment