Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4e13b4a authored by Andres Morales's avatar Andres Morales Committed by Android (Google) Code Review
Browse files

Merge "Clear secure user ID and notify keystore when lock is cleared"

parents fbad74b2 cfb61601
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -69,4 +69,11 @@ interface IGateKeeperService {
     * @param uid the Android user id
     */
    long getSecureUserId(int uid);

    /**
     * Clears secure user id associated with the provided Android ID.
     * Must be called when password is set to NONE.
     * @param uid the Android user id.
     */
    void clearSecureUserId(int uid);
}
+4 −0
Original line number Diff line number Diff line
@@ -388,7 +388,9 @@ public class LockSettingsService extends ILockSettings.Stub {
        byte[] currentHandle = getCurrentHandle(userId);

        if (pattern == null) {
            getGateKeeperService().clearSecureUserId(userId);
            mStorage.writePatternHash(null, userId);
            maybeUpdateKeystore(null, userId);
            return;
        }

@@ -414,7 +416,9 @@ public class LockSettingsService extends ILockSettings.Stub {
        byte[] currentHandle = getCurrentHandle(userId);

        if (password == null) {
            getGateKeeperService().clearSecureUserId(userId);
            mStorage.writePasswordHash(null, userId);
            maybeUpdateKeystore(null, userId);
            return;
        }