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

Commit b502c760 authored by Bo Zhu's avatar Bo Zhu
Browse files

Change two helper methods back to be public ones, to fix issues of mocking

them in KeySyncTaskTest.java

I changed them from public to package-private in my last CL. Not sure
whey these issues didn't show up in tests last time

Bug: 112191661
Test: atest FrameworksServicesTests:com.android.server.locksettings.recoverablekeystore
Change-Id: I4e154b8ac5cc353190cc5874ddcd0f9051ea4542
parent 6152cffb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -87,13 +87,13 @@ public class TestOnlyInsecureCertificateHelper {
                || isTestOnlyCertificateAlias(rootCertificateAlias);
    }

    boolean doesCredentialSupportInsecureMode(int credentialType, String credential) {
    public boolean doesCredentialSupportInsecureMode(int credentialType, String credential) {
        return (credentialType == LockPatternUtils.CREDENTIAL_TYPE_PASSWORD)
            && (credential != null)
            && credential.startsWith(TrustedRootCertificates.INSECURE_PASSWORD_PREFIX);
    }

    Map<String, Pair<SecretKey, byte[]>> keepOnlyWhitelistedInsecureKeys(
    public Map<String, Pair<SecretKey, byte[]>> keepOnlyWhitelistedInsecureKeys(
            Map<String, Pair<SecretKey, byte[]>> rawKeys) {
        if (rawKeys == null) {
            return null;