Loading res/values/bools.xml +21 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,27 @@ <!-- Whether high_power_apps should be shown or not. --> <bool name="config_show_high_power_apps">true</bool> <!-- Whether media_volume should be shown or not. --> <bool name="config_show_media_volume">true</bool> <!-- Whether alarm_volume should be shown or not. --> <bool name="config_show_alarm_volume">true</bool> <!-- Whether notification_volume should be shown or not. --> <bool name="config_show_notification_volume">true</bool> <!-- Whether notification_ringtone should be shown or not. --> <bool name="config_show_notification_ringtone">true</bool> <!-- Whether screen_locking_sounds should be shown or not. --> <bool name="config_show_screen_locking_sounds">true</bool> <!-- Whether charging_sounds should be shown or not. --> <bool name="config_show_charging_sounds">true</bool> <!-- Whether touch_sounds should be shown or not. --> <bool name="config_show_touch_sounds">true</bool> <!-- Whether device_administrators should be shown or not. --> <bool name="config_show_device_administrators">true</bool> Loading src/com/android/settings/notification/AlarmVolumePreferenceController.java +3 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.media.AudioManager; import com.android.internal.annotations.VisibleForTesting; import com.android.settings.notification.VolumeSeekBarPreference.Callback; import com.android.settings.R; import com.android.settingslib.core.lifecycle.Lifecycle; public class AlarmVolumePreferenceController extends Loading @@ -43,7 +44,8 @@ public class AlarmVolumePreferenceController extends @Override public boolean isAvailable() { return !mHelper.isSingleVolume(); return mContext.getResources().getBoolean(R.bool.config_show_alarm_volume) && !mHelper.isSingleVolume(); } @Override Loading src/com/android/settings/notification/ChargingSoundPreferenceController.java +5 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import static com.android.settings.notification.SettingPref.TYPE_GLOBAL; import android.content.Context; import android.provider.Settings.Global; import com.android.settings.R; import com.android.settings.SettingsPreferenceFragment; import com.android.settingslib.core.lifecycle.Lifecycle; Loading @@ -33,7 +34,10 @@ public class ChargingSoundPreferenceController extends SettingPrefController { super(context, parent, lifecycle); mPreference = new SettingPref( TYPE_GLOBAL, KEY_CHARGING_SOUNDS, Global.CHARGING_SOUNDS_ENABLED, DEFAULT_ON); } @Override public boolean isAvailable() { return mContext.getResources().getBoolean(R.bool.config_show_charging_sounds); } } src/com/android/settings/notification/MediaVolumePreferenceController.java +2 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.settings.notification; import android.content.Context; import android.media.AudioManager; import com.android.settings.notification.VolumeSeekBarPreference.Callback; import com.android.settings.R; import com.android.settingslib.core.lifecycle.Lifecycle; public class MediaVolumePreferenceController extends Loading @@ -32,7 +33,7 @@ public class MediaVolumePreferenceController extends @Override public boolean isAvailable() { return true; return mContext.getResources().getBoolean(R.bool.config_show_media_volume); } @Override Loading src/com/android/settings/notification/NotificationRingtonePreferenceController.java +7 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package com.android.settings.notification; import android.content.Context; import android.media.RingtoneManager; import com.android.settings.R; public class NotificationRingtonePreferenceController extends RingtonePreferenceControllerBase { private static final String KEY_NOTIFICATION_RINGTONE = "notification_ringtone"; Loading @@ -27,6 +29,11 @@ public class NotificationRingtonePreferenceController extends RingtonePreference super(context); } @Override public boolean isAvailable() { return mContext.getResources().getBoolean(R.bool.config_show_notification_ringtone); } @Override public String getPreferenceKey() { return KEY_NOTIFICATION_RINGTONE; Loading Loading
res/values/bools.xml +21 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,27 @@ <!-- Whether high_power_apps should be shown or not. --> <bool name="config_show_high_power_apps">true</bool> <!-- Whether media_volume should be shown or not. --> <bool name="config_show_media_volume">true</bool> <!-- Whether alarm_volume should be shown or not. --> <bool name="config_show_alarm_volume">true</bool> <!-- Whether notification_volume should be shown or not. --> <bool name="config_show_notification_volume">true</bool> <!-- Whether notification_ringtone should be shown or not. --> <bool name="config_show_notification_ringtone">true</bool> <!-- Whether screen_locking_sounds should be shown or not. --> <bool name="config_show_screen_locking_sounds">true</bool> <!-- Whether charging_sounds should be shown or not. --> <bool name="config_show_charging_sounds">true</bool> <!-- Whether touch_sounds should be shown or not. --> <bool name="config_show_touch_sounds">true</bool> <!-- Whether device_administrators should be shown or not. --> <bool name="config_show_device_administrators">true</bool> Loading
src/com/android/settings/notification/AlarmVolumePreferenceController.java +3 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.media.AudioManager; import com.android.internal.annotations.VisibleForTesting; import com.android.settings.notification.VolumeSeekBarPreference.Callback; import com.android.settings.R; import com.android.settingslib.core.lifecycle.Lifecycle; public class AlarmVolumePreferenceController extends Loading @@ -43,7 +44,8 @@ public class AlarmVolumePreferenceController extends @Override public boolean isAvailable() { return !mHelper.isSingleVolume(); return mContext.getResources().getBoolean(R.bool.config_show_alarm_volume) && !mHelper.isSingleVolume(); } @Override Loading
src/com/android/settings/notification/ChargingSoundPreferenceController.java +5 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import static com.android.settings.notification.SettingPref.TYPE_GLOBAL; import android.content.Context; import android.provider.Settings.Global; import com.android.settings.R; import com.android.settings.SettingsPreferenceFragment; import com.android.settingslib.core.lifecycle.Lifecycle; Loading @@ -33,7 +34,10 @@ public class ChargingSoundPreferenceController extends SettingPrefController { super(context, parent, lifecycle); mPreference = new SettingPref( TYPE_GLOBAL, KEY_CHARGING_SOUNDS, Global.CHARGING_SOUNDS_ENABLED, DEFAULT_ON); } @Override public boolean isAvailable() { return mContext.getResources().getBoolean(R.bool.config_show_charging_sounds); } }
src/com/android/settings/notification/MediaVolumePreferenceController.java +2 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.settings.notification; import android.content.Context; import android.media.AudioManager; import com.android.settings.notification.VolumeSeekBarPreference.Callback; import com.android.settings.R; import com.android.settingslib.core.lifecycle.Lifecycle; public class MediaVolumePreferenceController extends Loading @@ -32,7 +33,7 @@ public class MediaVolumePreferenceController extends @Override public boolean isAvailable() { return true; return mContext.getResources().getBoolean(R.bool.config_show_media_volume); } @Override Loading
src/com/android/settings/notification/NotificationRingtonePreferenceController.java +7 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ package com.android.settings.notification; import android.content.Context; import android.media.RingtoneManager; import com.android.settings.R; public class NotificationRingtonePreferenceController extends RingtonePreferenceControllerBase { private static final String KEY_NOTIFICATION_RINGTONE = "notification_ringtone"; Loading @@ -27,6 +29,11 @@ public class NotificationRingtonePreferenceController extends RingtonePreference super(context); } @Override public boolean isAvailable() { return mContext.getResources().getBoolean(R.bool.config_show_notification_ringtone); } @Override public String getPreferenceKey() { return KEY_NOTIFICATION_RINGTONE; Loading