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

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

audio policy engine: fix improper error log in getDevicesForRoleAndStrategy

Add missing case for role DEVICE_ROLE_DISABLED
in getDevicesForRoleAndStrategy().
Although setting the role as DEVICE_ROLE_DISABLED is not
implemented we should not log an error when the getter is called.

Bug: 181269159
Bug: 184065221
Test: make, flash and boot.
Change-Id: I7283d1bcc13b2cbffdb5040e35b5804d2c2e66b4
parent c5a55dea
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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: