Check if the given user is unlocked when unlock by token

Bug: 76010226
Test: None

Change-Id: I2ceea0f185c5e54a9c2a529a9cf8db78587c4072
This commit is contained in:
Hongwei Wang
2018-03-19 10:56:44 -07:00
parent 83ad4e53b6
commit bab773d23f

View File

@@ -545,7 +545,7 @@ public class TrustAgentService extends Service {
*/
public final void unlockUserWithToken(long handle, byte[] token, UserHandle user) {
UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);
if (um.isUserUnlocked()) {
if (um.isUserUnlocked(user)) {
Slog.i(TAG, "User already unlocked");
return;
}