summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Wasilczyk <twasilczyk@google.com>2023-08-16 19:12:45 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-08-16 19:12:45 +0000
commit51460f607c72aaebc7edff6f2baeb70254d3f6bc (patch)
tree168beedd9efca369f9d40fd970e250eb161223dd
parent8defdbb4ef1d88ebd76e1268f4f31733f258e817 (diff)
parentd295199fdb43cb6243bc5e29dfb080cc02e57ee7 (diff)
downloadlibhwbinder-51460f607c72aaebc7edff6f2baeb70254d3f6bc.tar.gz
Use String8/16 c_str am: e97a1ec320 am: d295199fdb
Original change: https://android-review.googlesource.com/c/platform/system/libhwbinder/+/2704655 Change-Id: I23775800f46780ef7123717424394491c824cd89 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;
}