diff options
author | Oliver Woodman <olly@google.com> | 2021-11-11 00:02:44 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-12-25 00:33:00 +0000 |
commit | 139028c104620d98fb0cda980f664471265e90f7 (patch) | |
tree | 9970b4dba83c8c1c7b8e6926d283b81b2064fdc6 | |
parent | 3abc112e103fa2f5c68011492d23e5c99b57e2e7 (diff) | |
download | base-139028c104620d98fb0cda980f664471265e90f7.tar.gz |
Plumb config to output switcher indication chip
Bug: 197586676
Bug: 202500642
Test: manual
Merged-In: I71d7f11b9d88dfb9ef74814e9ac7f9d28b0e652c
Change-Id: I71d7f11b9d88dfb9ef74814e9ac7f9d28b0e652c
(cherry picked from commit 92013ed958dbc7e666ced0c4b0337f03ff9381c8)
Merged-In:I71d7f11b9d88dfb9ef74814e9ac7f9d28b0e652c
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java index b2def7a8596a..802e5ebaf1c7 100644 --- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java +++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java @@ -75,6 +75,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback { private final ActivityStarter mActivityStarter; private final List<MediaDevice> mGroupMediaDevices = new CopyOnWriteArrayList<>(); private final boolean mAboveStatusbar; + private final boolean mVolumeAdjustmentForRemoteGroupSessions; private final NotificationEntryManager mNotificationEntryManager; @VisibleForTesting final List<MediaDevice> mMediaDevices = new CopyOnWriteArrayList<>(); @@ -104,6 +105,8 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback { mLocalMediaManager = new LocalMediaManager(mContext, lbm, imm, packageName); mMetricLogger = new MediaOutputMetricLogger(mContext, mPackageName); mUiEventLogger = uiEventLogger; + mVolumeAdjustmentForRemoteGroupSessions = mContext.getResources().getBoolean( + com.android.internal.R.bool.config_volumeAdjustmentForRemoteGroupSessions); } void start(@NonNull Callback cb) { @@ -466,7 +469,9 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback { } boolean isVolumeControlEnabled(@NonNull MediaDevice device) { - return !isActiveRemoteDevice(device); + // TODO(b/202500642): Also enable volume control for remote non-group sessions. + return !isActiveRemoteDevice(device) + || mVolumeAdjustmentForRemoteGroupSessions; } private final MediaController.Callback mCb = new MediaController.Callback() { |