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

Commit 94f80acd authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge changes I7283d1bc,If30792c5 into sc-dev

* changes:
  audio policy engine: fix improper error log in getDevicesForRoleAndStrategy
  audio policy: remove unnecessary error log
parents 67719769 c1cb663b
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ engineConfig::ParsingResult EngineBase::loadAudioPolicyEngineConfig()

    auto result = engineConfig::parse();
    if (result.parsedConfig == nullptr) {
        ALOGW("%s: No configuration found, using default matching phone experience.", __FUNCTION__);
        ALOGD("%s: No configuration found, using default matching phone experience.", __FUNCTION__);
        engineConfig::Config config = gDefaultEngineConfig;
        android::status_t ret = engineConfig::parseLegacyVolumes(config.volumeGroups);
        result = {std::make_unique<engineConfig::Config>(config),
@@ -356,7 +356,7 @@ status_t EngineBase::setDevicesRoleForStrategy(product_strategy_t strategy, devi
        mProductStrategyPreferredDevices[strategy] = devices;
        break;
    case DEVICE_ROLE_DISABLED:
        // TODO: support set devices role as disabled for strategy.
        // TODO (b/184065221): support set devices role as disabled for strategy.
        ALOGI("%s no implemented for role as %d", __func__, role);
        break;
    case DEVICE_ROLE_NONE:
@@ -384,7 +384,7 @@ status_t EngineBase::removeDevicesRoleForStrategy(product_strategy_t strategy, d
        }
        break;
    case DEVICE_ROLE_DISABLED:
        // TODO: support remove devices role as disabled for strategy.
        // TODO (b/184065221): support remove devices role as disabled for strategy.
        ALOGI("%s no implemented for role as %d", __func__, role);
        break;
    case DEVICE_ROLE_NONE:
@@ -417,6 +417,10 @@ status_t EngineBase::getDevicesForRoleAndStrategy(product_strategy_t strategy, d

        devices = devIt->second;
    } break;
    case DEVICE_ROLE_DISABLED:
        // TODO (b/184065221): support devices role as disabled for strategy.
        ALOGV("%s no implemented for role as %d", __func__, role);
        break;
    case DEVICE_ROLE_NONE:
        // Intentionally fall-through as the DEVICE_ROLE_NONE is never set
    default:
+5 −1
Original line number Diff line number Diff line
@@ -643,7 +643,11 @@ ParsingResult parse(const char* path) {
    xmlDocPtr doc;
    doc = xmlParseFile(path);
    if (doc == NULL) {
        ALOGE("%s: Could not parse document %s", __FUNCTION__, path);
        // It is OK not to find an engine config file at the default location
        // as the caller will default to hardcoded default config
        if (strncmp(path, DEFAULT_PATH, strlen(DEFAULT_PATH))) {
            ALOGW("%s: Could not parse document %s", __FUNCTION__, path);
        }
        return {nullptr, 0};
    }
    xmlNodePtr cur = xmlDocGetRootElement(doc);