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

Unverified Commit 396c09eb authored by Michael Bestas's avatar Michael Bestas
Browse files

Revert "Settings: Add switch for linked ring and media notification volumes"

Conflicts with QPR2 implementation.

This reverts commit f89ae86a.

Change-Id: I9870e199a0ebeefb935e9b43960cfbfb2fdfae14
parent d4f599fb
Loading
Loading
Loading
Loading

res/drawable/ic_audio_ring.xml

deleted100644 → 0
+0 −28
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2016 The CyanogenMod Project
     Copyright (C) 2018 The LineageOS Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24"
    android:tint="?android:attr/colorControlNormal">

    <path
        android:fillColor="@android:color/black"
        android:pathData="M10,21H14A2,2 0 0,1 12,23A2,2 0 0,1 10,21M21,19V20H3V19L5,17V11C5,7.9 7.03,5.17 10,4.29C10,4.19 10,4.1 10,4A2,2 0 0,1 12,2A2,2 0 0,1 14,4C14,4.1 14,4.19 14,4.29C16.97,5.17 19,7.9 19,11V17L21,19M17,11A5,5 0 0,0 12,6A5,5 0 0,0 7,11V18H17V11M19.75,3.19L18.33,4.61C20.04,6.3 21,8.6 21,11H23C23,8.07 21.84,5.25 19.75,3.19M1,11H3C3,8.6 3.96,6.3 5.67,4.61L4.25,3.19C2.16,5.25 1,8.07 1,11Z" />
</vector>
+0 −3
Original line number Diff line number Diff line
@@ -169,9 +169,6 @@
    <string name="touchscreen_hovering_title">Touchscreen hovering</string>
    <string name="touchscreen_hovering_summary">Allows you to hover the screen like a mouse in web browsers, remote desktops, etc</string>

    <!-- Volume link notification -->
    <string name="volume_link_notification_title">Link ring &amp; notification volumes</string>

    <!-- Wake on plug -->
    <string name="wake_when_plugged_or_unplugged_title">Wake on plug</string>
    <string name="wake_when_plugged_or_unplugged_summary">Turn the screen on when connecting or disconnecting a power source</string>
+1 −9
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@
    <!-- Ring volume -->
    <com.android.settings.notification.VolumeSeekBarPreference
        android:key="ring_volume"
        android:icon="@drawable/ic_audio_ring"
        android:icon="@drawable/ic_notifications"
        android:title="@string/ring_volume_option_title"
        android:order="-160"
        settings:controller="com.android.settings.notification.RingVolumePreferenceController"/>
@@ -89,14 +89,6 @@
        android:order="-140"
        settings:controller="com.android.settings.notification.AlarmVolumePreferenceController"/>

    <!-- Link ringtone and notification volumes -->
    <lineageos.preference.SecureSettingSwitchPreference
        android:key="volume_link_notification"
        android:title="@string/volume_link_notification_title"
        android:defaultValue="true"
        android:order="-138"
        settings:controller="com.android.settings.notification.LinkedVolumesPreferenceController"/>

    <!-- Increasing ring -->
    <lineageos.preference.LineageSystemSettingSwitchPreference
        android:key="increasing_ring"
+0 −33
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 The LineageOS Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.settings.notification;

import android.content.Context;

import com.android.settings.Utils;
import com.android.settings.core.BasePreferenceController;

public class LinkedVolumesPreferenceController extends BasePreferenceController {
    public LinkedVolumesPreferenceController(Context context, String key) {
        super(context, key);
    }

    @Override
    public int getAvailabilityStatus() {
        return Utils.isVoiceCapable(mContext) ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
    }
}
+1 −15
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ public class NotificationVolumePreferenceController extends VolumeSeekBarPrefere
        // Show separate notification slider if ring/notification are not aliased by AudioManager --
        // if they are, notification volume is controlled by RingVolumePreferenceController.
        return mContext.getResources().getBoolean(R.bool.config_show_notification_volume)
                && !mRingNotificationAliased
                && (!mRingNotificationAliased || !Utils.isVoiceCapable(mContext))
                && !mHelper.isSingleVolume()
                ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
    }
@@ -273,18 +273,4 @@ public class NotificationVolumePreferenceController extends VolumeSeekBarPrefere
        }
    }

    @Override
    protected void updatePreferenceIcon() {
        if (mPreference != null) {
            if (mRingerMode == AudioManager.RINGER_MODE_VIBRATE) {
                mMuteIcon = R.drawable.ic_volume_ringer_vibrate;
                mPreference.showIcon(R.drawable.ic_volume_ringer_vibrate);
            } else if (mRingerMode == AudioManager.RINGER_MODE_SILENT) {
                mMuteIcon = R.drawable.ic_notifications_off_24dp;
                mPreference.showIcon(R.drawable.ic_notifications_off_24dp);
            } else {
                mPreference.showIcon(R.drawable.ic_notifications);
            }
        }
    }
}
Loading