Loading libs/binder/BpBinder.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -261,7 +261,7 @@ std::optional<int32_t> BpBinder::getDebugBinderHandle() const { bool BpBinder::isDescriptorCached() const { Mutex::Autolock _l(mLock); return mDescriptorCache.string() != kDescriptorUninit.string(); return mDescriptorCache.c_str() != kDescriptorUninit.c_str(); } const String16& BpBinder::getInterfaceDescriptor() const Loading @@ -279,7 +279,7 @@ const String16& BpBinder::getInterfaceDescriptor() const Mutex::Autolock _l(mLock); // mDescriptorCache could have been assigned while the lock was // released. if (mDescriptorCache.string() == kDescriptorUninit.string()) mDescriptorCache = res; if (mDescriptorCache.c_str() == kDescriptorUninit.c_str()) mDescriptorCache = res; } } Loading libs/binder/IActivityManager.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -52,8 +52,8 @@ public: } } else { // An exception was thrown back; fall through to return failure ALOGD("openContentUri(%s) caught exception %d\n", String8(stringUri).string(), exceptionCode); ALOGD("openContentUri(%s) caught exception %d\n", String8(stringUri).c_str(), exceptionCode); } } return fd; Loading libs/binder/IServiceManager.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -216,8 +216,8 @@ bool checkPermission(const String16& permission, pid_t pid, uid_t uid, bool logP if (res) { if (startTime != 0) { ALOGI("Check passed after %d seconds for %s from uid=%d pid=%d", (int)((uptimeMillis()-startTime)/1000), String8(permission).string(), uid, pid); (int)((uptimeMillis() - startTime) / 1000), String8(permission).c_str(), uid, pid); } return res; } Loading @@ -225,7 +225,7 @@ bool checkPermission(const String16& permission, pid_t pid, uid_t uid, bool logP // Is this a permission failure, or did the controller go away? if (IInterface::asBinder(pc)->isBinderAlive()) { if (logPermissionFailure) { ALOGW("Permission failure: %s from uid=%d pid=%d", String8(permission).string(), ALOGW("Permission failure: %s from uid=%d pid=%d", String8(permission).c_str(), uid, pid); } return false; Loading @@ -246,7 +246,7 @@ bool checkPermission(const String16& permission, pid_t pid, uid_t uid, bool logP if (startTime == 0) { startTime = uptimeMillis(); ALOGI("Waiting to check permission %s from uid=%d pid=%d", String8(permission).string(), uid, pid); String8(permission).c_str(), uid, pid); } sleep(1); } else { Loading Loading @@ -295,7 +295,7 @@ sp<IBinder> ServiceManagerShim::getService(const String16& name) const // retry interval in millisecond; note that vendor services stay at 100ms const useconds_t sleepTime = gSystemBootCompleted ? 1000 : 100; ALOGI("Waiting for service '%s' on '%s'...", String8(name).string(), ALOGI("Waiting for service '%s' on '%s'...", String8(name).c_str(), ProcessState::self()->getDriverName().c_str()); int n = 0; Loading @@ -306,12 +306,12 @@ sp<IBinder> ServiceManagerShim::getService(const String16& name) const sp<IBinder> svc = checkService(name); if (svc != nullptr) { ALOGI("Waiting for service '%s' on '%s' successful after waiting %" PRIi64 "ms", String8(name).string(), ProcessState::self()->getDriverName().c_str(), String8(name).c_str(), ProcessState::self()->getDriverName().c_str(), uptimeMillis() - startTime); return svc; } } ALOGW("Service %s didn't start. Returning NULL", String8(name).string()); ALOGW("Service %s didn't start. Returning NULL", String8(name).c_str()); return nullptr; } Loading libs/binder/MemoryDealer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -428,7 +428,7 @@ void SimpleBestFitAllocator::dump_l(const char* what) const { String8 result; dump_l(result, what); ALOGD("%s", result.string()); ALOGD("%s", result.c_str()); } void SimpleBestFitAllocator::dump(String8& result, Loading libs/binder/Parcel.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -854,7 +854,7 @@ constexpr int32_t kHeader = B_PACK_CHARS('S', 'Y', 'S', 'T'); // Write RPC headers. (previously just the interface token) status_t Parcel::writeInterfaceToken(const String16& interface) { return writeInterfaceToken(interface.string(), interface.size()); return writeInterfaceToken(interface.c_str(), interface.size()); } status_t Parcel::writeInterfaceToken(const char16_t* str, size_t len) { Loading Loading @@ -918,7 +918,7 @@ bool Parcel::checkInterface(IBinder* binder) const bool Parcel::enforceInterface(const String16& interface, IPCThreadState* threadState) const { return enforceInterface(interface.string(), interface.size(), threadState); return enforceInterface(interface.c_str(), interface.size(), threadState); } bool Parcel::enforceInterface(const char16_t* interface, Loading Loading @@ -977,8 +977,8 @@ bool Parcel::enforceInterface(const char16_t* interface, return true; } else { ALOGW("**** enforceInterface() expected '%s' but read '%s'", String8(interface, len).string(), String8(parcel_interface, parcel_interface_len).string()); String8(interface, len).c_str(), String8(parcel_interface, parcel_interface_len).c_str()); return false; } } Loading Loading @@ -1376,7 +1376,7 @@ status_t Parcel::writeCString(const char* str) status_t Parcel::writeString8(const String8& str) { return writeString8(str.string(), str.size()); return writeString8(str.c_str(), str.size()); } status_t Parcel::writeString8(const char* str, size_t len) Loading @@ -1399,7 +1399,7 @@ status_t Parcel::writeString8(const char* str, size_t len) 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) Loading Loading
libs/binder/BpBinder.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -261,7 +261,7 @@ std::optional<int32_t> BpBinder::getDebugBinderHandle() const { bool BpBinder::isDescriptorCached() const { Mutex::Autolock _l(mLock); return mDescriptorCache.string() != kDescriptorUninit.string(); return mDescriptorCache.c_str() != kDescriptorUninit.c_str(); } const String16& BpBinder::getInterfaceDescriptor() const Loading @@ -279,7 +279,7 @@ const String16& BpBinder::getInterfaceDescriptor() const Mutex::Autolock _l(mLock); // mDescriptorCache could have been assigned while the lock was // released. if (mDescriptorCache.string() == kDescriptorUninit.string()) mDescriptorCache = res; if (mDescriptorCache.c_str() == kDescriptorUninit.c_str()) mDescriptorCache = res; } } Loading
libs/binder/IActivityManager.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -52,8 +52,8 @@ public: } } else { // An exception was thrown back; fall through to return failure ALOGD("openContentUri(%s) caught exception %d\n", String8(stringUri).string(), exceptionCode); ALOGD("openContentUri(%s) caught exception %d\n", String8(stringUri).c_str(), exceptionCode); } } return fd; Loading
libs/binder/IServiceManager.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -216,8 +216,8 @@ bool checkPermission(const String16& permission, pid_t pid, uid_t uid, bool logP if (res) { if (startTime != 0) { ALOGI("Check passed after %d seconds for %s from uid=%d pid=%d", (int)((uptimeMillis()-startTime)/1000), String8(permission).string(), uid, pid); (int)((uptimeMillis() - startTime) / 1000), String8(permission).c_str(), uid, pid); } return res; } Loading @@ -225,7 +225,7 @@ bool checkPermission(const String16& permission, pid_t pid, uid_t uid, bool logP // Is this a permission failure, or did the controller go away? if (IInterface::asBinder(pc)->isBinderAlive()) { if (logPermissionFailure) { ALOGW("Permission failure: %s from uid=%d pid=%d", String8(permission).string(), ALOGW("Permission failure: %s from uid=%d pid=%d", String8(permission).c_str(), uid, pid); } return false; Loading @@ -246,7 +246,7 @@ bool checkPermission(const String16& permission, pid_t pid, uid_t uid, bool logP if (startTime == 0) { startTime = uptimeMillis(); ALOGI("Waiting to check permission %s from uid=%d pid=%d", String8(permission).string(), uid, pid); String8(permission).c_str(), uid, pid); } sleep(1); } else { Loading Loading @@ -295,7 +295,7 @@ sp<IBinder> ServiceManagerShim::getService(const String16& name) const // retry interval in millisecond; note that vendor services stay at 100ms const useconds_t sleepTime = gSystemBootCompleted ? 1000 : 100; ALOGI("Waiting for service '%s' on '%s'...", String8(name).string(), ALOGI("Waiting for service '%s' on '%s'...", String8(name).c_str(), ProcessState::self()->getDriverName().c_str()); int n = 0; Loading @@ -306,12 +306,12 @@ sp<IBinder> ServiceManagerShim::getService(const String16& name) const sp<IBinder> svc = checkService(name); if (svc != nullptr) { ALOGI("Waiting for service '%s' on '%s' successful after waiting %" PRIi64 "ms", String8(name).string(), ProcessState::self()->getDriverName().c_str(), String8(name).c_str(), ProcessState::self()->getDriverName().c_str(), uptimeMillis() - startTime); return svc; } } ALOGW("Service %s didn't start. Returning NULL", String8(name).string()); ALOGW("Service %s didn't start. Returning NULL", String8(name).c_str()); return nullptr; } Loading
libs/binder/MemoryDealer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -428,7 +428,7 @@ void SimpleBestFitAllocator::dump_l(const char* what) const { String8 result; dump_l(result, what); ALOGD("%s", result.string()); ALOGD("%s", result.c_str()); } void SimpleBestFitAllocator::dump(String8& result, Loading
libs/binder/Parcel.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -854,7 +854,7 @@ constexpr int32_t kHeader = B_PACK_CHARS('S', 'Y', 'S', 'T'); // Write RPC headers. (previously just the interface token) status_t Parcel::writeInterfaceToken(const String16& interface) { return writeInterfaceToken(interface.string(), interface.size()); return writeInterfaceToken(interface.c_str(), interface.size()); } status_t Parcel::writeInterfaceToken(const char16_t* str, size_t len) { Loading Loading @@ -918,7 +918,7 @@ bool Parcel::checkInterface(IBinder* binder) const bool Parcel::enforceInterface(const String16& interface, IPCThreadState* threadState) const { return enforceInterface(interface.string(), interface.size(), threadState); return enforceInterface(interface.c_str(), interface.size(), threadState); } bool Parcel::enforceInterface(const char16_t* interface, Loading Loading @@ -977,8 +977,8 @@ bool Parcel::enforceInterface(const char16_t* interface, return true; } else { ALOGW("**** enforceInterface() expected '%s' but read '%s'", String8(interface, len).string(), String8(parcel_interface, parcel_interface_len).string()); String8(interface, len).c_str(), String8(parcel_interface, parcel_interface_len).c_str()); return false; } } Loading Loading @@ -1376,7 +1376,7 @@ status_t Parcel::writeCString(const char* str) status_t Parcel::writeString8(const String8& str) { return writeString8(str.string(), str.size()); return writeString8(str.c_str(), str.size()); } status_t Parcel::writeString8(const char* str, size_t len) Loading @@ -1399,7 +1399,7 @@ status_t Parcel::writeString8(const char* str, size_t len) 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) Loading