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-26 15:02:14 +0000 |
commit | 57358e94146f7cd1dea30c4e0900b30b136ac9dc (patch) | |
tree | 959a7b919b4fd7ffe773fad30c2255eb45ffe463 | |
parent | 03847f2f844c304c151e7e25499ae1ab4b85926f (diff) | |
download | base-57358e94146f7cd1dea30c4e0900b30b136ac9dc.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() { |