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

Commit 4692352a authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat Committed by Steve Kondik
Browse files

audioflinger: remove wake lock implementation from APS

-AudioPolicyService is not able to acquire the wakelock.
 None of the Audio functionality is impacted though it always fails
 to hold the wakelock.

-APS tries to access wake lock directly using hardware_legacy APIs
 and it always fails due to lack of capability.

-Remove the wake lock implementation since it always fails and
 it does not impact any audio functionality.

Change-Id: I0055c188fb8d6fd70a27c3945f5e68addac8509b
parent 3e64b6a1
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -703,9 +703,6 @@ AudioPolicyService::AudioCommandThread::AudioCommandThread(String8 name,

AudioPolicyService::AudioCommandThread::~AudioCommandThread()
{
    if (!mAudioCommands.isEmpty()) {
        release_wake_lock(mName.string());
    }
    for (size_t k=0; k < mAudioCommands.size(); k++) {
        delete mAudioCommands[k]->mParam;
        delete mAudioCommands[k];
@@ -827,10 +824,6 @@ bool AudioPolicyService::AudioCommandThread::threadLoop()
                break;
            }
        }
        // release delayed commands wake lock
        if (mAudioCommands.isEmpty()) {
            release_wake_lock(mName.string());
        }
        ALOGV("AudioCommandThread() going to sleep");
        mWaitWorkCV.waitRelative(mLock, waitTime);
        ALOGV("AudioCommandThread() waking up");
@@ -1009,10 +1002,6 @@ void AudioPolicyService::AudioCommandThread::insertCommand_l(AudioCommand *comma
    Vector <AudioCommand *> removedCommands;
    command->mTime = systemTime() + milliseconds(delayMs);

    // acquire wake lock to make sure delayed commands are processed
    if (mAudioCommands.isEmpty()) {
        acquire_wake_lock(PARTIAL_WAKE_LOCK, mName.string());
    }

    // check same pending commands with later time stamps and eliminate them
    for (i = mAudioCommands.size()-1; i >= 0; i--) {