Do not show key entries used for user authentication flow
Bug: 33126414 Test: Enable new authentication flow; go to user credentials in Settings observe no entries related to user authentication are shown. Change-Id: I62e5796cc73213b23ca7809a77082350a883fbee
This commit is contained in:
@@ -264,11 +264,17 @@ public class UserCredentialsSettings extends OptionsMenuFragment implements OnIt
|
||||
final SortedMap<String, Credential> aliasMap = new TreeMap<>();
|
||||
for (final Credential.Type type : Credential.Type.values()) {
|
||||
for (final String alias : keyStore.list(type.prefix, uid)) {
|
||||
if (UserHandle.getAppId(uid) == Process.SYSTEM_UID) {
|
||||
// Do not show work profile keys in user credentials
|
||||
if (alias.startsWith(LockPatternUtils.PROFILE_KEY_NAME_ENCRYPT) ||
|
||||
alias.startsWith(LockPatternUtils.PROFILE_KEY_NAME_DECRYPT)) {
|
||||
continue;
|
||||
}
|
||||
// Do not show synthetic password keys in user credential
|
||||
if (alias.startsWith(LockPatternUtils.SYNTHETIC_PASSWORD_KEY_PREFIX)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Credential c = aliasMap.get(alias);
|
||||
if (c == null) {
|
||||
c = new Credential(alias, uid);
|
||||
|
Reference in New Issue
Block a user