diff options
author | Elliott Hughes <enh@google.com> | 2013-06-28 16:24:48 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2013-06-28 16:24:48 -0700 |
commit | d396a448b2e36e29598c954b64bfddef73f3fae0 (patch) | |
tree | c8851235188aa3e48f7069c8a6004e40b304d253 /keystore | |
parent | 5216f11e462b9f17704c0ac9e193d2149f3fa755 (diff) | |
download | frameworks_base-d396a448b2e36e29598c954b64bfddef73f3fae0.zip frameworks_base-d396a448b2e36e29598c954b64bfddef73f3fae0.tar.gz frameworks_base-d396a448b2e36e29598c954b64bfddef73f3fae0.tar.bz2 |
Switch frameworks/base over from @hidden Charsets to public StandardCharsets.
Bug: 3484927
Change-Id: I5d136d2ee629588538602766a182ae14ce5fc63c
Diffstat (limited to 'keystore')
-rw-r--r-- | keystore/java/android/security/Credentials.java | 6 | ||||
-rw-r--r-- | keystore/tests/src/android/security/KeyStoreTest.java | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/keystore/java/android/security/Credentials.java b/keystore/java/android/security/Credentials.java index 166849d..767647c 100644 --- a/keystore/java/android/security/Credentials.java +++ b/keystore/java/android/security/Credentials.java @@ -31,7 +31,7 @@ import java.io.ObjectOutputStream; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; -import java.nio.charset.Charsets; +import java.nio.charset.StandardCharsets; import java.security.KeyPair; import java.security.cert.Certificate; import java.security.cert.CertificateEncodingException; @@ -127,7 +127,7 @@ public class Credentials { public static byte[] convertToPem(Certificate... objects) throws IOException, CertificateEncodingException { ByteArrayOutputStream bao = new ByteArrayOutputStream(); - Writer writer = new OutputStreamWriter(bao, Charsets.US_ASCII); + Writer writer = new OutputStreamWriter(bao, StandardCharsets.US_ASCII); PemWriter pw = new PemWriter(writer); for (Certificate o : objects) { pw.writeObject(new PemObject("CERTIFICATE", o.getEncoded())); @@ -142,7 +142,7 @@ public class Credentials { public static List<X509Certificate> convertFromPem(byte[] bytes) throws IOException, CertificateException { ByteArrayInputStream bai = new ByteArrayInputStream(bytes); - Reader reader = new InputStreamReader(bai, Charsets.US_ASCII); + Reader reader = new InputStreamReader(bai, StandardCharsets.US_ASCII); PemReader pr = new PemReader(reader); CertificateFactory cf = CertificateFactory.getInstance("X509"); diff --git a/keystore/tests/src/android/security/KeyStoreTest.java b/keystore/tests/src/android/security/KeyStoreTest.java index 1de1eaf..0f29800 100644 --- a/keystore/tests/src/android/security/KeyStoreTest.java +++ b/keystore/tests/src/android/security/KeyStoreTest.java @@ -22,7 +22,7 @@ import android.security.KeyStore; import android.test.ActivityUnitTestCase; import android.test.AssertionFailedError; import android.test.suitebuilder.annotation.MediumTest; -import java.nio.charset.Charsets; +import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.Date; import java.util.HashSet; @@ -45,11 +45,11 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> { private static final String TEST_KEYNAME = "test-key"; private static final String TEST_KEYNAME1 = "test-key.1"; private static final String TEST_KEYNAME2 = "test-key\02"; - private static final byte[] TEST_KEYVALUE = "test value".getBytes(Charsets.UTF_8); + private static final byte[] TEST_KEYVALUE = "test value".getBytes(StandardCharsets.UTF_8); // "Hello, World" in Chinese private static final String TEST_I18N_KEY = "\u4F60\u597D, \u4E16\u754C"; - private static final byte[] TEST_I18N_VALUE = TEST_I18N_KEY.getBytes(Charsets.UTF_8); + private static final byte[] TEST_I18N_VALUE = TEST_I18N_KEY.getBytes(StandardCharsets.UTF_8); // Test vector data for signatures private static final byte[] TEST_DATA = new byte[256]; |