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

Commit b4d6b4f7 authored by Rubin Xu's avatar Rubin Xu Committed by Android (Google) Code Review
Browse files

Merge "Do not show key entries used for user authentication flow"

parents 011d78ae 52221d80
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -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);