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

Commit fd16414d authored by Zach Jang's avatar Zach Jang Committed by android-build-merger
Browse files

Merge "Revert "audio policy: bind setMode() and setPhoneState() operations"" into mnc-dev

am: be6f10c0

* commit 'be6f10c0':
  Revert "audio policy: bind setMode() and setPhoneState() operations"
parents 28323c3d be6f10c0
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -76,14 +76,10 @@ status_t AudioPolicyService::setPhoneState(audio_mode_t state)

    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
    AudioSystem::setMode(state);

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