Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b61c7211 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Use String8/16 c_str [main]

Bug: 295394788
Test: make checkbuild
Change-Id: I49bebe897edcc2cf634c4b78c7a096000e0c7744
parent 5fd267ad
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -635,7 +635,7 @@ void OpPlayAudioMonitor::checkPlayAudioForUsage(bool doBroadcast) {
    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 @@ void OpPlayAudioMonitor::PlayAudioOpCallback::opChanged(int32_t op,
        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);
+2 −2
Original line number Diff line number Diff line
@@ -241,13 +241,13 @@ status_t AudioPolicyMixCollection::updateMix(
            mix.mRouteFlags == registeredMix->mRouteFlags) {
            registeredMix->mCriteria = updatedCriteria;
            ALOGV("updateMix(): updated mix for dev=0x%x addr=%s", mix.mDeviceType,
                  mix.mDeviceAddress.string());
                  mix.mDeviceAddress.c_str());
            return NO_ERROR;
        }
    }

    ALOGE("updateMix(): mix not registered for dev=0x%x addr=%s", mix.mDeviceType,
          mix.mDeviceAddress.string());
          mix.mDeviceAddress.c_str());
    return BAD_VALUE;
}