Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49bf60df authored by tim peng's avatar tim peng Committed by Android (Google) Code Review
Browse files

Merge "Not support group volume control" into sc-dev

parents b9624619 9aaa97d5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -259,6 +259,10 @@ public class MediaDeviceUpdateWorker extends SliceBackgroundWorker
        return mLocalMediaManager.shouldDisableMediaOutput(packageName);
    }

    boolean shouldEnableVolumeSeekBar(RoutingSessionInfo sessionInfo) {
        return mLocalMediaManager.shouldEnableVolumeSeekBar(sessionInfo);
    }

    private class DevicesChangedBroadcastReceiver extends BroadcastReceiver {
        @Override
        public void onReceive(Context context, Intent intent) {
+6 −0
Original line number Diff line number Diff line
@@ -126,6 +126,12 @@ public class RemoteMediaSlice implements CustomSliceable {
                        + maxVolume);
                continue;
            }
            if (!getWorker().shouldEnableVolumeSeekBar(info)) {
                // There is no disable state. We hide it directly.
                Log.d(TAG, "Unable to add Slice. " + info.getName() + ": This is a group session");
                continue;
            }

            final CharSequence appName = Utils.getApplicationLabel(
                    mContext, info.getClientPackageName());
            final CharSequence outputTitle = mContext.getString(R.string.media_output_label_title,
+1 −0
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@ public class RemoteVolumeGroupController extends BasePreferenceController implem
                seekBarPreference.setMin(0);
                seekBarPreference.setOnPreferenceChangeListener(this);
                seekBarPreference.setIcon(R.drawable.ic_volume_remote);
                seekBarPreference.setEnabled(mLocalMediaManager.shouldEnableVolumeSeekBar(info));
                mPreferenceCategory.addPreference(seekBarPreference);
            }