Skip to content

Commit

Permalink
Expand ducking conditions
Browse files Browse the repository at this point in the history
Update the IS_ANDROID_THINGS check to use the superset
IS_ANDROID_APPLIANCE, covering cases using other Android
platform builds.

Bug: b/156263192(internal)
Test: local build (device)
Change-Id: Ia750c8d31a98881e7efaa6e69b10f2f7a6ba0ab2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298342
Reviewed-by: Luke Halliwell (slow) <halliwell@chromium.org>
Commit-Queue: Brett Kilty <brettk@google.com>
Cr-Commit-Position: refs/heads/master@{#788502}
  • Loading branch information
Brett Kilty authored and Commit Bot committed Jul 15, 2020
1 parent b32f089 commit 864fb81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions chromecast/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ buildflag_header("chromecast_buildflags") {
"ENABLE_PLAYREADY=$enable_playready",
"ENABLE_VIDEO_CAPTURE_SERVICE=$enable_video_capture_service",
"ENABLE_VOLUME_TABLES_ACCESS=$enable_volume_tables_access",
"IS_ANDROID_APPLIANCE=$is_android_appliance",
"IS_ANDROID_THINGS=$is_android_things",
"IS_ANDROID_THINGS_NON_PUBLIC=$is_android_things_non_public",
"IS_CAST_AUDIO_ONLY=$is_cast_audio_only",
Expand Down
6 changes: 3 additions & 3 deletions chromecast/browser/cast_web_view_default.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ CastWebViewDefault::CastWebViewDefault(
web_contents_->GetNativeView()->SetName(params.activity_id);
#endif

#if BUILDFLAG(IS_ANDROID_THINGS)
// Configure the ducking multiplier for AThings speakers. We don't want the
// Chromium MediaSession to duck since we are doing our own ducking.
#if BUILDFLAG(IS_ANDROID_APPLIANCE)
// Configure the ducking multiplier for AThings-like speakers. We don't want
// the Chromium MediaSession to duck since we are doing our own ducking.
constexpr double kDuckingMultiplier = 1.0;
content::MediaSession::Get(web_contents_.get())
->SetDuckingVolumeMultiplier(kDuckingMultiplier);
Expand Down

0 comments on commit 864fb81

Please sign in to comment.