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

Commit 26ce11a1 authored by Zach Jang's avatar Zach Jang
Browse files

Revert "audio policy: bind setMode() and setPhoneState() operations"

This reverts commit 9ddf1c76.

Change-Id: I860ecc288a1798605dff46f39107f4450ca5cd56
parent 9ddf1c76
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -76,14 +76,10 @@ status_t AudioPolicyService::setPhoneState(audio_mode_t state)


    ALOGV("setPhoneState()");
    ALOGV("setPhoneState()");


    // acquire lock before calling setMode() so that setMode() + setPhoneState() are an atomic
    // operation from policy manager standpoint (no other operation (e.g track start or stop)
    // can be interleaved).
    Mutex::Autolock _l(mLock);

    // TODO: check if it is more appropriate to do it in platform specific policy manager
    // TODO: check if it is more appropriate to do it in platform specific policy manager
    AudioSystem::setMode(state);
    AudioSystem::setMode(state);


    Mutex::Autolock _l(mLock);
    mAudioPolicyManager->setPhoneState(state);
    mAudioPolicyManager->setPhoneState(state);
    mPhoneState = state;
    mPhoneState = state;
    return NO_ERROR;
    return NO_ERROR;