Loading services/audiopolicy/common/managerdefinitions/src/SessionRoute.cpp +4 −6 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ #define LOG_TAG "APM::SessionRoute" #define LOG_TAG "APM_SessionRoute" //#define LOG_NDEBUG 0 #include "SessionRoute.h" Loading Loading @@ -122,19 +122,17 @@ void SessionRouteMap::addRoute(audio_session_t session, audio_devices_t SessionRouteMap::getActiveDeviceForStream(audio_stream_type_t streamType, const DeviceVector& availableDevices) { audio_devices_t device = AUDIO_DEVICE_NONE; for (size_t index = 0; index < size(); index++) { sp<SessionRoute> route = valueAt(index); if (streamType == route->mStreamType && route->isActiveOrChanged() && route->mDeviceDescriptor != 0) { device = route->mDeviceDescriptor->type(); audio_devices_t device = route->mDeviceDescriptor->type(); if (!availableDevices.getDevicesFromType(device).isEmpty()) { break; return device; } } } return device; return AUDIO_DEVICE_NONE; } } // namespace android Loading
services/audiopolicy/common/managerdefinitions/src/SessionRoute.cpp +4 −6 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ * limitations under the License. */ #define LOG_TAG "APM::SessionRoute" #define LOG_TAG "APM_SessionRoute" //#define LOG_NDEBUG 0 #include "SessionRoute.h" Loading Loading @@ -122,19 +122,17 @@ void SessionRouteMap::addRoute(audio_session_t session, audio_devices_t SessionRouteMap::getActiveDeviceForStream(audio_stream_type_t streamType, const DeviceVector& availableDevices) { audio_devices_t device = AUDIO_DEVICE_NONE; for (size_t index = 0; index < size(); index++) { sp<SessionRoute> route = valueAt(index); if (streamType == route->mStreamType && route->isActiveOrChanged() && route->mDeviceDescriptor != 0) { device = route->mDeviceDescriptor->type(); audio_devices_t device = route->mDeviceDescriptor->type(); if (!availableDevices.getDevicesFromType(device).isEmpty()) { break; return device; } } } return device; return AUDIO_DEVICE_NONE; } } // namespace android