Commit ec359a9f authored by Thoren Paulson's avatar Thoren Paulson Committed by Commit Bot

[Chromecast] Disable CMA backend on M and below.

The Android implementation of the CMA backend depends on APIs added in
Android N. This change uses the default Android AudioManager on earlier
versions.

Bug: internal b/117838318
Test: audio with GPMusic and Spotify, video with Hulu & GPMovies.
Change-Id: Ic59c37e103e098638c861efd8b350c29c028e64d
Reviewed-on: https://chromium-review.googlesource.com/c/1327226Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Commit-Queue: Thoren Paulson <thoren@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606605}
parent e2093705
......@@ -89,6 +89,7 @@
#endif // defined(OS_LINUX) || defined(OS_ANDROID)
#if defined(OS_ANDROID)
#include "base/android/build_info.h"
#include "components/cdm/browser/cdm_message_filter_android.h"
#include "components/crash/content/browser/child_exit_observer_android.h"
#include "media/mojo/services/android_mojo_media_client.h"
......@@ -257,6 +258,14 @@ CastContentBrowserClient::CreateAudioManager(
bool use_mixer = false;
#endif
#if defined(OS_ANDROID)
// Disable CMA backend on builds older than N.
if (base::android::BuildInfo::GetInstance()->sdk_int() <
base::android::SDK_VERSION_NOUGAT) {
return nullptr;
}
#endif
#if defined(USE_ALSA)
return std::make_unique<media::CastAudioManagerAlsa>(
std::make_unique<::media::AudioThreadImpl>(), audio_log_factory,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment