Merge "Binder::Status: Add operator<< to help with gtest logging"
diff --git a/include/hwbinder/Status.h b/include/hwbinder/Status.h
index 203a01e..ce947fa 100644
--- a/include/hwbinder/Status.h
+++ b/include/hwbinder/Status.h
@@ -141,6 +141,13 @@
     String8 mMessage;
 };  // class Status
 
+// For gtest output logging
+template<typename T>
+T& operator<< (T& stream, const Status& s) {
+    stream << s.toString8().string();
+    return stream;
+}
+
 }  // namespace binder
 }  // namespace android