summaryrefslogtreecommitdiff
path: root/libs/binder/TextOutput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/binder/TextOutput.cpp')
-rw-r--r--libs/binder/TextOutput.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/binder/TextOutput.cpp b/libs/binder/TextOutput.cpp
index 9637334be5..db3e858a45 100644
--- a/libs/binder/TextOutput.cpp
+++ b/libs/binder/TextOutput.cpp
@@ -18,6 +18,9 @@
#include <binder/Debug.h>
+#include <utils/String8.h>
+#include <utils/String16.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -119,6 +122,18 @@ TextOutput& operator<<(TextOutput& to, const void* val)
return to;
}
+TextOutput& operator<<(TextOutput& to, const String8& val)
+{
+ to << val.string();
+ return to;
+}
+
+TextOutput& operator<<(TextOutput& to, const String16& val)
+{
+ to << String8(val).string();
+ return to;
+}
+
static void textOutputPrinter(void* cookie, const char* txt)
{
((TextOutput*)cookie)->print(txt, strlen(txt));