diff options
author | Elliott Hughes <enh@google.com> | 2013-06-28 16:41:19 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2013-06-28 16:41:19 -0700 |
commit | a920f25fe55fc9afc7640902a200f19ce278588b (patch) | |
tree | d248ebfca6085ff79f1a5cfb91a1778b4617ac82 /keystore | |
parent | 324993abed48843da1cb63063668147151e4db5c (diff) | |
parent | fca0f92e0a9c121dcf28fa783e884f1fb4993374 (diff) | |
download | frameworks_base-a920f25fe55fc9afc7640902a200f19ce278588b.zip frameworks_base-a920f25fe55fc9afc7640902a200f19ce278588b.tar.gz frameworks_base-a920f25fe55fc9afc7640902a200f19ce278588b.tar.bz2 |
resolved conflicts for merge of fca0f92e to stage-aosp-master
Change-Id: I4791f0ffa324a313b8390fbde6d8f82f716ecf74
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 815f4ac..9bf88d3 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]; |