summaryrefslogtreecommitdiffstats
path: root/services/java/com/android
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-06-28 16:24:48 -0700
committerElliott Hughes <enh@google.com>2013-06-28 16:24:48 -0700
commitd396a448b2e36e29598c954b64bfddef73f3fae0 (patch)
treec8851235188aa3e48f7069c8a6004e40b304d253 /services/java/com/android
parent5216f11e462b9f17704c0ac9e193d2149f3fa755 (diff)
downloadframeworks_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 'services/java/com/android')
-rw-r--r--services/java/com/android/server/NativeDaemonConnector.java8
-rw-r--r--services/java/com/android/server/connectivity/Vpn.java10
2 files changed, 9 insertions, 9 deletions
diff --git a/services/java/com/android/server/NativeDaemonConnector.java b/services/java/com/android/server/NativeDaemonConnector.java
index 5e94a9f..e423780 100644
--- a/services/java/com/android/server/NativeDaemonConnector.java
+++ b/services/java/com/android/server/NativeDaemonConnector.java
@@ -28,12 +28,12 @@ import android.util.Slog;
import com.android.internal.annotations.VisibleForTesting;
import com.google.android.collect.Lists;
-import java.nio.charset.Charsets;
import java.io.FileDescriptor;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.ArrayBlockingQueue;
@@ -142,7 +142,7 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo
for (int i = 0; i < count; i++) {
if (buffer[i] == 0) {
final String rawEvent = new String(
- buffer, start, i - start, Charsets.UTF_8);
+ buffer, start, i - start, StandardCharsets.UTF_8);
log("RCV <- {" + rawEvent + "}");
try {
@@ -163,7 +163,7 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo
}
}
if (start == 0) {
- final String rawEvent = new String(buffer, start, count, Charsets.UTF_8);
+ final String rawEvent = new String(buffer, start, count, StandardCharsets.UTF_8);
log("RCV incomplete <- {" + rawEvent + "}");
}
@@ -319,7 +319,7 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo
throw new NativeDaemonConnectorException("missing output stream");
} else {
try {
- mOutputStream.write(sentCmd.getBytes(Charsets.UTF_8));
+ mOutputStream.write(sentCmd.getBytes(StandardCharsets.UTF_8));
} catch (IOException e) {
throw new NativeDaemonConnectorException("problem sending command", e);
}
diff --git a/services/java/com/android/server/connectivity/Vpn.java b/services/java/com/android/server/connectivity/Vpn.java
index bb7334a..48e5e57 100644
--- a/services/java/com/android/server/connectivity/Vpn.java
+++ b/services/java/com/android/server/connectivity/Vpn.java
@@ -69,7 +69,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.net.Inet4Address;
import java.net.InetAddress;
-import java.nio.charset.Charsets;
+import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import libcore.io.IoUtils;
@@ -477,15 +477,15 @@ public class Vpn extends BaseNetworkStateTracker {
if (!profile.ipsecUserCert.isEmpty()) {
privateKey = Credentials.USER_PRIVATE_KEY + profile.ipsecUserCert;
byte[] value = keyStore.get(Credentials.USER_CERTIFICATE + profile.ipsecUserCert);
- userCert = (value == null) ? null : new String(value, Charsets.UTF_8);
+ userCert = (value == null) ? null : new String(value, StandardCharsets.UTF_8);
}
if (!profile.ipsecCaCert.isEmpty()) {
byte[] value = keyStore.get(Credentials.CA_CERTIFICATE + profile.ipsecCaCert);
- caCert = (value == null) ? null : new String(value, Charsets.UTF_8);
+ caCert = (value == null) ? null : new String(value, StandardCharsets.UTF_8);
}
if (!profile.ipsecServerCert.isEmpty()) {
byte[] value = keyStore.get(Credentials.USER_CERTIFICATE + profile.ipsecServerCert);
- serverCert = (value == null) ? null : new String(value, Charsets.UTF_8);
+ serverCert = (value == null) ? null : new String(value, StandardCharsets.UTF_8);
}
if (privateKey == null || userCert == null || caCert == null || serverCert == null) {
throw new IllegalStateException("Cannot load credentials");
@@ -756,7 +756,7 @@ public class Vpn extends BaseNetworkStateTracker {
// Send over the arguments.
OutputStream out = mSockets[i].getOutputStream();
for (String argument : arguments) {
- byte[] bytes = argument.getBytes(Charsets.UTF_8);
+ byte[] bytes = argument.getBytes(StandardCharsets.UTF_8);
if (bytes.length >= 0xFFFF) {
throw new IllegalArgumentException("Argument is too large");
}