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

Commit e6232cf6 authored by Dan Pasanen's avatar Dan Pasanen Committed by Bruno Martins
Browse files

VolumePanel: fix showing notification volume slider when unlinked

* volume_link_notification lives in Settings.Secure not LineageSettings.Secure
* Set max panel slices to 6. We could have up to 5 volumes to control and
  MEDIA_OUTPUT_INDICATOR_SLICE_URI counts as one slice as well.

Change-Id: I0a4c7db1c92e778fba669931259cd52164b1df65
parent da972a8d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ public class PanelSlicesAdapter
     * Maximum number of slices allowed on the panel view.
     */
    @VisibleForTesting
    static final int MAX_NUM_OF_SLICES = 5;
    static final int MAX_NUM_OF_SLICES = 6;

    private final List<LiveData<Slice>> mSliceLiveData;
    private final int mMetricsCategory;
+2 −4
Original line number Diff line number Diff line
@@ -34,8 +34,6 @@ import com.android.settings.R;
import com.android.settings.Utils;
import com.android.settings.notification.RemoteVolumePreferenceController;

import lineageos.providers.LineageSettings;

import java.util.ArrayList;
import java.util.List;

@@ -66,8 +64,8 @@ public class VolumePanel implements PanelContent {
        uris.add(MEDIA_OUTPUT_INDICATOR_SLICE_URI);
        uris.add(VOLUME_CALL_URI);
        uris.add(VOLUME_RINGER_URI);
        if (Utils.isVoiceCapable(mContext) && LineageSettings.Secure.getInt(
                mContext.getContentResolver(), "volume_link_notification", 1) == 0) {
        if (Utils.isVoiceCapable(mContext) && Settings.Secure.getInt(
                mContext.getContentResolver(), Settings.Secure.VOLUME_LINK_NOTIFICATION, 1) == 0) {
            uris.add(VOLUME_NOTIFICATION_URI);
        }
        uris.add(VOLUME_ALARM_URI);