Use String8/16 c_str [main]
Bug: 295394788
Test: make checkbuild
Change-Id: I49bebe897edcc2cf634c4b78c7a096000e0c7744
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index 11665c6..804a227 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -635,7 +635,7 @@
bool shouldChange = !hasAppOps; // check if we need to update.
if (mHasOpPlayAudio.compare_exchange_strong(shouldChange, hasAppOps)) {
ALOGI("OpPlayAudio: track:%d package:%s usage:%d %smuted", mId,
- String8(mPackageName).string(), mUsage, hasAppOps ? "not " : "");
+ String8(mPackageName).c_str(), mUsage, hasAppOps ? "not " : "");
if (doBroadcast) {
auto thread = mThread.promote();
if (thread != nullptr && thread->type() == IAfThreadBase::OFFLOAD) {
@@ -657,7 +657,7 @@
return;
}
- ALOGI("%s OP_PLAY_AUDIO callback received for %s", __func__, String8(packageName).string());
+ ALOGI("%s OP_PLAY_AUDIO callback received for %s", __func__, String8(packageName).c_str());
sp<OpPlayAudioMonitor> monitor = mMonitor.promote();
if (monitor != NULL) {
monitor->checkPlayAudioForUsage(/*doBroadcast=*/true);