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,10 +264,16 @@ public class UserCredentialsSettings extends OptionsMenuFragment implements OnIt
|
|||||||
final SortedMap<String, Credential> aliasMap = new TreeMap<>();
|
final SortedMap<String, Credential> aliasMap = new TreeMap<>();
|
||||||
for (final Credential.Type type : Credential.Type.values()) {
|
for (final Credential.Type type : Credential.Type.values()) {
|
||||||
for (final String alias : keyStore.list(type.prefix, uid)) {
|
for (final String alias : keyStore.list(type.prefix, uid)) {
|
||||||
// Do not show work profile keys in user credentials
|
if (UserHandle.getAppId(uid) == Process.SYSTEM_UID) {
|
||||||
if (alias.startsWith(LockPatternUtils.PROFILE_KEY_NAME_ENCRYPT) ||
|
// Do not show work profile keys in user credentials
|
||||||
alias.startsWith(LockPatternUtils.PROFILE_KEY_NAME_DECRYPT)) {
|
if (alias.startsWith(LockPatternUtils.PROFILE_KEY_NAME_ENCRYPT) ||
|
||||||
continue;
|
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);
|
Credential c = aliasMap.get(alias);
|
||||||
if (c == null) {
|
if (c == null) {
|
||||||
|
Reference in New Issue
Block a user