From 28fe954075f2a0a7ae700809ec83dc898f77f67c Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Tue, 2 Oct 2018 11:55:20 +0100 Subject: [PATCH] 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 --- src/com/android/settings/CredentialStorage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/settings/CredentialStorage.java b/src/com/android/settings/CredentialStorage.java index ffbd2ce409b..0a559c2bd9a 100644 --- a/src/com/android/settings/CredentialStorage.java +++ b/src/com/android/settings/CredentialStorage.java @@ -218,7 +218,7 @@ public final class CredentialStorage extends Activity { 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);