summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Wasilczyk <twasilczyk@google.com>2023-08-16 18:27:43 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-08-16 18:27:43 +0000
commitd295199fdb43cb6243bc5e29dfb080cc02e57ee7 (patch)
tree168beedd9efca369f9d40fd970e250eb161223dd
parent8defdbb4ef1d88ebd76e1268f4f31733f258e817 (diff)
parente97a1ec320fb8576e460c05ac752afb5c19d8023 (diff)
downloadlibhwbinder-d295199fdb43cb6243bc5e29dfb080cc02e57ee7.tar.gz
Use String8/16 c_str am: e97a1ec320
Original change: https://android-review.googlesource.com/c/platform/system/libhwbinder/+/2704655 Change-Id: I1f55329409ad223d2f0494c70135029f1d5e20be 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 a20d98c..99389d7 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;
}