Merge "Add some logging to NDC."
diff --git a/services/java/com/android/server/NativeDaemonConnector.java b/services/java/com/android/server/NativeDaemonConnector.java
index f475dd6..308661f 100644
--- a/services/java/com/android/server/NativeDaemonConnector.java
+++ b/services/java/com/android/server/NativeDaemonConnector.java
@@ -153,6 +153,10 @@
start = i + 1;
}
}
+ if (start == 0) {
+ final String rawEvent = new String(buffer, start, count, Charsets.UTF_8);
+ log("RCV incomplete <- {" + rawEvent + "}");
+ }
// We should end at the amount we read. If not, compact then
// buffer and read again.
@@ -297,7 +301,11 @@
throws NativeDaemonConnectorException {
final ArrayList<NativeDaemonEvent> events = Lists.newArrayList();
- mResponseQueue.clear();
+ while (mResponseQueue.size() > 0) {
+ try {
+ log("ignoring {" + mResponseQueue.take() + "}");
+ } catch (Exception e) {}
+ }
final String sentCommand = sendCommandLocked(cmd, args);