am fa024d1d: resolved conflicts for merge of c9517611 to jb-mr2-dev-plus-aosp

* commit 'fa024d1d0a2c4cdeb5deb691efa56fcaf0632827':
  Switch frameworks/base over from @hidden Charsets to public StandardCharsets.
This commit is contained in:
Elliott Hughes
2013-06-28 16:53:27 -07:00
committed by Android Git Automerger

View File

@@ -27,12 +27,12 @@ import android.util.Slog;
import com.android.internal.annotations.VisibleForTesting; import com.android.internal.annotations.VisibleForTesting;
import com.google.android.collect.Lists; import com.google.android.collect.Lists;
import java.nio.charset.Charsets;
import java.io.FileDescriptor; import java.io.FileDescriptor;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ArrayBlockingQueue;
@@ -139,7 +139,7 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
if (buffer[i] == 0) { if (buffer[i] == 0) {
final String rawEvent = new String( final String rawEvent = new String(
buffer, start, i - start, Charsets.UTF_8); buffer, start, i - start, StandardCharsets.UTF_8);
log("RCV <- {" + rawEvent + "}"); log("RCV <- {" + rawEvent + "}");
try { try {
@@ -160,7 +160,7 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo
} }
} }
if (start == 0) { 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 + "}"); log("RCV incomplete <- {" + rawEvent + "}");
} }
@@ -349,7 +349,7 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo
throw new NativeDaemonConnectorException("missing output stream"); throw new NativeDaemonConnectorException("missing output stream");
} else { } else {
try { try {
mOutputStream.write(rawCmd.getBytes(Charsets.UTF_8)); mOutputStream.write(rawCmd.getBytes(StandardCharsets.UTF_8));
} catch (IOException e) { } catch (IOException e) {
throw new NativeDaemonConnectorException("problem sending command", e); throw new NativeDaemonConnectorException("problem sending command", e);
} }