Commit 43040964 authored by Chris Kuiper's avatar Chris Kuiper Committed by Commit Bot

Chromecast: Build breakage when building AThings w/o volume tables support

When the build flag enable_volume_tables_access is false the AThing speaker
build for CMA breaks. This adds the necessary #idefs.

Bug: internal b/77634874
Test: builds now
Change-Id: I8841c819c2ac5523c2953c6725c69b92bc328864
Reviewed-on: https://chromium-review.googlesource.com/998334Reviewed-by: default avatarKenneth MacKay <kmackay@chromium.org>
Commit-Queue: Chris Kuiper <ckuiper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548491}
parent ef77cd1e
......@@ -23,7 +23,9 @@
#include "chromecast/base/serializers.h"
#include "chromecast/chromecast_buildflags.h"
#include "jni/VolumeControl_jni.h"
#if BUILDFLAG(ENABLE_VOLUME_TABLES_ACCESS)
#include "jni/VolumeMap_jni.h"
#endif
namespace chromecast {
namespace media {
......@@ -166,8 +168,10 @@ void VolumeControlAndroid::InitializeOnThread() {
for (auto type : {AudioContentType::kMedia, AudioContentType::kAlarm,
AudioContentType::kCommunication}) {
#if BUILDFLAG(ENABLE_VOLUME_TABLES_ACCESS)
Java_VolumeMap_dumpVolumeTables(base::android::AttachCurrentThread(),
static_cast<int>(type));
#endif
volumes_[type] =
Java_VolumeControl_getVolume(base::android::AttachCurrentThread(),
j_volume_control_, static_cast<int>(type));
......
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