Cherish:Pulse initial checkin for Android 12 [2/2]

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
Pranav Vashi
2020-12-27 17:29:21 +05:30
committed by Hưng Phan
parent c54c2eb6c2
commit 238a7f000f
7 changed files with 526 additions and 1 deletions

View File

@@ -467,6 +467,29 @@
<item>@string/qs_tile_animation_duration_quite_fast</item>
<item>@string/qs_tile_animation_duration_super_fast</item>
</string-array>
<!-- Pulse music visualizer -->
<string-array name="pulse_render_mode_entries">
<item>@string/pulse_render_mode_fading_bars</item>
<item>@string/pulse_render_mode_solid_lines</item>
</string-array>
<string-array name="pulse_render_mode_values" translatable="false">
<item>0</item>
<item>1</item>
</string-array>
<string-array name="pulse_color_mode_entries">
<item>@string/pulse_color_accent</item>
<item>@string/pulse_color_custom</item>
<item>@string/pulse_color_lava_lamp</item>
</string-array>
<string-array name="pulse_color_mode_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="qs_tile_animation_duration_values" translatable="false">
<item>2500</item>

View File

@@ -546,7 +546,7 @@
<!-- Fingerprint Ripple Effect -->
<string name="enable_fingerprint_ripple_effect_title">Ripple effect</string>
<string name="enable_fingerprint_ripple_effect_summary">Show ripple effect on unlock with fingerprint</string>
<!-- Privacy Indicator -->
<string name="mic_camera_privacy_indicator_title">Mic and camera privacy indicator</string>
<string name="mic_camera_privacy_indicator_summary">Show indicator when any app uses mic or camera</string>
@@ -743,4 +743,36 @@
<string name="smart_charging_reset_stats_title">Reset battery statistics</string>
<string name="smart_charging_reset_stats_summary">Reset battery statistics after reaching user defined charging level</string>
<string name="smart_charging_footer">Smart Charging allows you to set maximum charging level to extend the lifespan of your battery. When enabled, battery stops charging at Stop trigger level and resumes charging at Start trigger level. Stop trigger level should be always greater than Start trigger level.</string>
<!-- Pulse music visualizer -->
<string name="pulse_help_policy_notice_title">About Pulse</string>
<string name="pulse_help_policy_notice_summary">Pulse is a brilliant audio graphic equalizer when music plays on the device</string>
<string name="pulse_settings">Pulse</string>
<string name="pulse_settings_summary">Audio graphic equalizer for navigation bar and lockscreen</string>
<string name="show_navbar_pulse_title">Navbar Pulse</string>
<string name="show_navbar_pulse_summary">Audio graphic equalizer on the navigation bar</string>
<string name="show_lockscreen_pulse_title">Lockscreen Pulse</string>
<string name="show_lockscreen_pulse_summary">Audio graphic equalizer on the lockscreen</string>
<string name="show_ambient_pulse_title">Ambient Pulse</string>
<string name="show_ambient_pulse_summary">Audio graphic equalizer on the ambient screen</string>
<string name="pulse_render_mode_title">Render mode</string>
<string name="pulse_render_mode_fading_bars">Fading blocks</string>
<string name="pulse_render_mode_solid_lines">Solid lines</string>
<string name="pulse_legacy_mode_advanced_category">Fading blocks mode settings</string>
<string name="pulse_custom_fudge_factor">Sanity level</string>
<string name="pulse_lavalamp_speed_title">Lava lamp speed</string>
<string name="pulse_solid_units_count">Solid lines count</string>
<string name="pulse_solid_units_opacity">Solid lines opacity</string>
<string name="pulse_solid_dimen_category">Solid lines mode settings</string>
<string name="pulse_color_mode_title">Color</string>
<string name="pulse_color_accent">Accent</string>
<string name="pulse_color_custom">Custom</string>
<string name="pulse_color_lava_lamp">Lava lamp</string>
<string name="pulse_color_user_title">Choose color</string>
<string name="pulse_smoothing_enabled_title">Turn on smoothing</string>
<string name="pulse_smoothing_enabled_summary">Each bar is animated more smoothly</string>
<string name="pulse_custom_dimen">Bar width</string>
<string name="pulse_custom_div">Bar spacing</string>
<string name="pulse_filled_block_size">Block size</string>
<string name="pulse_empty_block_size">Block spacing</string>
</resources>

View File

@@ -96,6 +96,13 @@
android:entryValues="@array/lockscreen_albumart_filter_values"
android:dependency="lockscreen_media_metadata"
android:defaultValue="0" />
<!-- Pulse music visualizer -->
<Preference
android:key="pulse_settings"
android:title="@string/pulse_settings"
android:summary="@string/pulse_settings_summary"
android:fragment="com.cherish.settings.fragments.sound.PulseSettings" />
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
android:key="ls_media_filter_blur_radius"

156
res/xml/pulse_settings.xml Normal file
View File

@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020-22 The CherishOS 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.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
android:title="@string/pulse_settings" >
<SwitchPreference
android:key="navbar_pulse_enabled"
android:title="@string/show_navbar_pulse_title"
android:summary="@string/show_navbar_pulse_summary"/>
<SwitchPreference
android:key="lockscreen_pulse_enabled"
android:title="@string/show_lockscreen_pulse_title"
android:summary="@string/show_lockscreen_pulse_summary"/>
<SwitchPreference
android:key="ambient_pulse_enabled"
android:title="@string/show_ambient_pulse_title"
android:summary="@string/show_ambient_pulse_summary"/>
<com.cherish.settings.preferences.SecureSettingListPreference
android:key="pulse_render_style"
android:title="@string/pulse_render_mode_title"
android:entries="@array/pulse_render_mode_entries"
android:entryValues="@array/pulse_render_mode_values"
android:defaultValue="1"/>
<com.cherish.settings.preferences.SecureSettingSwitchPreference
android:key="pulse_smoothing_enabled"
android:title="@string/pulse_smoothing_enabled_title"
android:summary="@string/pulse_smoothing_enabled_summary"
android:defaultValue="false"/>
<com.cherish.settings.preferences.SecureSettingListPreference
android:key="pulse_color_mode"
android:title="@string/pulse_color_mode_title"
android:entries="@array/pulse_color_mode_entries"
android:entryValues="@array/pulse_color_mode_values"
android:defaultValue="2"/>
<net.margaritov.preference.colorpicker.SecureSettingColorPickerPreference
android:key="pulse_color_user"
android:title="@string/pulse_color_user_title"
android:defaultValue="0x92FFFFFF"/>
<com.cherish.settings.preferences.SecureSettingSeekBarPreference
android:key="pulse_lavalamp_speed"
android:title="@string/pulse_lavalamp_speed_title"
android:defaultValue="10000"
android:max="30000"
settings:min="200"
settings:interval="200"
settings:units="@string/unit_milliseconds"/>
<PreferenceCategory
android:key="pulse_fading_bars_category"
android:title="@string/pulse_legacy_mode_advanced_category">
<com.cherish.settings.preferences.SecureSettingSeekBarPreference
android:key="pulse_custom_dimen"
android:title="@string/pulse_custom_dimen"
android:defaultValue="14"
android:max="30"
settings:min="1"
settings:units="@string/unit_pixels"
android:dependency="pulse_fading_bars_category"/>
<com.cherish.settings.preferences.SecureSettingSeekBarPreference
android:key="pulse_custom_div"
android:title="@string/pulse_custom_div"
android:defaultValue="16"
android:max="44"
settings:min="2"
settings:interval="2"
settings:units="@string/unit_pixels"
android:dependency="pulse_fading_bars_category"/>
<com.cherish.settings.preferences.SecureSettingSeekBarPreference
android:key="pulse_filled_block_size"
android:title="@string/pulse_filled_block_size"
android:defaultValue="4"
android:max="8"
settings:min="4"
settings:units="@string/unit_pixels"
android:dependency="pulse_fading_bars_category"/>
<com.cherish.settings.preferences.SecureSettingSeekBarPreference
android:key="pulse_empty_block_size"
android:title="@string/pulse_empty_block_size"
android:defaultValue="1"
android:max="4"
settings:min="0"
settings:units="@string/unit_pixels"
android:dependency="pulse_fading_bars_category"/>
<com.cherish.settings.preferences.SecureSettingSeekBarPreference
android:key="pulse_custom_fudge_factor"
android:title="@string/pulse_custom_fudge_factor"
android:defaultValue="4"
android:max="6"
settings:min="2"
android:dependency="pulse_fading_bars_category"/>
</PreferenceCategory>
<PreferenceCategory
android:key="pulse_2"
android:title="@string/pulse_solid_dimen_category">
<com.cherish.settings.preferences.SecureSettingSeekBarPreference
android:key="pulse_solid_units_opacity"
android:title="@string/pulse_solid_units_opacity"
android:defaultValue="200"
android:max="255"
settings:min="0"
android:dependency="pulse_2"/>
<com.cherish.settings.preferences.SecureSettingSeekBarPreference
android:key="pulse_solid_units_count"
android:title="@string/pulse_solid_units_count"
android:defaultValue="32"
android:max="128"
settings:min="16"
settings:interval="16"
android:dependency="pulse_2"/>
<com.cherish.settings.preferences.SecureSettingSeekBarPreference
android:key="pulse_solid_fudge_factor"
android:title="@string/pulse_custom_fudge_factor"
android:defaultValue="4"
android:max="6"
settings:min="2"
android:dependency="pulse_2"/>
</PreferenceCategory>
<com.android.settingslib.widget.FooterPreference
android:key="pulse_settings_footer"
android:selectable="false"
settings:searchable="false" />
</PreferenceScreen>