summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Wasilczyk <twasilczyk@google.com>2023-08-16 21:29:40 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-08-16 21:29:40 +0000
commitf410b79ee79a4c794895276b85d62dacb0e9f427 (patch)
tree684b7d319858252f50110d34357ebe1f76b1a50e
parentbd68d24889bc81d827cc65d5c226bfdb5fece1f0 (diff)
parent11c9b4f0c919910ad8f530cf3ace726801ab6da4 (diff)
downloadlibhwbinder-f410b79ee79a4c794895276b85d62dacb0e9f427.tar.gz
Use String8/16 c_str am: e97a1ec320 am: d295199fdb am: 51460f607c am: 1beedfe9e1 am: 11c9b4f0c9
Original change: https://android-review.googlesource.com/c/platform/system/libhwbinder/+/2704655 Change-Id: I38715f002ba0e6575a3b827a5817dcfd425b414b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Parcel.cpp2
-rw-r--r--ProcessState.cpp6
-rw-r--r--TextOutput.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/Parcel.cpp b/Parcel.cpp
index 77e2161..177b102 100644
--- a/Parcel.cpp
+++ b/Parcel.cpp
@@ -596,7 +596,7 @@ status_t Parcel::writeString16(const std::unique_ptr<String16>& str)
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 @@ void ProcessState::spawnPooledThread(bool isMain)
{
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 @@ size_t ProcessState::getMaxThreads() {
}
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 bool &val)
inline TextOutput& operator<<(TextOutput& to, const String16& val)
{
- to << String8(val).string();
+ to << String8(val).c_str();
return to;
}