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

Commit a0559fa4 authored by Ramjee Singh's avatar Ramjee Singh
Browse files

Revert "Revert "policy_hal: Function prototype correction for custom policy"."

This reverts commit c0739232.

Change-Id: Ibff06e037d428094b031d27b338318405471bf5a
parent c0739232
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -927,11 +927,12 @@ void AudioPolicyManagerCustom::setForceUse(audio_policy_force_use_t usage,

}

status_t AudioPolicyManagerCustom::stopSource(sp<SwAudioOutputDescriptor> outputDesc,
status_t AudioPolicyManagerCustom::stopSource(sp<AudioOutputDescriptor> outputDesc1,
                                            audio_stream_type_t stream,
                                            bool forceDeviceUpdate)
{
    // always handle stream stop, check which stream type is stopping
    sp<SwAudioOutputDescriptor> outputDesc = (sp<SwAudioOutputDescriptor>) outputDesc1;
    handleEventForBeacon(stream == AUDIO_STREAM_TTS ? STOPPING_BEACON : STOPPING_OUTPUT);

    // handle special case for sonification while in call
@@ -983,13 +984,14 @@ status_t AudioPolicyManagerCustom::stopSource(sp<SwAudioOutputDescriptor> output
        return INVALID_OPERATION;
    }
}
status_t AudioPolicyManagerCustom::startSource(sp<SwAudioOutputDescriptor> outputDesc,
status_t AudioPolicyManagerCustom::startSource(sp<AudioOutputDescriptor> outputDesc1,
                                             audio_stream_type_t stream,
                                             audio_devices_t device,
                                             uint32_t *delayMs)
{
    // cannot start playback of STREAM_TTS if any other output is being used
    uint32_t beaconMuteLatency = 0;
    sp<SwAudioOutputDescriptor> outputDesc = (sp<SwAudioOutputDescriptor>) outputDesc1;

    *delayMs = 0;
    if (stream == AUDIO_STREAM_TTS) {
+2 −2
Original line number Diff line number Diff line
@@ -99,11 +99,11 @@ protected:

        // if argument "device" is different from AUDIO_DEVICE_NONE,  startSource() will force
        // the re-evaluation of the output device.
        status_t startSource(sp<SwAudioOutputDescriptor> outputDesc,
        status_t startSource(sp<AudioOutputDescriptor> outputDesc,
                             audio_stream_type_t stream,
                             audio_devices_t device,
                             uint32_t *delayMs);
         status_t stopSource(sp<SwAudioOutputDescriptor> outputDesc,
        status_t stopSource(sp<AudioOutputDescriptor> outputDesc,
                            audio_stream_type_t stream,
                            bool forceDeviceUpdate);
        // event is one of STARTING_OUTPUT, STARTING_BEACON, STOPPING_OUTPUT, STOPPING_BEACON   313