Avoid deprecated PrivateKeyInfo.getAlgorithmId()
Switch from using the PrivateKeyInfo.getAlgorithmId() method to
using the functionally identical PrivateKeyInfo.getPrivateKeyAlgorithm()
method instead.
Bug: 113148576
Test: build only / inspection
Merged-In: Iab2d3b23ad969f683d716cb981e32fd554c67a81
Change-Id: I9ed5c96a20d6749bf75212c0fd820d71ca0a6053
diff --git a/src/com/android/settings/CredentialStorage.java b/src/com/android/settings/CredentialStorage.java
index ffbd2ce..0a559c2 100644
--- a/src/com/android/settings/CredentialStorage.java
+++ b/src/com/android/settings/CredentialStorage.java
@@ -218,7 +218,7 @@
try {
ASN1InputStream bIn = new ASN1InputStream(new ByteArrayInputStream(keyData));
PrivateKeyInfo pki = PrivateKeyInfo.getInstance(bIn.readObject());
- String algOid = pki.getAlgorithmId().getAlgorithm().getId();
+ String algOid = pki.getPrivateKeyAlgorithm().getAlgorithm().getId();
String algName = new AlgorithmId(new ObjectIdentifier(algOid)).getName();
return KeyChain.isBoundKeyAlgorithm(algName);