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

Commit d976693d authored by Eric Laurent's avatar Eric Laurent
Browse files

audio policy: remove useless warning

Remove warning in Engine::getDevicesForStrategyInt() if the
strategy passed is a system internal strategy (not a legacy strategy).

Test: make, flash and boot.
Change-Id: I258f39ebd50f86abe55df72bdd5bf4a5ad0d29a7
parent a524c363
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -452,22 +452,26 @@ DeviceVector Engine::getDevicesForStrategyInt(legacy_strategy strategy,
        devices = availableOutputDevices.getDevicesFromType(AUDIO_DEVICE_OUT_TELEPHONY_TX);
        break;

    case STRATEGY_NONE:
        // Happens when internal strategies are processed ("rerouting", "patch"...)
        break;

    default:
        ALOGW("getDevicesForStrategy() unknown strategy: %d", strategy);
        ALOGW("%s unknown strategy: %d", __func__, strategy);
        break;
    }

    if (devices.isEmpty()) {
        ALOGV("getDevicesForStrategy() no device found for strategy %d", strategy);
        ALOGV("%s no device found for strategy %d", __func__, strategy);
        sp<DeviceDescriptor> defaultOutputDevice = getApmObserver()->getDefaultOutputDevice();
        if (defaultOutputDevice != nullptr) {
            devices.add(defaultOutputDevice);
        }
        ALOGE_IF(devices.isEmpty(),
                 "getDevicesForStrategy() no default device defined");
                 "%s no default device defined", __func__);
    }

    ALOGVV("getDevices ForStrategy() strategy %d, device %s",
    ALOGVV("%s strategy %d, device %s", __func__,
           strategy, dumpDeviceTypes(devices.types()).c_str());
    return devices;
}