Use String8/16 c_str am: e97a1ec320 am: d295199fdb am: 51460f607c am: 1beedfe9e1

Original change: https://android-review.googlesource.com/c/platform/system/libhwbinder/+/2704655

Change-Id: Ie028c2f57e13a1186a9e01232249fa1c95fa9e3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/Parcel.cpp b/Parcel.cpp
index a20d98c..99389d7 100644
--- a/Parcel.cpp
+++ b/Parcel.cpp
@@ -596,7 +596,7 @@
 
 status_t Parcel::writeString16(const String16& str)
 {
-    return writeString16(str.string(), str.size());
+    return writeString16(str.c_str(), str.size());
 }
 
 status_t Parcel::writeString16(const char16_t* str, size_t len)
diff --git a/ProcessState.cpp b/ProcessState.cpp
index c2284f8..2403500 100644
--- a/ProcessState.cpp
+++ b/ProcessState.cpp
@@ -301,9 +301,9 @@
 {
     if (mThreadPoolStarted) {
         String8 name = makeBinderThreadName();
-        ALOGV("Spawning new pooled thread, name=%s\n", name.string());
+        ALOGV("Spawning new pooled thread, name=%s\n", name.c_str());
         sp<Thread> t = new PoolThread(isMain);
-        t->run(name.string());
+        t->run(name.c_str());
     }
 }
 
@@ -358,7 +358,7 @@
 }
 
 void ProcessState::giveThreadPoolName() {
-    androidSetThreadName( makeBinderThreadName().string() );
+    androidSetThreadName( makeBinderThreadName().c_str() );
 }
 
 static int open_driver()
diff --git a/TextOutput.h b/TextOutput.h
index 9611ddb..ec4000b 100644
--- a/TextOutput.h
+++ b/TextOutput.h
@@ -137,7 +137,7 @@
 
 inline TextOutput& operator<<(TextOutput& to, const String16& val)
 {
-    to << String8(val).string();
+    to << String8(val).c_str();
     return to;
 }