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

Commit 61d3ae19 authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat Committed by Gerrit - the friendly Code Review server
Browse files

policy_hal: Set the output devices in ascending order of outputs

 -volume related issues are seen with customer app while setting
  device forcefully
 -Set the output devices in ascending order of outputs to make
  the overridden setForceUse API's code inline with base function.

Change-Id: I375b557de105be295c7bc246fe3f8325f55ce859
parent bfe73608
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -458,7 +458,7 @@ void AudioPolicyManager::setForceUse(AudioSystem::force_use usage, AudioSystem::
    checkA2dpSuspend();
    checkOutputForAllStrategies();
    updateDevicesAndOutputs();
    for (int i = mOutputs.size() -1; i >= 0; i--) {
    for (int i = 0; i < mOutputs.size(); i++) {
        audio_io_handle_t output = mOutputs.keyAt(i);
        audio_devices_t newDevice = getNewDevice(output, true /*fromCache*/);
        setOutputDevice(output, newDevice, (newDevice != AUDIO_DEVICE_NONE));