summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2024-05-06 16:55:33 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-05-06 16:55:33 +0000
commitc93312c82225ab476e915b172571b348661bf778 (patch)
tree8ef67903b22ee63ca014437abe14fa049e2e8e56
parent1996a0c30bad8033da82020af27a29dd8392973a (diff)
parent10d4bbdddbcdf065cfdde414286bf8d7111a3a49 (diff)
downloadCertInstaller-main.tar.gz
Merge "Use KeyProperties.UID_SELF instead of KeyStore.UID_SELF" into mainHEADmastermain
-rw-r--r--robotests/src/com/android/certinstaller/CertInstallerRoboTest.java6
-rw-r--r--src/com/android/certinstaller/CredentialHelper.java2
2 files changed, 4 insertions, 4 deletions
diff --git a/robotests/src/com/android/certinstaller/CertInstallerRoboTest.java b/robotests/src/com/android/certinstaller/CertInstallerRoboTest.java
index 1c845a9..54d8abb 100644
--- a/robotests/src/com/android/certinstaller/CertInstallerRoboTest.java
+++ b/robotests/src/com/android/certinstaller/CertInstallerRoboTest.java
@@ -22,7 +22,7 @@ import android.content.Context;
import android.content.Intent;
import android.security.Credentials;
import android.security.KeyChain;
-import android.security.KeyStore;
+import android.security.keystore.KeyProperties;
import android.os.Process;
import org.junit.Before;
@@ -82,7 +82,7 @@ public final class CertInstallerRoboTest {
/**
* mUid should be ignored if EXTRA_CERTIFICATE_USAGE is provided.
* if EXTRA_CERTIFICATE_USAGE does not equal CERTIFICATE_USAGE_WIFI,
- * mUid should equal KeyStore.UID_SELF
+ * mUid should equal KeyProperties.UID_SELF
*/
@Test
public void testUidUsageNotNullPass() throws Exception {
@@ -92,7 +92,7 @@ public final class CertInstallerRoboTest {
CredentialHelper helper = startActivityAndGetCredentialHelper(intent);
- assertThat(helper.getUid()).isEqualTo(KeyStore.UID_SELF);
+ assertThat(helper.getUid()).isEqualTo(KeyProperties.UID_SELF);
assertThat(helper.getCertUsageSelected()).isEqualTo("usage");
}
diff --git a/src/com/android/certinstaller/CredentialHelper.java b/src/com/android/certinstaller/CredentialHelper.java
index eab58f5..bc1a141 100644
--- a/src/com/android/certinstaller/CredentialHelper.java
+++ b/src/com/android/certinstaller/CredentialHelper.java
@@ -16,7 +16,7 @@
package com.android.certinstaller;
-import static android.security.KeyStore.UID_SELF;
+import static android.security.keystore.KeyProperties.UID_SELF;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.app.KeyguardManager;