From b81181b9f333bd1df87bbf40c614f705ff75f2e3 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Tue, 2 Oct 2018 13:27:44 +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 Change-Id: Iab2d3b23ad969f683d716cb981e32fd554c67a81 --- 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 319d599018d..7b0be943bc5 100644 --- a/src/com/android/settings/CredentialStorage.java +++ b/src/com/android/settings/CredentialStorage.java @@ -205,7 +205,7 @@ public final class CredentialStorage extends FragmentActivity { try { final ASN1InputStream bIn = new ASN1InputStream(new ByteArrayInputStream(keyData)); final PrivateKeyInfo pki = PrivateKeyInfo.getInstance(bIn.readObject()); - final String algOid = pki.getAlgorithmId().getAlgorithm().getId(); + final String algOid = pki.getPrivateKeyAlgorithm().getAlgorithm().getId(); final String algName = new AlgorithmId(new ObjectIdentifier(algOid)).getName(); return KeyChain.isBoundKeyAlgorithm(algName);