|
21 | 21 | import android.content.Context;
|
22 | 22 | import android.content.pm.FeatureInfo;
|
23 | 23 | import android.content.pm.PackageManager;
|
24 |
| -import android.os.RemoteException; |
25 | 24 | import android.os.ServiceManager;
|
26 |
| -import android.security.GenerateRkpKey; |
27 |
| -import android.security.keymaster.KeymasterDefs; |
28 | 25 |
|
29 | 26 | class CredstoreIdentityCredentialStore extends IdentityCredentialStore {
|
30 | 27 |
|
@@ -125,18 +122,7 @@ static CredstoreIdentityCredentialStore getInstanceForType(@NonNull Context cont
|
125 | 122 | @NonNull String docType) throws AlreadyPersonalizedException,
|
126 | 123 | DocTypeNotSupportedException {
|
127 | 124 | try {
|
128 |
| - IWritableCredential wc; |
129 |
| - wc = mStore.createCredential(credentialName, docType); |
130 |
| - try { |
131 |
| - GenerateRkpKey keyGen = new GenerateRkpKey(mContext); |
132 |
| - // We don't know what the security level is for the backing keymint, so go ahead and |
133 |
| - // poke the provisioner for both TEE and SB. |
134 |
| - keyGen.notifyKeyGenerated(KeymasterDefs.KM_SECURITY_LEVEL_TRUSTED_ENVIRONMENT); |
135 |
| - keyGen.notifyKeyGenerated(KeymasterDefs.KM_SECURITY_LEVEL_STRONGBOX); |
136 |
| - } catch (RemoteException e) { |
137 |
| - // Not really an error state. Does not apply at all if RKP is unsupported or |
138 |
| - // disabled on a given device. |
139 |
| - } |
| 125 | + IWritableCredential wc = mStore.createCredential(credentialName, docType); |
140 | 126 | return new CredstoreWritableIdentityCredential(mContext, credentialName, docType, wc);
|
141 | 127 | } catch (android.os.RemoteException e) {
|
142 | 128 | throw new RuntimeException("Unexpected RemoteException ", e);
|
|
0 commit comments