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

Commit 9a1704df authored by Romain Hunault's avatar Romain Hunault 🚴🏻
Browse files

Merge remote-tracking branch 'origin/lineage-16.0' into v1-pie

parents 29ac6d7d 4c094844
Loading
Loading
Loading
Loading
+28 −0
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="32dp"
    android:height="32dp"
    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>
+3 −0
Original line number Diff line number Diff line
@@ -294,6 +294,9 @@
    <string name="increasing_ring_min_volume_title">Start volume</string>
    <string name="increasing_ring_ramp_up_time_title">Ramp-up time</string>

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

    <!-- Kill app long-press back -->
    <string name="kill_app_longpress_back">Kill app back button</string>
    <string name="kill_app_longpress_back_summary">Kill the foreground app by long-pressing the back button</string>
+10 −2
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@
    <!-- Ring volume -->
    <com.android.settings.notification.VolumeSeekBarPreference
        android:key="ring_volume"
        android:icon="@drawable/ic_notifications"
        android:icon="@drawable/ic_audio_ring"
        android:title="@string/ring_volume_option_title"
        android:order="-160"
        settings:controller="com.android.settings.notification.RingVolumePreferenceController"/>
@@ -79,11 +79,19 @@
        android:order="-140"
        settings:controller="com.android.settings.notification.NotificationVolumePreferenceController"/>

    <!-- 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"
        android:title="@string/increasing_ring_volume_option_title"
        android:order="-138"
        android:order="-137"
        settings:controller="com.android.settings.notification.IncreasingRingPreferenceController" />

    <!-- Increasing ring volume -->
+33 −0
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;
    }
}
+15 −2
Original line number Diff line number Diff line
@@ -35,8 +35,7 @@ public class NotificationVolumePreferenceController extends
    @Override
    public int getAvailabilityStatus() {
        return mContext.getResources().getBoolean(R.bool.config_show_notification_volume)
                && !Utils.isVoiceCapable(mContext) && !mHelper.isSingleVolume()
                ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
                && !mHelper.isSingleVolume() ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
    }

    @Override
@@ -59,4 +58,18 @@ public class NotificationVolumePreferenceController extends
        return R.drawable.ic_notifications_off_24dp;
    }

    @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