Compare commits
100 Commits
tiramisu-f
...
tiramisu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afc3274f46 | ||
|
|
47d8740bd5 | ||
|
|
e0f2441316 | ||
|
|
c811849ab5 | ||
|
|
70da7a554e | ||
|
|
50fa51cd17 | ||
|
|
c53f9af382 | ||
|
|
458ef94a1d | ||
|
|
0b3a6a1cb0 | ||
|
|
dd524f9294 | ||
|
|
cac222a0b0 | ||
|
|
44fe9b8f7e | ||
|
|
02edf931db | ||
|
|
bc3be39190 | ||
|
|
714b2e0abb | ||
|
|
565d76f073 | ||
|
|
6e068591f5 | ||
|
|
db8a7a8f95 | ||
|
|
e4fb9690ab | ||
|
|
1dd2eadb59 | ||
|
|
81b0828ac6 | ||
|
|
9bc0946d11 | ||
|
|
ff99a44c1f | ||
|
|
078794059e | ||
|
|
9cad4320b3 | ||
|
|
a57d28d4a0 | ||
|
|
ee5ae1eb2f | ||
|
|
a5aef65c5c | ||
|
|
64d52be566 | ||
|
|
a9c3b0f225 | ||
|
|
3bc5948600 | ||
|
|
5883d3b4f3 | ||
|
|
96cd9aa1b7 | ||
|
|
f9ae3f982a | ||
|
|
f42b60958c | ||
|
|
7e8fba711e | ||
|
|
4a48135fa1 | ||
|
|
fd2bc76555 | ||
|
|
9e0db71d0c | ||
|
|
7b8678eb13 | ||
|
|
f868b3df49 | ||
|
|
cdb4dbd267 | ||
|
|
c9bb0bb72d | ||
|
|
6f4829bbc0 | ||
|
|
d2889d108b | ||
|
|
0b00bfbb9f | ||
|
|
4cdf3ebdfd | ||
|
|
dc7f7b2ee5 | ||
|
|
fdb58046f4 | ||
|
|
d18df38636 | ||
|
|
f2443f5eb3 | ||
|
|
8c9b2b2332 | ||
|
|
f5a35bbf31 | ||
|
|
469a6573bd | ||
|
|
9bf590b8cb | ||
|
|
686384593a | ||
|
|
d585c862fe | ||
|
|
77c2ee8c48 | ||
|
|
eb4dc21e49 | ||
|
|
816dc32004 | ||
|
|
0bb076c36a | ||
|
|
48d035e6c8 | ||
|
|
e4b5b5cc00 | ||
|
|
8f80cc77e8 | ||
|
|
5df14a0546 | ||
|
|
057344a855 | ||
|
|
ded28bde05 | ||
|
|
f78ac10568 | ||
|
|
fe80d5f19a | ||
|
|
287a6d9b01 | ||
|
|
94ae0f8021 | ||
|
|
70d5bb6c71 | ||
|
|
2e141ae231 | ||
|
|
f2dc67526c | ||
|
|
7e9ea36502 | ||
|
|
a410b4c687 | ||
|
|
da941652b3 | ||
|
|
fc7a0c985e | ||
|
|
54db7593c1 | ||
|
|
5d558e3fa6 | ||
|
|
be914d42f7 | ||
|
|
fdc7d141b2 | ||
|
|
947f09d0fd | ||
|
|
2e6379af48 | ||
|
|
36d726583e | ||
|
|
fb7620418e | ||
|
|
80b3130cf7 | ||
|
|
fe954cf9e4 | ||
|
|
38ea21a9bb | ||
|
|
d24ab995b4 | ||
|
|
326d16b46c | ||
|
|
1e6d42be5d | ||
|
|
11b60a3164 | ||
|
|
fb3d2e57b3 | ||
|
|
9fb7d1d563 | ||
|
|
26276a9b3d | ||
|
|
4abec14f98 | ||
|
|
b996e3c204 | ||
|
|
8637958601 | ||
|
|
2557431b1c |
9
res/drawable/color_picker_preview_background.xml
Normal file
9
res/drawable/color_picker_preview_background.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2022
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<corners android:radius="@*android:dimen/config_dialogCornerRadius" />
|
||||
</shape>
|
||||
5
res/drawable/color_picker_seekbar_background.xml
Normal file
5
res/drawable/color_picker_seekbar_background.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="@*android:dimen/config_dialogCornerRadius" />
|
||||
<gradient android:type="linear" />
|
||||
</shape>
|
||||
10
res/drawable/color_picker_seekbar_thumb.xml
Normal file
10
res/drawable/color_picker_seekbar_thumb.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="#FFFFFF">
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="?android:attr/colorAccent" />
|
||||
<size android:width="20dp" android:height="20dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
||||
@@ -25,11 +25,11 @@
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:layout_marginVertical="4dp"
|
||||
android:scaleType="centerInside"
|
||||
settings:layout_constraintStart_toStartOf="parent"
|
||||
settings:layout_constraintTop_toTopOf="parent" />
|
||||
settings:layout_constraintTop_toTopOf="parent"
|
||||
settings:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/label"
|
||||
@@ -38,23 +38,26 @@
|
||||
android:layout_marginStart="@dimen/default_margin"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:maxLines="1"
|
||||
settings:layout_constraintStart_toEndOf="@id/icon"
|
||||
settings:layout_constraintEnd_toStartOf="@id/checkBox"
|
||||
settings:layout_constraintTop_toTopOf="@id/icon" />
|
||||
settings:layout_constraintEnd_toStartOf="@id/check_box"
|
||||
settings:layout_constraintTop_toTopOf="@id/icon"
|
||||
settings:layout_constraintBottom_toTopOf="@id/package_name" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/packageName"
|
||||
android:id="@+id/package_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:maxLines="2"
|
||||
settings:layout_constraintStart_toStartOf="@id/label"
|
||||
settings:layout_constraintEnd_toEndOf="@id/label"
|
||||
settings:layout_constraintTop_toBottomOf="@id/label"
|
||||
settings:layout_constraintBottom_toBottomOf="@id/icon" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBox"
|
||||
android:id="@+id/check_box"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:focusable="false"
|
||||
|
||||
135
res/layout/color_picker_layout.xml
Normal file
135
res/layout/color_picker_layout.xml
Normal file
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2022 FlamingoOS 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.
|
||||
-->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/default_padding"
|
||||
android:paddingBottom="@dimen/default_padding">
|
||||
|
||||
<View
|
||||
android:id="@+id/color_preview"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/color_picker_preview_height"
|
||||
android:layout_marginStart="@dimen/default_margin"
|
||||
android:layout_marginEnd="@dimen/default_margin"
|
||||
android:background="@drawable/color_picker_preview_background"
|
||||
settings:layout_constraintEnd_toEndOf="parent"
|
||||
settings:layout_constraintStart_toStartOf="parent"
|
||||
settings:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/color_input"
|
||||
style="@style/ColorPickerEditTextStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
settings:layout_constraintStart_toStartOf="@id/color_preview"
|
||||
settings:layout_constraintTop_toTopOf="@id/color_preview"
|
||||
settings:layout_constraintEnd_toEndOf="@id/color_preview"
|
||||
settings:layout_constraintBottom_toBottomOf="@id/color_preview" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekBar1"
|
||||
style="@style/ColorPickerSeekBarStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
settings:layout_constraintBottom_toTopOf="@id/seekBar2"
|
||||
settings:layout_constraintEnd_toEndOf="parent"
|
||||
settings:layout_constraintStart_toStartOf="parent"
|
||||
settings:layout_constraintTop_toBottomOf="@id/color_preview" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekBar2"
|
||||
style="@style/ColorPickerSeekBarStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
settings:layout_constraintBottom_toTopOf="@id/seekBar3"
|
||||
settings:layout_constraintEnd_toEndOf="parent"
|
||||
settings:layout_constraintStart_toStartOf="parent"
|
||||
settings:layout_constraintTop_toBottomOf="@id/seekBar1" />
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/seekBar3"
|
||||
style="@style/ColorPickerSeekBarStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/default_margin"
|
||||
settings:layout_constraintBottom_toTopOf="@id/barrier"
|
||||
settings:layout_constraintEnd_toEndOf="parent"
|
||||
settings:layout_constraintStart_toStartOf="parent"
|
||||
settings:layout_constraintTop_toBottomOf="@id/seekBar2" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/color_model_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/default_margin"
|
||||
android:orientation="horizontal"
|
||||
settings:layout_constraintBottom_toBottomOf="@id/confirm_button"
|
||||
settings:layout_constraintStart_toStartOf="parent"
|
||||
settings:layout_constraintTop_toTopOf="@id/confirm_button">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rgb_button"
|
||||
style="@style/ColorPickerRadioButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:text="@string/rgb" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/hsl_button"
|
||||
style="@style/ColorPickerRadioButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/hsl" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/hsv_button"
|
||||
style="@style/ColorPickerRadioButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/hsv" />
|
||||
</RadioGroup>
|
||||
|
||||
<Button
|
||||
android:id="@+id/cancel_button"
|
||||
style="@style/ColorPickerButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:text="@string/cancel"
|
||||
settings:layout_constraintBottom_toBottomOf="@id/confirm_button"
|
||||
settings:layout_constraintEnd_toStartOf="@id/confirm_button"
|
||||
settings:layout_constraintTop_toTopOf="@id/confirm_button" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/confirm_button"
|
||||
style="@style/ColorPickerButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/default_margin"
|
||||
android:text="@string/confirm"
|
||||
settings:layout_constraintBottom_toBottomOf="parent"
|
||||
settings:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
settings:barrierDirection="top"
|
||||
settings:constraint_referenced_ids="color_model_group, confirm_button" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
50
res/layout/lock_clock_fonts_option.xml
Normal file
50
res/layout/lock_clock_fonts_option.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2019 The Android Open Source 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.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="7dp"
|
||||
android:layout_gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/option_tile"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingVertical="10dp"
|
||||
android:background="@drawable/option_border_custom">
|
||||
|
||||
<TextClock android:id="@+id/option_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:format12Hour="hh:mm"
|
||||
android:format24Hour="kk:mm"
|
||||
android:textAppearance="@style/OptionTitleTextAppearance"/>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/option_label"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:textAppearance="@style/OptionTitleTextAppearance"/>
|
||||
</LinearLayout>
|
||||
20
res/layout/qs_tile_apply_change_button.xml
Normal file
20
res/layout/qs_tile_apply_change_button.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="right"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/apply_change"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="20dp"
|
||||
android:enabled="false"
|
||||
android:text="@string/qs_apply_change_button_title"
|
||||
android:textAllCaps="false"
|
||||
style="@style/ActionPrimaryButton" />
|
||||
|
||||
</LinearLayout>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
20
res/values-night/styles.xml
Normal file
20
res/values-night/styles.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 The Android Open Source 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.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<style name="ColorPickerStyle" parent="Theme.MaterialComponents.BottomSheetDialog">
|
||||
<item name="colorPrimary">@*android:color/primary_device_default_dark</item>
|
||||
<item name="colorPrimaryDark">@*android:color/surface_highlight_light</item>
|
||||
<item name="colorAccent">@*android:color/accent_device_default_dark</item>
|
||||
</style>
|
||||
</resources>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
794
res/values-sk-rSK/cherish_strings.xml
Normal file
794
res/values-sk-rSK/cherish_strings.xml
Normal file
@@ -0,0 +1,794 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2019 CherishOS
|
||||
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.
|
||||
-->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- App Title -->
|
||||
<string name="cherish_settings_title">Cherish Settings</string>
|
||||
<!-- Categories -->
|
||||
<string name="button_title">Buttons</string>
|
||||
<string name="button_summary">Hardware keys, Navigation bar</string>
|
||||
<string name="gestures_title">Gestures</string>
|
||||
<string name="gestures_summary">Jump to camera, swipe to screenshot</string>
|
||||
<string name="lockscreen_title">Lock screen</string>
|
||||
<string name="lockscreen_summary">Music visualizer, charging animation, clock style</string>
|
||||
<string name="misc_title">Miscellaneous</string>
|
||||
<string name="misc_summary">Gaming mode, volume controls</string>
|
||||
<string name="animations_title">Animations</string>
|
||||
<string name="animations_summary">System animations</string>
|
||||
<string name="powermenu_title">Power menu</string>
|
||||
<string name="powermenu_summary">Advanced restart, power menu opacity</string>
|
||||
<string name="theme_title">Themes</string>
|
||||
<string name="theme_summary">System theme, rounded, switch theme</string>
|
||||
<string name="quicksettings_title">Quick Settings</string>
|
||||
<string name="quicksettings_summary">Tile layout, blur</string>
|
||||
<string name="recents_title">Recents apps</string>
|
||||
<string name="recents_summary">Slim recents</string>
|
||||
<string name="statusbar_title">Status bar</string>
|
||||
<string name="statusbar_summary">Clock, carrier, status icons</string>
|
||||
<string name="volume_title">Volume rockers</string>
|
||||
<string name="volume_summary">Volume rockers</string>
|
||||
<string name="notifications_title">Notifications</string>
|
||||
<string name="notifications_summary">Battery light, notifications header</string>
|
||||
<string name="about_summary">Learn more about CherishOS</string>
|
||||
<string name="device_part_title">Device features</string>
|
||||
<string name="qs_category">QS category</string>
|
||||
<string name="navbar_title">Navigation bar</string>
|
||||
<string name="volume_keys_title">Volume keys</string>
|
||||
<string name="udfps_category">UDFPS</string>
|
||||
<!-- General strings -->
|
||||
<string name="ok">OK</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="save">Save</string>
|
||||
<string name="none_string">None</string>
|
||||
<string name="default_string">Default</string>
|
||||
<string name="disabled">Disabled</string>
|
||||
<!-- Color Picker -->
|
||||
<string name="dialog_color_picker">Color Picker</string>
|
||||
<string name="press_color_to_apply">Press on color below to apply</string>
|
||||
<string name="arrow_right">→</string>
|
||||
<string name="arrow_down">↓</string>
|
||||
<string name="hex">Hex:</string>
|
||||
<string name="hex_hint">#ff000000</string>
|
||||
<string name="set">Set</string>
|
||||
<string name="color_default">Default</string>
|
||||
<string name="led_color_green">Green</string>
|
||||
<string name="led_color_red">Red</string>
|
||||
<!-- Custom seekbar -->
|
||||
<string name="custom_seekbar_value">Value: <xliff:g id="v">%s</xliff:g></string>
|
||||
<string name="custom_seekbar_default_value">Default</string>
|
||||
<string name="custom_seekbar_default_value_to_set">Default value: <xliff:g id="v">%s</xliff:g>\nLong press to set</string>
|
||||
<string name="custom_seekbar_default_value_is_set">Default value is set</string>
|
||||
<string name="add_package_to_title">Add application</string>
|
||||
<string name="profile_choose_app">Choose app</string>
|
||||
<string name="dialog_delete_title">Delete</string>
|
||||
<string name="dialog_delete_message">Remove selected item?</string>
|
||||
<!-- Units -->
|
||||
<string name="unit_milliseconds">milliseconds</string>
|
||||
<string name="unit_seconds">seconds</string>
|
||||
<!-- QS settings -->
|
||||
<string name="qs_title">Quick settings</string>
|
||||
<!-- Lock screen visualizer -->
|
||||
<string name="visualizer_title">Display music visualizer</string>
|
||||
<!-- Power menu and dialogs opacity -->
|
||||
<!-- AOKP custom system animations -->
|
||||
<!-- Power menu Animations -->
|
||||
<string name="power_menu_animation">Power menu</string>
|
||||
<!-- Color picker -->
|
||||
<string name="rgb">RGB</string>
|
||||
<string name="hsl">HSL</string>
|
||||
<string name="hsv">HSV</string>
|
||||
<string name="confirm">Confirm</string>
|
||||
<string name="invalid_color">Invalid color!</string>
|
||||
<!-- QS header image -->
|
||||
<!-- Lockscreen -->
|
||||
<string name="lockscreen_category">Lockscreen</string>
|
||||
<!-- Themes -->
|
||||
<string name="theme_type_title">System theme</string>
|
||||
<string name="theme_type_summary">Select theme</string>
|
||||
<!--Accenter -->
|
||||
<string name="themes_hub_title">Themes</string>
|
||||
<string name="themes_hub_summary">Accents-Gradients-Themes</string>
|
||||
<string name="rgb_accent_picker_title_dark">Accent Picker</string>
|
||||
<string name="rgb_accent_picker_summary">Choose the accent color yourself</string>
|
||||
<string name="theme_option_reset_title">Reset Theme Options</string>
|
||||
<string name="theme_option_reset_message">Are you sure you want to reset themes-accent to default?</string>
|
||||
<!--ThemePicker-->
|
||||
<string name="theme_select_title">Styles and Wallpapers</string>
|
||||
<string name="theme_select_summary">Browse and select installed themes</string>
|
||||
<string name="notification_light_settings">Notifications light</string>
|
||||
<string name="search">Search</string>
|
||||
<string name="search_apps">Search apps</string>
|
||||
<!-- Themeing -->
|
||||
<string name="dark_ui_mode_summary">Browse the dark theme options</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Developer Settings: Title of the settings category for theme overlays. -->
|
||||
<string name="theme_customization_category">Theming</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Developer Settings: Title of the setting which enables overlays to customize the adaptive icon shape (e.g. launcher and quick settings icons). -->
|
||||
<string name="theme_customization_icon_shape_title">Icon shape</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Developer Settings: Title of the setting which enables overlays to customize accent color. -->
|
||||
<string name="theme_customization_icon_shape_summary">Set system icon shape style</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Developer Settings: Title of the setting which enables overlays to customize headline and body fonts. -->
|
||||
<string name="theme_customization_font_title">Headline / Body font</string>
|
||||
<string name="theme_customization_font_summary">Set system font style</string>
|
||||
<!-- [CHAR_LIMIT=NONE] Developer Settings: Title of the setting which enables overlays to customize the system wide icon pack. -->
|
||||
<string name="theme_customization_icon_pack_title">Icon pack</string>
|
||||
<string name="theme_customization_icon_pack_summary">Set custom icon pack style</string>
|
||||
<string name="theme_customization_signal_icon_title">Signal icon style</string>
|
||||
<string name="theme_customization_signal_icon_summary">Set custom signal icon style</string>
|
||||
<string name="theme_customization_wifi_icon_title">WiFi icon style</string>
|
||||
<string name="theme_customization_wifi_icon_summary">Set custom wifi icon style</string>
|
||||
<!-- Fonts -->
|
||||
<string name="theme_customization_lock_clock_title">Lockscreen clock font</string>
|
||||
<string name="theme_customization_lock_clock_summary">Set LS clock font style</string>
|
||||
<!-- Custom Signal bar icons -->
|
||||
<string name="custom_signal_bar_title">Signal</string>
|
||||
<!-- Custom Wi-Fi bar icons -->
|
||||
<string name="custom_wifi_bar_title">Wi-Fi</string>
|
||||
<!-- Battery light -->
|
||||
<string name="battery_light_settings">Battery charging light</string>
|
||||
<string name="battery_light_enable">Enable</string>
|
||||
<string name="battery_full_light_enabled">Battery light when full charged</string>
|
||||
<string name="battery_light_allow_on_dnd_title">Battery light in Do Not Disturb mode</string>
|
||||
<string name="battery_light_low_blinking_title">Blinking light on low battery</string>
|
||||
<string name="battery_light_cat">Battery light color when charging</string>
|
||||
<string name="battery_light_low_color">Low battery</string>
|
||||
<string name="battery_light_medium_color">Medium battery</string>
|
||||
<string name="battery_light_full_color">Almost full battery</string>
|
||||
<string name="battery_light_reallyfull_color">Full (100) battery</string>
|
||||
<string name="status_bar_quick_qs_pulldown">Quick QS pulldown</string>
|
||||
<string name="quick_pulldown_none">Disabled</string>
|
||||
<string name="quick_pulldown_right">Pulldown status bar from right side</string>
|
||||
<string name="quick_pulldown_left">Pulldown status bar from left side</string>
|
||||
<string name="quick_pulldown_always">Always show quick settings on status bar pull down</string>
|
||||
<!-- Statusbar double tap to sleep -->
|
||||
<string name="double_tap_to_sleep_title">Status bar double tap to sleep</string>
|
||||
<string name="double_tap_to_sleep_summary">Double tap on the status bar to put the device to sleep</string>
|
||||
<!-- Lockscreen double tap to sleep -->
|
||||
<string name="lockscreen_gesture_title">Gestures</string>
|
||||
<string name="double_tap_sleep_lockscreen_title">Lockscreen double tap to sleep</string>
|
||||
<string name="double_tap_sleep_lockscreen_summary">Double tap anywhere on the lockscreen to put the device to sleep</string>
|
||||
<string name="notification_sound_vib_screen_on_title">Noisy notifications if screen on</string>
|
||||
<string name="notification_sound_vib_screen_on_summary">Disable to block notifications sound and vibration when the screen is awake</string>
|
||||
<!-- Heads up options -->
|
||||
<string name="notifications_category_title">Annoying notifications protection</string>
|
||||
<string name="less_boring_heads_up_title">Make heads up less annoying</string>
|
||||
<string name="less_boring_heads_up_summary">Show heads up only for dialer or messaging app if they are not in foreground</string>
|
||||
<!-- Incall vibrate options -->
|
||||
<string name="incall_vibration_category">In-call vibration options</string>
|
||||
<string name="incall_vibrate_connect_title">Vibrate on connect</string>
|
||||
<string name="incall_vibrate_call_wait_title">Vibrate on call waiting</string>
|
||||
<string name="incall_vibrate_disconnect_title">Vibrate on disconnect</string>
|
||||
<!-- Launch music player when headset is connected -->
|
||||
<string name="headset_connect_player_title">Launch music app on headset connection</string>
|
||||
<string name="headset_connect_player_summary">Launch the default music app when headset is connected</string>
|
||||
<!-- Network traffic -->
|
||||
<string name="network_traffic_title">Network traffic indicator</string>
|
||||
<string name="network_traffic_summary">Enable or disable network speed indicator in status bar</string>
|
||||
<string name="network_traffic_master_switch_title">Use Network Traffic Indicator</string>
|
||||
<string name="network_options_title">Options</string>
|
||||
<string name="network_traffic_autohide_title">Hide network traffic indicator if inactive</string>
|
||||
<string name="network_traffic_autohide_summary">Hide when network traffic indicator is below 1 KB/s</string>
|
||||
<!-- NavBar Inverse -->
|
||||
<string name="navigation_bar_inverse_title">Invert 3 button navigation bar</string>
|
||||
<string name="status_bar_icons_category_title">Icons</string>
|
||||
<!-- Status bar - icon blocklist -->
|
||||
<string name="status_bar_icons_title">Status bar icons</string>
|
||||
<string name="status_bar_icons_summary">Choose which status bar icons can be shown</string>
|
||||
<!-- Data disabled icon -->
|
||||
<string name="data_disabled_icon_title">Show data disabled icon</string>
|
||||
<string name="data_disabled_icon_summary">Display the cross sign next to signal bar when data is disabled</string>
|
||||
<!-- Show old style mobile data icon -->
|
||||
<string name="use_old_mobiletype_title">Use old style mobile data icons</string>
|
||||
<string name="use_old_mobiletype_summary">Show mobile type icon on top of the signal indicator</string>
|
||||
<!-- Show LTE/4G switch -->
|
||||
<string name="show_fourg_icon_title">Show 4G instead of LTE</string>
|
||||
<string name="show_fourg_icon_summary">Replace LTE indicator with 4G</string>
|
||||
<!-- Roaming indicator icon -->
|
||||
<string name="roaming_indicator_icon_title">Roaming indicator</string>
|
||||
<string name="roaming_indicator_icon_summary">Display roaming indicator when in roaming mode</string>
|
||||
<!-- Lock screen media artwork -->
|
||||
<string name="lockscreen_media_art_options_title">Lock screen media art</string>
|
||||
<!-- Media art -->
|
||||
<string name="media_art_title">Media cover art</string>
|
||||
<string name="media_art_summary">Display media cover art when available</string>
|
||||
<!-- Lock screen album art filter -->
|
||||
<string name="lockscreen_albumart_filter_title">Media cover art filter</string>
|
||||
<string name="lockscreen_albumart_filter_grayscale">Grayscale</string>
|
||||
<string name="lockscreen_albumart_filter_tint">Accent tinted</string>
|
||||
<string name="lockscreen_albumart_filter_blur">Blur</string>
|
||||
<string name="lockscreen_albumart_filter_grayblur">Grayscale and blurred</string>
|
||||
<string name="lockscreen_albumart_filter_blur_radius_title">Blur amount for lockscreen media artwork</string>
|
||||
<!-- Statusbar Battery -->
|
||||
<string name="battery_style_title">Battery icon style</string>
|
||||
<string name="battery_style_summary">Customize battery icons, hide or show percentage</string>
|
||||
<string name="battery_style_category_title">Battery icon</string>
|
||||
<string name="status_bar_battery_category_title">In Status Bar</string>
|
||||
<string name="status_bar_battery_percent_title">Battery percentage</string>
|
||||
<string name="status_bar_battery_style_title">Battery style</string>
|
||||
<string name="status_bar_battery_style_icon_portrait">Icon portrait (default)</string>
|
||||
<string name="status_bar_battery_style_icon_rlandscape">Icon landscape (Right)</string>
|
||||
<string name="status_bar_battery_style_icon_landscape">Icon landscape (Left)</string>
|
||||
<string name="status_bar_battery_style_icon_rlandscape_style_a">Landscape R Style A</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_style_a">Landscape L Style A</string>
|
||||
<string name="status_bar_battery_style_icon_rlandscape_style_b">Landscape R Style B</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_style_b">Landscape L Style B</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_pill">Portrait Mx</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_line">Landscape Lorn</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_musku">Portrait IOS</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_signal">Landscape Airoo</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_buddy">Landscape Capsule</string>
|
||||
<string name="status_bar_battery_style_circle">Circle</string>
|
||||
<string name="status_bar_battery_style_dotted_circle">Circle (Dotted)</string>
|
||||
<string name="status_bar_battery_style_filled_circle">Circle (Filled)</string>
|
||||
<string name="status_bar_battery_style_big_circle">Big circle</string>
|
||||
<string name="status_bar_battery_style_big_dotted_circle">Big dotted circle</string>
|
||||
<string name="status_bar_battery_style_text">Text</string>
|
||||
<string name="status_bar_battery_style_hidden">Hidden</string>
|
||||
<string name="status_bar_battery_percentage_default">Hidden (default)</string>
|
||||
<string name="status_bar_battery_percentage_text_inside">Inside the icon</string>
|
||||
<string name="status_bar_battery_percent_text_next_right">Next to the icon (right)</string>
|
||||
<string name="status_bar_battery_percent_text_next_left">Next to the icon (left)</string>
|
||||
<string name="status_bar_battery_text_charging_title">Battery percentage when charging</string>
|
||||
<string name="status_bar_battery_text_charging_summary">Always display battery percentage when charging</string>
|
||||
<!-- QS battery -->
|
||||
<string name="qs_battery_category_title">In QS Panel</string>
|
||||
<string name="qs_use_status_bar_battery_style">Follow status bar style</string>
|
||||
<!-- Statusbar Clock background chip -->
|
||||
<string name="statusbar_clock_chip_title">Background chip</string>
|
||||
<string name="statusbar_clock_chip_summary">Display accented chip behind clock</string>
|
||||
<!-- Quick Settings brightness slider -->
|
||||
<string name="qs_show_brightness_slider_title">Brightness slider</string>
|
||||
<string name="qs_show_brightness_slider_never">Never show</string>
|
||||
<string name="qs_show_brightness_slider_expanded">Show when expanded</string>
|
||||
<string name="qs_show_brightness_slider_always">Show always</string>
|
||||
<string name="qs_show_brightness_slider_not_expanded">Show when not expanded</string>
|
||||
<string name="qs_brightness_slider_position_title">Position</string>
|
||||
<string name="qs_brightness_slider_position_top">Top</string>
|
||||
<string name="qs_brightness_slider_position_bottom">Bottom</string>
|
||||
<!-- Quick Settings brightness icon -->
|
||||
<string name="qs_show_auto_brightness_title">Auto brightness icon</string>
|
||||
<string name="qs_show_auto_brightness_summary">Show toggle for adaptive brightness near the slider</string>
|
||||
<!-- Laboratory - Ignore window secure -->
|
||||
<string name="laboratory_ignore_window_secure_title">Ignore window secure flags</string>
|
||||
<string name="laboratory_ignore_window_secure_summary">This removes the screenshots and screenrecords limits for all applications. Normally, special applications are replaced with black areas in records. This can be convenient in some cases but may lead to privacy leaks. After changing this toggle, you may need to restart applications for the change to take effect.</string>
|
||||
<!-- Lockscreen battery info -->
|
||||
<string name="lockscreen_charging_info_title">Show charging info in lockscreen</string>
|
||||
<string name="lockscreen_charging_info_summary">Shows temperature, charging current and more while plugged in</string>
|
||||
<!-- QS Transparency -->
|
||||
<string name="qs_transparency_title">Background transparency</string>
|
||||
<string name="qs_transparency_summary">Set transparency level for QS background</string>
|
||||
<!-- Brightness control -->
|
||||
<string name="status_bar_brightness_control_title">Brightness control</string>
|
||||
<string name="status_bar_brightness_control_summary">Adjust brightness by sliding across the status bar</string>
|
||||
<!-- Power menu on lockscreen -->
|
||||
<string name="power_menu_hide_on_secure_title">Hide power menu on lock screen</string>
|
||||
<string name="power_menu_hide_on_secure_summary">This will hide the power menu only on a secure lock screen</string>
|
||||
<!-- Hide Status bar on lock screen -->
|
||||
<string name="hide_lockscreen_status_bar_title">Hide status bar</string>
|
||||
<string name="hide_lockscreen_status_bar_summary">Touch status bar to toggle visibility</string>
|
||||
<!-- Navigation bar -->
|
||||
<string name="navigation_bar_category">Navigation bar</string>
|
||||
<string name="navigation_bar_title">On-screen navigation bar</string>
|
||||
<string name="navigation_bar_summary">Enable on-screen navigation keys</string>
|
||||
<string name="navigation_bar_arrow_keys_title">Show arrow keys while typing</string>
|
||||
<string name="navigation_bar_arrow_keys_summary">Display left and right cursor buttons in navigation bar while typing</string>
|
||||
<string name="navigation_bar_compact_layout_title">Compact layout</string>
|
||||
<string name="navigation_bar_compact_layout_summary">Use a compact layout in the navigation bar</string>
|
||||
<string name="system_navigation_summary">Choose which system navigation style to use</string>
|
||||
<!-- Volume rocker wake -->
|
||||
<string name="volume_rocker_wake_title">Volume rocker wake</string>
|
||||
<string name="volume_rocker_wake_summary">Pressing the volume keys will wake your device</string>
|
||||
<string name="volume_category">Volume rocker</string>
|
||||
<!-- Volume Steps Fragment -->
|
||||
<string name="volume_steps_fragment_title">Volume steps</string>
|
||||
<string name="volume_steps_summary">Customize volume steps</string>
|
||||
<string name="volume_steps_alarm_title">Volume steps: Alarm</string>
|
||||
<string name="volume_steps_dtmf_title">Volume steps: DTMF</string>
|
||||
<string name="volume_steps_music_title">Volume steps: Media</string>
|
||||
<string name="volume_steps_notification_title">Volume steps: Notification</string>
|
||||
<string name="volume_steps_ring_title">Volume steps: Ringer</string>
|
||||
<string name="volume_steps_system_title">Volume steps: System</string>
|
||||
<string name="volume_steps_voice_call_title">Volume steps: Voice Call</string>
|
||||
<string name="volume_steps_reset">Reset</string>
|
||||
<!-- Buttons - Enable navbar -->
|
||||
<string name="disable_navkeys_title">Enable on-screen nav bar</string>
|
||||
<string name="disable_navkeys_summary">Enable on-screen navigation bar and disable hardware buttons</string>
|
||||
<!-- Buttons - Swap capacitive keys -->
|
||||
<string name="swap_capacitive_keys_title">Swap capacitive buttons</string>
|
||||
<string name="swap_capacitive_keys_summary">Swap the order of recents and back buttons</string>
|
||||
<!-- HW keys -->
|
||||
<string name="hardware_keys_title">Buttons</string>
|
||||
<string name="hardware_keys_category">Hardware navigation buttons</string>
|
||||
<string name="hardware_keys_disable_title">Disable hardware buttons</string>
|
||||
<string name="hardware_keys_disable_summary">Use the device hardware keys for navigation</string>
|
||||
<string name="hardware_keys_volume_keys_title">Volume rocker</string>
|
||||
<!-- Hardware button navigation -->
|
||||
<string name="picker_activities">Activities</string>
|
||||
<string name="select_custom_app_title">Select custom app</string>
|
||||
<string name="select_custom_activity_title">Select custom activity</string>
|
||||
<string name="profile_applist_title">Applications</string>
|
||||
<string name="choose_action_title">Choose action</string>
|
||||
<string name="action_entry_default_action">Default settings</string>
|
||||
<string name="action_entry_select_app">Select application</string>
|
||||
<string name="action_entry_custom_action">Select custom action</string>
|
||||
<string name="hardware_keys_home_key_title">Home button</string>
|
||||
<string name="hardware_keys_back_key_title">Back button</string>
|
||||
<string name="hardware_keys_menu_key_title">Menu button</string>
|
||||
<string name="hardware_keys_assist_key_title">Search button</string>
|
||||
<string name="hardware_keys_appswitch_key_title">Recents button</string>
|
||||
<string name="hardware_keys_camera_key_title">Camera button</string>
|
||||
<string name="hardware_keys_short_press_title">Short press action</string>
|
||||
<string name="hardware_keys_double_tap_summary">Set double tap action</string>
|
||||
<string name="hardware_keys_single_tap_summary">Set single tap action</string>
|
||||
<string name="hardware_keys_long_press_summary">Set long press action</string>
|
||||
<string name="hardware_keys_single_tap_title">Single tap action</string>
|
||||
<string name="hardware_keys_long_press_title">Long press action</string>
|
||||
<string name="hardware_keys_double_tap_title">Double tap action</string>
|
||||
<string name="hardware_keys_action_nothing">No action</string>
|
||||
<string name="hardware_keys_action_menu">Open/close menu</string>
|
||||
<string name="hardware_keys_action_app_switch">Recent apps switcher</string>
|
||||
<string name="hardware_keys_action_search">Search assistant</string>
|
||||
<string name="hardware_keys_action_voice_search">Voice search</string>
|
||||
<string name="hardware_keys_action_in_app_search">In-app search</string>
|
||||
<string name="hardware_keys_action_launch_camera">Launch camera</string>
|
||||
<string name="hardware_keys_action_sleep">Turn screen off</string>
|
||||
<string name="hardware_keys_action_split_screen">Split screen</string>
|
||||
<string name="hardware_keys_action_close_app">Kill app</string>
|
||||
<string name="hardware_keys_action_torch">Flashlight</string>
|
||||
<string name="hardware_keys_action_screenshot">Screenshot</string>
|
||||
<string name="hardware_keys_action_volume_panel">Toggle volume panel</string>
|
||||
<string name="hardware_keys_action_clear_all_notifications">Clear all notifications</string>
|
||||
<string name="hardware_keys_action_notifications_panel">Toggle notifications panel</string>
|
||||
<string name="hardware_keys_action_toggle_qs_panel">Toggle QS panel</string>
|
||||
<string name="hardware_keys_action_ringer_modes">Ringer modes</string>
|
||||
<string name="hardware_keys_swipe_right_key_title">Swipe right</string>
|
||||
<string name="hardware_keys_swipe_left_key_title">Swipe left</string>
|
||||
<string name="hardware_keys_long_tap_key_title">Long tap</string>
|
||||
<string name="hardware_keys_swipe_tap_title">Swipe action</string>
|
||||
<string name="hardware_keys_long_tap_title">Long tap action</string>
|
||||
<string name="button_wake_title">Wake device</string>
|
||||
<string name="button_wake_summary">Wake device by pressing the button</string>
|
||||
<string name="camera_sleep_on_release_title">Screen peek</string>
|
||||
<string name="camera_sleep_on_release_summary">A half press will keep the screen on only while the button is held down</string>
|
||||
<string name="camera_launch_title">Launch camera</string>
|
||||
<string name="camera_launch_summary">A longpress and release will launch camera</string>
|
||||
<string name="cursor_section_header">Cursor</string>
|
||||
<string name="volume_key_cursor_control_title">Keyboard cursor control</string>
|
||||
<string name="volume_key_cursor_control_off">Disabled</string>
|
||||
<string name="volume_key_cursor_control_on">Volume Up/Down - Cursor Left/Right</string>
|
||||
<string name="volume_key_cursor_control_on_reverse">Volume Up/Down - Cursor Right/Left</string>
|
||||
<string name="swap_volume_buttons_title">Reorient</string>
|
||||
<string name="swap_volume_buttons_summary">Swap volume buttons when the screen is rotated</string>
|
||||
<string name="volume_panel_on_left_title">Show volume panel on left</string>
|
||||
<string name="volume_panel_on_left_summary">Display volume panel on the left side of the screen</string>
|
||||
<!-- Alert Slider Notifications (OnePlus devices) -->
|
||||
<string name="alert_slider_notifications_title">Alert slider notifications</string>
|
||||
<string name="alert_slider_notifications_summary">Display notification when changing alert slider position</string>
|
||||
<!-- Power Menu -->
|
||||
<string name="power_menu_title">Power menu</string>
|
||||
<string name="power_menu_title_summary">View or change power menu entries</string>
|
||||
<string name="powermenu_screenshot">Screenshot</string>
|
||||
<string name="powermenu_power">Power</string>
|
||||
<string name="powermenu_advanced">Advanced reboot options</string>
|
||||
<string name="powermenu_restart">Restart</string>
|
||||
<string name="powermenu_airplane">Airplane</string>
|
||||
<string name="powermenu_settings">Settings</string>
|
||||
<string name="powermenu_lockdown">Lock Down</string>
|
||||
<string name="powermenu_soundpanel">Sound Panel</string>
|
||||
<string name="powermenu_users">Users</string>
|
||||
<string name="powermenu_logout">Logout</string>
|
||||
<string name="powermenu_emergency">Emergency</string>
|
||||
<!-- Unlock FPS for specific games -->
|
||||
<string name="use_games_spoof_title">Unlock higher FPS in games</string>
|
||||
<string name="use_games_spoof_summary">Spoof your device as a different model for specific games to unlock higher FPS</string>
|
||||
<!-- Unlimited google photos storage -->
|
||||
<string name="use_photos_spoof_title">Unlimited Photos storage</string>
|
||||
<string name="use_photos_spoof_summary">Spoof your device as Pixel XL for Google Photos app only to provide unlimited storage for backup</string>
|
||||
<!-- Notification guts kill app button -->
|
||||
<string name="notification_guts_kill_app_button_title">Force stop button</string>
|
||||
<string name="notification_guts_kill_app_button_summary">Show force stop button in the notification\'s longpress menu</string>
|
||||
<!-- Toast app icon -->
|
||||
<string name="toast_icon_title">Toast app icon</string>
|
||||
<string name="toast_icon_summary">Display the app\'s icon corresponding with the toast</string>
|
||||
<!-- Custom settings dashboard style -->
|
||||
<string name="settings_dashboard_style_title">Settings layout</string>
|
||||
<string name="settings_dashboard_style_aosp">Aosp</string>
|
||||
<string name="settings_dashboard_style_oos11">OxygenOS 11</string>
|
||||
<string name="settings_dashboard_style_oos12">OxygenOS 12</string>
|
||||
<string name="settings_dashboard_style_cherish">Cherish</string>
|
||||
<string name="settings_dashboard_style_cherish_clean">Cherish Clean</string>
|
||||
<string name="settings_layout_category_title">Settings UI interface</string>
|
||||
<string name="settings_base_style_title">Settings Base layout</string>
|
||||
<string name="settings_base_style_summary">Use an alternative layout for setting menus</string>
|
||||
<string name="settings_home_style_title">Settings Home layout</string>
|
||||
<string name="settings_home_style_summary">Use stock aosp layout for homepage</string>
|
||||
<string name="disable_usercard_title">Settings UserCard</string>
|
||||
<string name="disable_usercard_summary">Toggle in order not to show the usercard on main settings page</string>
|
||||
<!-- UDFPS Haptic Feedback -->
|
||||
<string name="udfps_haptic_feedback_title">UDFPS haptic feedback</string>
|
||||
<string name="udfps_haptic_feedback_summary">Vibrate when touching UDFPS icon</string>
|
||||
<!-- Udfps authentication / error vibration -->
|
||||
<string name="udfps_success_vib_title">Udfps authentication vibration</string>
|
||||
<string name="udfps_success_vib_summary">Vibrate on successful fingerprint authentication</string>
|
||||
<string name="udfps_error_vib_title">Udfps error vibration</string>
|
||||
<string name="udfps_error_vib_summary">Vibrate on unsuccessful fingerprint authentication</string>
|
||||
<!-- UDFPS Recog Animation -->
|
||||
<string name="udfps_customization">UDFPS customization</string>
|
||||
<string name="udfps_recog_animation">UDFPS animation</string>
|
||||
<string name="udfps_recog_animation_summary">Shows an animation while reading your finger</string>
|
||||
<string name="udfps_recog_animation_effect_title">UDFPS custom animation</string>
|
||||
<string name="udfps_recog_animation_effect_summary">Choose animation effect</string>
|
||||
<string name="udfps_settings_title">UDFPS settings</string>
|
||||
<string name="udfps_settings_summary">Settings for customizing the UDFPS</string>
|
||||
<!-- UDFPS icon picker -->
|
||||
<string name="udfps_icon_picker_title">UDFPS icon picker</string>
|
||||
<string name="udfps_icon_picker_summary">Choose your favorite fingerprint icon</string>
|
||||
<!-- Custom FOD Icon -->
|
||||
<string name="custom_fp_icon_title">Custom UDFPS Icon</string>
|
||||
<string name="custom_fp_icon_summary">Enable custom UDFPS Icon from files</string>
|
||||
<string name="custom_fp_select_title">Select Custom UDFPS Icon</string>
|
||||
<string name="custom_fp_select_summary">Select custom image from your saved files or gallery</string>
|
||||
<!-- UDFPS pressed color -->
|
||||
<string name="udfps_pressed_color_title">Udfps pressed color</string>
|
||||
<string name="udfps_pressed_color_summary">Choose your favorite udfps pressed color</string>
|
||||
<!-- 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>
|
||||
<string name="location_privacy_indicator_title">Location privacy indicator</string>
|
||||
<string name="location_privacy_indicator_summary">Show indicator when any app uses location</string>
|
||||
<string name="projection_privacy_indicator_title">Media projection privacy indicator</string>
|
||||
<string name="projection_privacy_indicator_summary">Show indicator when device screen is projected</string>
|
||||
<!-- Notification count -->
|
||||
<string name="statusbar_notif_count_title">Show notification count</string>
|
||||
<string name="statusbar_notif_count_summary">Display the number of pending notifications</string>
|
||||
<!-- Statusbar colored icons -->
|
||||
<string name="statusbar_colored_icons_title">Colored icons</string>
|
||||
<string name="statusbar_colored_icons_summary">Use proper app icons for notification icons in statusbar</string>
|
||||
<!-- Bluetooth status -->
|
||||
<string name="bluetooth_battery_title">Bluetooth battery status</string>
|
||||
<string name="bluetooth_battery_summary">Display battery status for the connected bluetooth device, if available</string>
|
||||
<!-- Torch Power button gestures -->
|
||||
<string name="torch_power_button_gesture_title">Toggle torch when screen off</string>
|
||||
<string name="torch_power_button_gesture_none">Disabled</string>
|
||||
<string name="torch_power_button_gesture_dt">Double tap power button (slower single tap response), Disables double power tap for camera.</string>
|
||||
<string name="torch_power_button_gesture_dt_toast">Jump to camera gesture is now disabled</string>
|
||||
<string name="torch_power_button_gesture_lp">Long press power button</string>
|
||||
<!-- Status bar - Clock -->
|
||||
<string name="status_bar_clock_title">Clock & date</string>
|
||||
<string name="status_bar_clock_summary">Customize clock & date</string>
|
||||
<string name="status_bar_clock_seconds_title">Clock seconds</string>
|
||||
<string name="status_bar_clock_seconds_summary">Display seconds next to clock in status bar</string>
|
||||
<string name="status_bar_clock_position_title">Clock style</string>
|
||||
<string name="status_bar_clock_position_right">Right</string>
|
||||
<string name="status_bar_clock_position_left">Left</string>
|
||||
<string name="status_bar_clock_position_center">Center</string>
|
||||
<string name="status_bar_clock_position_hidden">Hidden</string>
|
||||
<string name="status_bar_clock_auto_hide_title">Auto hide</string>
|
||||
<string name="status_bar_clock_auto_hide_launcher_summary">Hide clock if launcher is visible</string>
|
||||
<string name="status_bar_clock_auto_hide_summary">Hide clock at regular interval</string>
|
||||
<string name="status_bar_clock_auto_hide_hdur_title">Hide duration</string>
|
||||
<string name="status_bar_clock_auto_hide_hdur_summary">Number of seconds to hide clock</string>
|
||||
<string name="status_bar_clock_auto_hide_sdur_title">Show duration</string>
|
||||
<string name="status_bar_clock_auto_hide_sdur_summary">Number of seconds to wait before hiding clock</string>
|
||||
<string name="status_bar_am_pm_title">AM/PM style</string>
|
||||
<string name="status_bar_am_pm_info">24-hour clock is enabled</string>
|
||||
<string name="status_bar_am_pm_normal">Normal</string>
|
||||
<string name="status_bar_am_pm_small">Small</string>
|
||||
<string name="status_bar_am_pm_hidden">Hidden</string>
|
||||
<string name="status_bar_date_title">Date</string>
|
||||
<string name="status_bar_date_none">Hidden</string>
|
||||
<string name="status_bar_date_small">Small</string>
|
||||
<string name="status_bar_date_normal">Normal</string>
|
||||
<string name="status_bar_date_format_title">Date format</string>
|
||||
<string name="status_bar_date_style">Date style</string>
|
||||
<string name="status_bar_date_style_normal">Normal</string>
|
||||
<string name="status_bar_date_style_lowercase">Lowercase</string>
|
||||
<string name="status_bar_date_style_uppercase">Uppercase</string>
|
||||
<string name="status_bar_date_format_custom">Custom java format</string>
|
||||
<string name="status_bar_date_string_edittext_title">Must be in DateFormat eg. MM/dd/yy</string>
|
||||
<string name="status_bar_date_string_edittext_summary">Enter string</string>
|
||||
<string name="clock_date_position">Date position</string>
|
||||
<string name="clock_date_right">Right of time</string>
|
||||
<string name="clock_date_left">Left of time</string>
|
||||
<string name="clock_font_size_title">Clock font size</string>
|
||||
<!-- QS clock -->
|
||||
<string name="qs_clock_title">Clock</string>
|
||||
<string name="qs_clock_summary">Display clock in quick status bar header</string>
|
||||
<!-- QS date -->
|
||||
<string name="qs_date_title">Date</string>
|
||||
<string name="qs_date_summary">Display date in quick status bar header</string>
|
||||
<!-- Footer -->
|
||||
<string name="qs_footer_category">QS Footer</string>
|
||||
<string name="qs_footer_datausage_title">Data usage</string>
|
||||
<string name="qs_footer_datausage_summary">Display data usage summary in quick settings footer</string>
|
||||
<!-- App lock -->
|
||||
<string name="app_lock_title">App lock</string>
|
||||
<string name="app_lock_summary">Apps will require fingerprint authentication to launch</string>
|
||||
<string name="app_lock_authentication_dialog_title">Unlock</string>
|
||||
<string name="enable_debugging">Enable debugging</string>
|
||||
<string name="disable_debugging">Disable debugging</string>
|
||||
<string name="app_lock_packages_title">Protected apps</string>
|
||||
<string name="app_lock_packages_summary">Select the apps to protect with biometrics or device credentials</string>
|
||||
<string name="app_lock_timeout_title">Auto lock timeout</string>
|
||||
<string name="app_lock_timeout_summary">Duration of time after which an unlocked app in background should be locked</string>
|
||||
<string name="app_lock_notifications_title">Redact notifications</string>
|
||||
<string name="app_lock_notifications_summary"> Notification content will be hidden and collapsed for selected apps when they are locked.
|
||||
Heads up notifications will be automatically disabled.
|
||||
</string>
|
||||
<string name="app_lock_notifications_disabled_summary">Protect an application first</string>
|
||||
<string name="app_lock_biometrics_allowed_title">Enable biometrics for unlocking</string>
|
||||
<string name="app_lock_footer_text">Bubbles will be automatically dismissed after timeout</string>
|
||||
<string name="enable_protection">Enable protection</string>
|
||||
<!-- Quick settings styling -->
|
||||
<string name="qs_styling">Quick Settings UI</string>
|
||||
<string name="qs_styles_title">QS Panel Styles</string>
|
||||
<string name="qs_outline">QS Outline Style</string>
|
||||
<string name="qs_two_tone">QS Two-Tone Accent</string>
|
||||
<string name="qs_color_pop">QS Color Pop</string>
|
||||
<!-- QS tiles layout direction: vertical or horizontal -->
|
||||
<string name="qs_tile_layout_category_title">Tile layout</string>
|
||||
<string name="qs_tile_layout_title">Title Alignment</string>
|
||||
<string name="qs_tile_layout_summary">Enable for centered layout.</string>
|
||||
<!-- QS tiles title visibility -->
|
||||
<string name="qs_tile_title_visibility_title">Hide tile titles</string>
|
||||
<string name="qs_tile_title_visibility_summary">Toggle to hide tile titles</string>
|
||||
<!-- QS tiles layout -->
|
||||
<string name="qs_layout_category_title">Tiles layout</string>
|
||||
<string name="qs_tile_label_hide_title">Hide label</string>
|
||||
<string name="qs_tile_label_hide_summary">Only show icon in tile</string>
|
||||
<string name="qs_tile_label_size_title">Label text size</string>
|
||||
<string name="qs_columns_portrait_title">Columns (portrait)</string>
|
||||
<string name="qs_columns_landscape_title">Columns (landscape)</string>
|
||||
<!-- Monet engine -->
|
||||
<string name="monet_engine_settings_title">Monet engine</string>
|
||||
<string name="monet_engine_settings_summary">Custom color, colorfulness, brightness</string>
|
||||
<string name="accurate_shades_title">Use accurate shades</string>
|
||||
<string name="color_override_title">Custom color picker</string>
|
||||
<string name="color_override_default_summary">Using wallpaper color</string>
|
||||
<string name="custom_color_override_summary_placeholder"> Choosen color: <xliff:g example="#FF0000" id="Color">%1$s</xliff:g>. Set an empty value to use wallpaper color.
|
||||
</string>
|
||||
<string name="invalid_color_input">Invalid color input!</string>
|
||||
<string name="chroma_factor_title">Colorfulness</string>
|
||||
<string name="linear_lightness_title">Use custom lightness scale</string>
|
||||
<string name="white_luminance_title">Brightness</string>
|
||||
<!-- Power menu Animations -->
|
||||
<string name="power_menu_animation_title">Power menu animation</string>
|
||||
<string name="power_menu_animation_dialog_title">Select power menu animation</string>
|
||||
<string name="power_menu_animation_aosp">AOSP (default)</string>
|
||||
<string name="power_menu_animation_bottom">Bottom</string>
|
||||
<string name="power_menu_animation_top">Top</string>
|
||||
<string name="power_menu_animation_xylon">Fly</string>
|
||||
<string name="power_menu_animation_slide">Slide</string>
|
||||
<string name="power_menu_animation_turn">Turn</string>
|
||||
<string name="power_menu_animation_fly">Glow</string>
|
||||
<string name="power_menu_animation_card">3D</string>
|
||||
<string name="power_menu_animation_translucent_top">Translucent (top)</string>
|
||||
<string name="power_menu_animation_translucent_bottom">Translucent (bottom)</string>
|
||||
<string name="power_menu_animation_rotate">Rotate</string>
|
||||
<!-- QS tiles animations category -->
|
||||
<string name="qs_tile_animation_category_title">QS Tiles</string>
|
||||
<!-- Tiles animation style -->
|
||||
<string name="qs_tile_animation_style_title">Animation style</string>
|
||||
<string name="qs_tile_animation_duration_title">Animation duration</string>
|
||||
<string name="qs_tile_animation_interpolator_title">Tiles animation interpolator</string>
|
||||
<string name="qs_tile_animation_style_off">No animation</string>
|
||||
<string name="qs_tile_animation_style_flip">Flip</string>
|
||||
<string name="qs_tile_animation_style_rotate">Rotate</string>
|
||||
<string name="qs_tile_animation_duration_low">Low</string>
|
||||
<string name="qs_tile_animation_duration_default">Default</string>
|
||||
<string name="qs_tile_animation_duration_fast">Fast</string>
|
||||
<string name="qs_tile_animation_duration_quite_fast">Quite fast</string>
|
||||
<string name="qs_tile_animation_duration_super_fast">Super fast</string>
|
||||
<string name="qs_tile_animation_interpolator_linearInterpolator">Linear</string>
|
||||
<string name="qs_tile_animation_interpolator_accelerateInterpolator">Accelerate</string>
|
||||
<string name="qs_tile_animation_interpolator_decelerateInterpolator">Decelerate</string>
|
||||
<string name="qs_tile_animation_interpolator_accelerateDecelerateInterpolator">Accelerate decelerate</string>
|
||||
<string name="qs_tile_animation_interpolator_bounceInterpolator">Bounce</string>
|
||||
<string name="qs_tile_animation_interpolator_overshootInterpolator">Overshoot</string>
|
||||
<string name="qs_tile_animation_interpolator_anticipateInterpolator">Anticipate</string>
|
||||
<string name="qs_tile_animation_interpolator_anticipateOvershootInterpolator">Anticipate overshoot</string>
|
||||
<string name="qs_set_animation_style">%1$s</string>
|
||||
<string name="qs_set_animation_duration">%1$s</string>
|
||||
<string name="qs_set_animation_interpolator">%1$s</string>
|
||||
<!-- reTicker -->
|
||||
<string name="reticker_title">reTicker</string>
|
||||
<string name="reticker_summary">Replace heads-up notification with slim and less invasive version of redesigned ticker</string>
|
||||
<string name="reticker_colored_title">Use app colored background</string>
|
||||
<string name="reticker_colored_summary">Replace reTicker background color using notification app main color</string>
|
||||
<!-- Power menu and dialogs opacity -->
|
||||
<string name="power_menu_transparency">Power/reboot menu opacity</string>
|
||||
<string name="power_menu_dialog_dim">Power/reboot dialog dim background amount</string>
|
||||
<!-- Smart charging -->
|
||||
<string name="smart_charging_title">Smart Charging</string>
|
||||
<string name="smart_charging_summary">Set maximum charging level</string>
|
||||
<string name="smart_charging_switch_title">Enable Smart Charging</string>
|
||||
<string name="smart_charging_level_title">Stop trigger level</string>
|
||||
<string name="smart_charging_resume_level_title">Start trigger level</string>
|
||||
<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_units_rounded_title">Rounded corners</string>
|
||||
<string name="pulse_solid_units_rounded_summary">Solid lines with rounded tip</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>
|
||||
<!-- Pulse Gravity n Mirror Options -->
|
||||
<string name="pulse_custom_gravity_title">Gravity</string>
|
||||
<string name="pulse_custom_gravity_bottom">Bottom</string>
|
||||
<string name="pulse_custom_gravity_top">Top</string>
|
||||
<string name="pulse_custom_gravity_center">Center</string>
|
||||
<string name="visualizer_center_mirrored_title">Center mirrored</string>
|
||||
<string name="visualizer_center_mirrored_summary">Set the visualizer in center mirrored mode</string>
|
||||
<string name="pulse_vertical_mirror_title">Vertical Mirror</string>
|
||||
<string name="pulse_vertical_mirror_summary">Create other pulse and flip vertically</string>
|
||||
<string name="click_partial_screenshot_title">Click to partial screenshot</string>
|
||||
<string name="click_partial_screenshot_summary">Short click Volume Down and Power to take partial screenshot</string>
|
||||
<!-- UI styles -->
|
||||
<string name="theme_customization_ui_style_title">UI Style</string>
|
||||
<string name="theme_customization_ui_style_summary">Set custom style for your interface</string>
|
||||
<!-- OOS style material dismiss all button for notifications -->
|
||||
<string name="notification_material_dismiss_button_title">Material dimiss button</string>
|
||||
<string name="notification_material_dismiss_button_summary">Replace clear all notification text with floating button</string>
|
||||
<string name="clearall_style_title">Material dismiss button style</string>
|
||||
<string name="clearall_bgstyle_title">Material dismiss background style</string>
|
||||
<!-- Smart Pixels -->
|
||||
<string name="smart_pixels_warning_text">Smart pixels is a power saving feature. Depending on how many pixels you decide to turn off, you could see improvement in battery life. Note that in some cases it can result in unresponsive areas on touch screen</string>
|
||||
<string name="smart_pixels_title">Smart Pixels</string>
|
||||
<string name="smart_pixels_summary">Save battery by shutting off extra pixels</string>
|
||||
<string name="smart_pixels_enable_title">Enable Smart Pixels</string>
|
||||
<string name="smart_pixels_enable_summary">Shut off pixels to reduce power consumption</string>
|
||||
<string name="smart_pixels_on_power_save_title">Auto-enable on battery saver</string>
|
||||
<string name="smart_pixels_on_power_save_summary">Enable Smart Pixels when battery saver is enabled</string>
|
||||
<string name="smart_pixels_percent">Percent of pixels to disable</string>
|
||||
<string name="smart_pixels_shift_title">Burn-in protection</string>
|
||||
<string name="smart_pixels_shift_summary">Prevents burn-in on OLED devices by shifting pixels every so often</string>
|
||||
<!-- Ambient edge lighting -->
|
||||
<string name="pulse_ambient_light_category">Screen edge lighting</string>
|
||||
<string name="pulse_ambient_light_title">Edge lighting</string>
|
||||
<string name="pulse_ambient_light_summary">Light up the side edges of the screen on notification pulse</string>
|
||||
<string name="pulse_ambient_light_color_title">Custom color</string>
|
||||
<string name="pulse_ambient_light_color_mode_title">Light color</string>
|
||||
<string name="pulse_ambient_light_color_mode_notification">Automatic (Notification Based)</string>
|
||||
<string name="pulse_ambient_light_color_mode_wall">Automatic (Wallpaper Based)</string>
|
||||
<string name="pulse_ambient_light_color_mode_accent">Accent</string>
|
||||
<string name="pulse_ambient_light_color_mode_custom">Custom</string>
|
||||
<string name="pulse_ambient_light_color_mode_random">Random Color</string>
|
||||
<string name="pulse_ambient_light_duration_title">Light duration</string>
|
||||
<string name="pulse_ambient_light_repeat_count_title">Light repeat count</string>
|
||||
<string name="pulse_ambient_light_show_always_title">Show always</string>
|
||||
<string name="pulse_ambient_light_show_always_summary">Show lights for all doze events and not just notifications</string>
|
||||
<string name="pulse_ambient_light_repeat_direction_title">Light repeat mode</string>
|
||||
<string name="pulse_ambient_light_repeat_direction_restart">Restart</string>
|
||||
<string name="pulse_ambient_light_repeat_direction_reverse">Reverse</string>
|
||||
<string name="pulse_ambient_light_layout_title">Light view</string>
|
||||
<string name="pulse_ambient_light_layout_solid">Solid</string>
|
||||
<string name="pulse_ambient_light_layout_faded">Faded</string>
|
||||
<string name="ambient_notification_light_enabled_title">Show on AOD</string>
|
||||
<string name="ambient_notification_light_enabled_summary">Show lights on Always On Display</string>
|
||||
<string name="ambient_notification_light_hide_aod_title">Hide AOD content</string>
|
||||
<string name="ambient_notification_light_hide_aod_summary">Hide AOD content when lights are showing</string>
|
||||
<string name="ambient_notification_light_timeout_title">Timeout</string>
|
||||
<string name="ambient_notification_light_timeout_forever">Forever</string>
|
||||
<string name="ambient_notification_light_timeout_half_minute">30 seconds</string>
|
||||
<string name="ambient_notification_light_timeout_minute">1 minute</string>
|
||||
<string name="ambient_notification_light_timeout_three_minutes">3 minutes</string>
|
||||
<string name="ambient_notification_light_timeout_five_minutes">5 minutes</string>
|
||||
<string name="ambient_notification_light_timeout_ten_minutes">10 minutes</string>
|
||||
<!-- Edge Light -->
|
||||
<string name="pulse_ambient_light_width_title">Light width</string>
|
||||
<!-- Pulse Light Layout Style -->
|
||||
<string name="pulse_light_layout_style_title">Light Layout Style</string>
|
||||
<string name="pulse_light_both">All Four Sides</string>
|
||||
<string name="pulse_light_top_bottom">Only Top-Bottom</string>
|
||||
<string name="pulse_light_left_right">Only Left-Right</string>
|
||||
<!-- Ambient Customization -->
|
||||
<string name="ambient_text_category">Text Customization</string>
|
||||
<string name="ambient_image_category">Image Customization</string>
|
||||
<string name="ambient_text_category_title">Ambient-AOD Customization</string>
|
||||
<string name="ambient_text_category_summary">Customizing the looks of ambient-aod</string>
|
||||
<string name="ambient_text_title">Ambient Text</string>
|
||||
<string name="ambient_text_summary">Show Ambient Text in AoD</string>
|
||||
<string name="ambient_text_animation_title">Ambient Text Animation</string>
|
||||
<string name="ambient_text_animation_summary">Show a Animation when show AoD</string>
|
||||
<string name="ambient_text_size_title">Ambient Text Size</string>
|
||||
<string name="ambient_text_font_title">Ambient Text Font</string>
|
||||
<string name="ambient_text_string_title">Set Ambient Text</string>
|
||||
<string name="ambient_text_align_title">Ambient Text Align</string>
|
||||
<string name="ambient_text_align_start_top">Right n Top</string>
|
||||
<string name="ambient_text_align_start_center">Right n Center</string>
|
||||
<string name="ambient_text_align_start_bottom">Right n Bottom</string>
|
||||
<string name="ambient_text_align_center">Center</string>
|
||||
<string name="ambient_text_align_end_top">Left n Top</string>
|
||||
<string name="ambient_text_align_end_center">Left n Center</string>
|
||||
<string name="ambient_text_align_end_bottom">Left n Bottom</string>
|
||||
<string name="ambient_text_type_color_title">Ambient Text Type Color</string>
|
||||
<string name="ambient_text_color_title">Ambient Text Color</string>
|
||||
<string name="ambient_notification_light_color_mode_accent">System accent color</string>
|
||||
<string name="ambient_notification_light_color_mode_custom">Custom color</string>
|
||||
<string name="ambient_notification_light_color_mode_wall">Wallpaper color</string>
|
||||
<string name="ambient_image_title">Ambient Image</string>
|
||||
<string name="file_header_select_title">Select local image</string>
|
||||
<string name="file_header_select_summary">Select image from storage(recommended use Gallery Go)</string>
|
||||
<!-- Lock Clock Fonts -->
|
||||
<string name="lock_clock_font_title">LS Clock font style</string>
|
||||
<string name="lock_clock_font_dialog_title">Select lockscreen clock font</string>
|
||||
<string name="lock_clock_font_stock">Normal (default)</string>
|
||||
<string name="lock_clock_font_bold">Bold</string>
|
||||
<string name="lock_clock_font_italic">Italic</string>
|
||||
<string name="lock_clock_font_bold_italic">Bold Italic</string>
|
||||
<string name="lock_clock_font_light_italic">Light Italic</string>
|
||||
<string name="lock_clock_font_thin_italic">Thin Italic</string>
|
||||
<string name="lock_clock_font_light">Light</string>
|
||||
<string name="lock_clock_font_thin">Thin</string>
|
||||
<string name="lock_clock_font_condensed_normal">Condensed</string>
|
||||
<string name="lock_clock_font_condensed_italic">Condensed Italic</string>
|
||||
<string name="lock_clock_font_condensed_bold">Condensed Bold</string>
|
||||
<string name="lock_clock_font_condensed_bold_italic">Condensed Bold Italic</string>
|
||||
<string name="lock_clock_font_condensed_light">Condensed Light</string>
|
||||
<string name="lock_clock_font_condensed_light_italic">Condensed Light Italic</string>
|
||||
<string name="lock_clock_font_medium_normal">Medium</string>
|
||||
<string name="lock_clock_font_medium_italic">Medium Italic</string>
|
||||
<string name="lock_clock_font_black">Black</string>
|
||||
<string name="lock_clock_font_black_italic">Black Italic</string>
|
||||
<string name="lock_clock_font_dancingscript">DancingScript</string>
|
||||
<string name="lock_clock_font_dancingscript_bold">DancingScript Bold</string>
|
||||
<string name="lock_clock_font_comingsoon">ComingSoon</string>
|
||||
<string name="lock_clock_font_notoserif">NotoSerif Normal</string>
|
||||
<string name="lock_clock_font_notoserif_italic">NotoSerif Italic</string>
|
||||
<string name="lock_clock_font_notoserif_bold">NotoSerif Bold</string>
|
||||
<string name="lock_clock_font_notoserif_bold_italic">NotoSerif Bold Italic</string>
|
||||
<string name="lock_clock_font_gobold">GoBold Light</string>
|
||||
<string name="lock_clock_font_roadrage">Road Rage</string>
|
||||
<string name="lock_clock_font_snowstorm">Snowstorm</string>
|
||||
<string name="lock_clock_font_googlesans">Google Sans</string>
|
||||
<string name="lock_clock_font_neoneon">Neoneon</string>
|
||||
<string name="lock_clock_font_themeable">Themeable (or VCR OSD Mono)</string>
|
||||
<string name="lock_clock_font_samsung">Shamshung</string>
|
||||
<string name="lock_clock_font_mexcellent">Mexcellent</string>
|
||||
<string name="lock_clock_font_burnstown">Burnstown</string>
|
||||
<string name="lock_clock_font_dumbledor">Dumbledor</string>
|
||||
<string name="lock_clock_font_phantombold">PhantomBold</string>
|
||||
<!-- Black theme -->
|
||||
<string name="system_black_theme_title">Vivid Colors</string>
|
||||
<string name="system_black_theme_summary">Use colorful and darker monet shades</string>
|
||||
</resources>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -47,18 +47,18 @@
|
||||
|
||||
<!-- VoLTE Icon Type -->
|
||||
<string-array name="volte_icon_type_entries" translatable="false">
|
||||
<item>@string/volte_icon_vivo</item>
|
||||
<item>@string/volte_icon_margaritov2</item>
|
||||
<item>@string/volte_icon_margaritov</item>
|
||||
<item>@string/volte_icon_asus</item>
|
||||
<item>@string/volte_icon_off</item>
|
||||
<item>@string/volte_icon_dynamic</item>
|
||||
<item>@string/volte_icon_vo</item>
|
||||
<item>@string/volte_icon_volte</item>
|
||||
<item>@string/volte_icon_oos</item>
|
||||
<item>@string/volte_icon_hd</item>
|
||||
<item>@string/volte_icon_hd2</item>
|
||||
<item>@string/volte_icon_miui</item>
|
||||
<item>@string/volte_icon_emui</item>
|
||||
<item>@string/volte_icon_oos</item>
|
||||
<item>@string/volte_icon_volte</item>
|
||||
<item>@string/volte_icon_vo</item>
|
||||
<item>@string/volte_icon_aris</item>
|
||||
<item>@string/volte_icon_margaritov2</item>
|
||||
<item>@string/volte_icon_margaritov</item>
|
||||
<item>@string/volte_icon_vivo</item>
|
||||
<item>@string/volte_icon_aris</item>
|
||||
<item>@string/volte_icon_beast</item>
|
||||
<item>@string/volte_icon_ios</item>
|
||||
<item>@string/volte_icon_lr</item>
|
||||
@@ -75,18 +75,18 @@
|
||||
</string-array>
|
||||
|
||||
<string-array name="volte_icon_type_values" translatable="false">
|
||||
<item>10</item>
|
||||
<item>9</item>
|
||||
<item>8</item>
|
||||
<item>4</item>
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>2</item>
|
||||
<item>1</item>
|
||||
<item>0</item>
|
||||
<item>11</item>
|
||||
<item>8</item>
|
||||
<item>9</item>
|
||||
<item>10</item>
|
||||
<item>11</item>
|
||||
<item>12</item>
|
||||
<item>13</item>
|
||||
<item>14</item>
|
||||
@@ -98,10 +98,31 @@
|
||||
<item>20</item>
|
||||
<item>21</item>
|
||||
<item>22</item>
|
||||
<item>23</item>
|
||||
<item>24</item>
|
||||
<item>23</item>
|
||||
<item>24</item>
|
||||
<item>25</item>
|
||||
<item>26</item>
|
||||
</string-array>
|
||||
|
||||
<!-- VoWiFi Icon Type -->
|
||||
<string-array name="vowifi_icon_type_entries" translatable="false">
|
||||
<item>@string/vowifi_icon_off</item>
|
||||
<item>@string/vowifi_icon_dynamic</item>
|
||||
<item>@string/vowifi_icon_asus</item>
|
||||
<item>@string/vowifi_icon_oneplus</item>
|
||||
<item>@string/vowifi_icon_moto</item>
|
||||
<item>@string/vowifi_icon_emui</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="vowifi_icon_type_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Battery -->
|
||||
<string-array name="status_bar_battery_percent_entries" translatable="false">
|
||||
<item>@string/status_bar_battery_percentage_default</item>
|
||||
@@ -119,6 +140,17 @@
|
||||
|
||||
<string-array name="status_bar_battery_style_entries" translatable="false">
|
||||
<item>@string/status_bar_battery_style_icon_portrait</item>
|
||||
<item>@string/status_bar_battery_style_icon_rlandscape</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_buddy</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_line</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_musku</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_pill</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_signal</item>
|
||||
<item>@string/status_bar_battery_style_icon_rlandscape_style_a</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_style_a</item>
|
||||
<item>@string/status_bar_battery_style_icon_rlandscape_style_b</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_style_b</item>
|
||||
<item>@string/status_bar_battery_style_circle</item>
|
||||
<item>@string/status_bar_battery_style_dotted_circle</item>
|
||||
<item>@string/status_bar_battery_style_filled_circle</item>
|
||||
@@ -126,23 +158,46 @@
|
||||
<item>@string/status_bar_battery_style_big_dotted_circle</item>
|
||||
<item>@string/status_bar_battery_style_text</item>
|
||||
<item>@string/status_bar_battery_style_hidden</item>
|
||||
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_battery_style_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>10</item>
|
||||
<item>11</item>
|
||||
<item>12</item>
|
||||
<item>13</item>
|
||||
<item>14</item>
|
||||
<item>15</item>
|
||||
<item>16</item>
|
||||
<item>17</item>
|
||||
<item>18</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>8</item>
|
||||
<item>9</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
</string-array>
|
||||
|
||||
<!-- QS battery style -->
|
||||
<string-array name="qs_battery_style_entries" translatable="false">
|
||||
<!-- <string-array name="qs_battery_style_entries" translatable="false">
|
||||
<item>@string/qs_use_status_bar_battery_style</item>
|
||||
<item>@string/status_bar_battery_style_icon_portrait</item>
|
||||
<item>@string/status_bar_battery_style_icon_rlandscape</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_buddy</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_line</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_musku</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_pill</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_signal</item>
|
||||
<item>@string/status_bar_battery_style_icon_rlandscape_style_a</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_style_a</item>
|
||||
<item>@string/status_bar_battery_style_icon_rlandscape_style_b</item>
|
||||
<item>@string/status_bar_battery_style_icon_landscape_style_b</item>
|
||||
<item>@string/status_bar_battery_style_circle</item>
|
||||
<item>@string/status_bar_battery_style_dotted_circle</item>
|
||||
<item>@string/status_bar_battery_style_filled_circle</item>
|
||||
@@ -155,14 +210,25 @@
|
||||
<string-array name="qs_battery_style_values" translatable="false">
|
||||
<item>-1</item>
|
||||
<item>0</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>10</item>
|
||||
<item>11</item>
|
||||
<item>12</item>
|
||||
<item>13</item>
|
||||
<item>14</item>
|
||||
<item>15</item>
|
||||
<item>16</item>
|
||||
<item>17</item>
|
||||
<item>18</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>8</item>
|
||||
<item>9</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
</string-array>
|
||||
</string-array> -->
|
||||
|
||||
<!-- Quick Settings brightness slider -->
|
||||
<string-array name="qs_show_brightness_slider_entries" translatable="false">
|
||||
@@ -249,4 +315,488 @@
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Torch Power button gestures -->
|
||||
<string-array name="torch_power_button_gesture_entries">
|
||||
<item>@string/torch_power_button_gesture_none</item>
|
||||
<item>@string/torch_power_button_gesture_dt</item>
|
||||
<item>@string/torch_power_button_gesture_lp</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="torch_power_button_gesture_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="qs_styles_entries" translatable="false">
|
||||
<item>@string/default_string</item>
|
||||
<item>@string/qs_outline</item>
|
||||
<item>@string/qs_two_tone</item>
|
||||
<item>@string/qs_color_pop</item>
|
||||
<item>@string/qs_shaded</item>
|
||||
<item>@string/qs_cyberpunk</item>
|
||||
<item>@string/qs_neumorph</item>
|
||||
<item>@string/qs_reflected</item>
|
||||
<item>@string/qs_surround</item>
|
||||
<item>@string/qs_thin</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="qs_styles_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>8</item>
|
||||
<item>9</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Status bar - Clock -->
|
||||
<string-array name="status_bar_clock_position_entries" translatable="false">
|
||||
<item>@string/status_bar_clock_position_right</item>
|
||||
<item>@string/status_bar_clock_position_center</item>
|
||||
<item>@string/status_bar_clock_position_left</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_clock_position_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_clock_position_entries_rtl" translatable="false">
|
||||
<item>@string/status_bar_clock_position_left</item>
|
||||
<item>@string/status_bar_clock_position_center</item>
|
||||
<item>@string/status_bar_clock_position_right</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_clock_position_values_rtl" translatable="false">
|
||||
<item>2</item>
|
||||
<item>1</item>
|
||||
<item>0</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_clock_position_entries_notch" translatable="false">
|
||||
<item>@string/status_bar_clock_position_right</item>
|
||||
<item>@string/status_bar_clock_position_left</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_clock_position_values_notch" translatable="false">
|
||||
<item>0</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_clock_position_entries_notch_rtl" translatable="false">
|
||||
<item>@string/status_bar_clock_position_left</item>
|
||||
<item>@string/status_bar_clock_position_right</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_clock_position_values_notch_rtl" translatable="false">
|
||||
<item>2</item>
|
||||
<item>0</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_am_pm_entries" translatable="false">
|
||||
<item>@string/status_bar_am_pm_hidden</item>
|
||||
<item>@string/status_bar_am_pm_normal</item>
|
||||
<item>@string/status_bar_am_pm_small</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_am_pm_values" translatable="false">
|
||||
<item>2</item>
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="clock_date_position_entries" translatable="false">
|
||||
<item>@string/clock_date_left</item>
|
||||
<item>@string/clock_date_right</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="clock_date_position_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_date_entries">
|
||||
<item>@string/status_bar_date_none</item>
|
||||
<item>@string/status_bar_date_small</item>
|
||||
<item>@string/status_bar_date_normal</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_date_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_date_style_entries">
|
||||
<item>@string/status_bar_date_style_normal</item>
|
||||
<item>@string/status_bar_date_style_lowercase</item>
|
||||
<item>@string/status_bar_date_style_uppercase</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_date_style_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="status_bar_date_format_entries_values" translatable="false">
|
||||
<item>dd/MM/yy</item>
|
||||
<item>MM/dd/yy</item>
|
||||
<item>yyyy-MM-dd</item>
|
||||
<item>yyyy-dd-MM</item>
|
||||
<item>dd-MM-yyyy</item>
|
||||
<item>MM-dd-yyyy</item>
|
||||
<item>MMM dd</item>
|
||||
<item>MMM dd, yyyy</item>
|
||||
<item>MMMM dd, yyyy</item>
|
||||
<item>EEE</item>
|
||||
<item>EEE dd</item>
|
||||
<item>EEE dd/MM</item>
|
||||
<item>EEE MM/dd</item>
|
||||
<item>EEE dd MMM</item>
|
||||
<item>EEE MMM dd</item>
|
||||
<item>EEE MMMM dd</item>
|
||||
<item>EEEE dd/MM</item>
|
||||
<item>EEEE MM/dd</item>
|
||||
<item>@string/status_bar_date_format_custom</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Power menu Animations -->
|
||||
<string-array name="power_menu_animations_entries">
|
||||
<item>@string/power_menu_animation_aosp</item>
|
||||
<item>@string/power_menu_animation_bottom</item>
|
||||
<item>@string/power_menu_animation_top</item>
|
||||
<item>@string/power_menu_animation_fly</item>
|
||||
<item>@string/power_menu_animation_turn</item>
|
||||
<item>@string/power_menu_animation_slide</item>
|
||||
<item>@string/power_menu_animation_xylon</item>
|
||||
<item>@string/power_menu_animation_card</item>
|
||||
<item>@string/power_menu_animation_translucent_top</item>
|
||||
<item>@string/power_menu_animation_translucent_bottom</item>
|
||||
<item>@string/power_menu_animation_rotate</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="power_menu_animations_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>8</item>
|
||||
<item>9</item>
|
||||
<item>10</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Tiles animation style -->
|
||||
<string-array name="qs_tile_animation_style_entries" translatable="false">
|
||||
<item>@string/qs_tile_animation_style_off</item>
|
||||
<item>@string/qs_tile_animation_style_flip</item>
|
||||
<item>@string/qs_tile_animation_style_rotate</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="qs_tile_animation_style_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Tiles animation duration -->
|
||||
<string-array name="qs_tile_animation_duration_entries" translatable="false">
|
||||
<item>@string/qs_tile_animation_duration_low</item>
|
||||
<item>@string/qs_tile_animation_duration_default</item>
|
||||
<item>@string/qs_tile_animation_duration_fast</item>
|
||||
<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>
|
||||
pulse_color_lava_lamp
|
||||
</string-array>
|
||||
|
||||
<string-array name="pulse_color_mode_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="qs_tile_animation_duration_values" translatable="false">
|
||||
<item>2500</item>
|
||||
<item>2000</item>
|
||||
<item>1500</item>
|
||||
<item>1000</item>
|
||||
<item>500</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pulse_custom_gravity_entries">
|
||||
<item>@string/pulse_custom_gravity_bottom</item>
|
||||
<item>@string/pulse_custom_gravity_top</item>
|
||||
<item>@string/pulse_custom_gravity_center</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pulse_custom_gravity_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Tiles animation interpolator -->
|
||||
<string-array name="qs_tile_animation_interpolator_entries" translatable="false">
|
||||
<item>@string/qs_tile_animation_interpolator_linearInterpolator</item>
|
||||
<item>@string/qs_tile_animation_interpolator_accelerateInterpolator</item>
|
||||
<item>@string/qs_tile_animation_interpolator_decelerateInterpolator</item>
|
||||
<item>@string/qs_tile_animation_interpolator_accelerateDecelerateInterpolator</item>
|
||||
<item>@string/qs_tile_animation_interpolator_bounceInterpolator</item>
|
||||
<item>@string/qs_tile_animation_interpolator_overshootInterpolator</item>
|
||||
<item>@string/qs_tile_animation_interpolator_anticipateInterpolator</item>
|
||||
<item>@string/qs_tile_animation_interpolator_anticipateOvershootInterpolator</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="qs_tile_animation_interpolator_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Ambient light -->
|
||||
<string-array name="pulse_ambient_light_color_mode_entries">
|
||||
<item>@string/pulse_ambient_light_color_mode_notification</item>
|
||||
<item>@string/pulse_ambient_light_color_mode_wall</item>
|
||||
<item>@string/pulse_ambient_light_color_mode_accent</item>
|
||||
<item>@string/pulse_ambient_light_color_mode_custom</item>
|
||||
<item>@string/pulse_ambient_light_color_mode_random</item>
|
||||
</string-array>
|
||||
<string-array name="pulse_ambient_light_color_mode_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pulse_ambient_light_layout_entries">
|
||||
<item>@string/pulse_ambient_light_layout_faded</item>
|
||||
<item>@string/pulse_ambient_light_layout_solid</item>
|
||||
</string-array>
|
||||
<string-array name="pulse_ambient_light_layout_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
</string-array>
|
||||
<string-array name="pulse_ambient_light_repeat_direction_entries">
|
||||
<item>@string/pulse_ambient_light_repeat_direction_restart</item>
|
||||
<item>@string/pulse_ambient_light_repeat_direction_reverse</item>
|
||||
</string-array>
|
||||
<string-array name="pulse_ambient_light_repeat_direction_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Edge lightning timeout -->
|
||||
<string-array name="ambient_notification_light_timeout_entries" translatable="false">
|
||||
<item>@string/ambient_notification_light_timeout_forever</item>
|
||||
<item>@string/ambient_notification_light_timeout_half_minute</item>
|
||||
<item>@string/ambient_notification_light_timeout_minute</item>
|
||||
<item>@string/ambient_notification_light_timeout_three_minutes</item>
|
||||
<item>@string/ambient_notification_light_timeout_five_minutes</item>
|
||||
<item>@string/ambient_notification_light_timeout_ten_minutes</item>
|
||||
</string-array>
|
||||
<string-array name="ambient_notification_light_timeout_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>30</item>
|
||||
<item>60</item>
|
||||
<item>180</item>
|
||||
<item>300</item>
|
||||
<item>600</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Pulse Light Layout style -->
|
||||
<string-array name="pulse_light_layout_style_entries" translatable="false">
|
||||
<item>@string/pulse_light_both</item>
|
||||
<item>@string/pulse_light_top_bottom</item>
|
||||
<item>@string/pulse_light_left_right</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pulse_light_layout_style_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Ambient Text Alignment -->
|
||||
<string-array name="ambient_text_alignment_entries" translatable="false">
|
||||
<item>@string/ambient_text_align_start_top</item>
|
||||
<item>@string/ambient_text_align_start_center</item>
|
||||
<!--item>@string/ambient_text_align_start_bottom</item-->
|
||||
<item>@string/ambient_text_align_center</item>
|
||||
<item>@string/ambient_text_align_end_top</item>
|
||||
<item>@string/ambient_text_align_end_center</item>
|
||||
<!--item>@string/ambient_text_align_end_bottom</item-->
|
||||
</string-array>
|
||||
<string-array name="ambient_text_alignment_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<!--item>2</item-->
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<!--item>6</item-->
|
||||
</string-array>
|
||||
|
||||
<string-array name="ambient_text_type_color_entries" translatable="false">
|
||||
<item>@string/ambient_notification_light_color_mode_accent</item>
|
||||
<item>@string/ambient_notification_light_color_mode_wall</item>
|
||||
<item>@string/ambient_notification_light_color_mode_custom</item>
|
||||
</string-array>
|
||||
<string-array name="ambient_text_type_color_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Smart Pixels -->
|
||||
<string-array name="smart_pixels_percent_strings" translatable="false">
|
||||
<item>12</item>
|
||||
<item>25</item>
|
||||
<item>38</item>
|
||||
<item>50</item>
|
||||
<item>62</item>
|
||||
<item>75</item>
|
||||
<item>88</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="smart_pixels_percent_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="smart_pixels_shift_times" translatable="false">
|
||||
<item>@string/custom_timeout_summary_15secs</item>
|
||||
<item>@string/custom_timeout_summary_30secs</item>
|
||||
<item>@string/custom_timeout_summary_1min</item>
|
||||
<item>@string/custom_timeout_summary_2mins</item>
|
||||
<item>@string/custom_timeout_summary_5mins</item>
|
||||
<item>@string/custom_timeout_summary_10mins</item>
|
||||
<item>@string/custom_timeout_summary_20mins</item>
|
||||
<item>@string/custom_timeout_summary_30mins</item>
|
||||
<item>@string/custom_timeout_summary_1hour</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="smart_pixels_shift_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>8</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Status bar chip styles-->
|
||||
<string-array name="statusbar_clock_chip_entries" translatable="false">
|
||||
<item>@string/disabled</item>
|
||||
<item>@string/solid_accent</item>
|
||||
<item>@string/outline</item>
|
||||
<item>@string/solid_accent_gradient</item>
|
||||
<item>@string/solid_gradient</item>
|
||||
<item>@string/solid_gradient_corner</item>
|
||||
<item>@string/solid_gradient_void</item>
|
||||
<item>@string/solid_gradient_neumorph</item>
|
||||
<item>@string/solid_gradient_stroke</item>
|
||||
<item>@string/solid_accent_transperent</item>
|
||||
<item>@string/solid_gradient_light</item>
|
||||
<item>@string/solid_gradient_shape</item>
|
||||
<item>@string/solid_gradient_void_light</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="statusbar_clock_chip_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>8</item>
|
||||
<item>9</item>
|
||||
<item>10</item>
|
||||
<item>11</item>
|
||||
<item>12</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Monet theme styles -->
|
||||
<string-array name="theme_style_entries">
|
||||
<item>@string/theme_style_tonal_spot</item>
|
||||
<item>@string/theme_style_vibrant</item>
|
||||
<item>@string/theme_style_expressive</item>
|
||||
<item>@string/theme_style_spritz</item>
|
||||
<item>@string/theme_style_rainbow</item>
|
||||
<item>@string/theme_style_fruit_salad</item>
|
||||
<item>@string/theme_style_muted</item>
|
||||
<item>@string/theme_style_content</item>
|
||||
<item>@string/theme_style_monochromatic</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="theme_style_values" translatable="false">
|
||||
<item>TONAL_SPOT</item>
|
||||
<item>VIBRANT</item>
|
||||
<item>EXPRESSIVE</item>
|
||||
<item>SPRITZ</item>
|
||||
<item>RAINBOW</item>
|
||||
<item>FRUIT_SALAD</item>
|
||||
<item>MUTED</item>
|
||||
<item>CONTENT</item>
|
||||
<item>MONOCHROMATIC</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Monet color sources -->
|
||||
<string-array name="color_source_entries">
|
||||
<item>@string/color_source_both</item>
|
||||
<item>@string/color_source_home</item>
|
||||
<item>@string/color_source_lock</item>
|
||||
<item>@string/color_source_preset</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="color_source_values" translatable="false">
|
||||
<item>both</item>
|
||||
<item>home_wallpaper</item>
|
||||
<item>lock_wallpaper</item>
|
||||
<item>preset</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<resources>
|
||||
<!-- Base attributes available to CustomSeekBarPreference. -->
|
||||
<declare-styleable name="CustomSeekBarPreference">
|
||||
<attr name="defaultValueText" format="string" />
|
||||
<attr name="interval" format="integer" />
|
||||
<attr name="min" format="integer" />
|
||||
<attr name="units" format="string|reference" />
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
<dimen name="color_preference_width">18dip</dimen>
|
||||
<dimen name="color_preference_height">18dip</dimen>
|
||||
|
||||
<dimen name="color_picker_preview_height">80dp</dimen>
|
||||
|
||||
<!-- Shortcut picker -->
|
||||
<dimen name="shortcut_picker_left_padding">70dip</dimen>
|
||||
|
||||
|
||||
@@ -102,9 +102,13 @@
|
||||
<string name="santoni_maintainer">EvilAnsh</string>
|
||||
<string name="device_ysl">Xiaomi Redmi S2</string>
|
||||
<string name="ysl_maintainer">Iris</string>
|
||||
<string name="device_grus">Xiaomi Mi 9 SE</string>
|
||||
<string name="grus_maintainer">Toyohama</string>
|
||||
|
||||
<!-- Realme Device maintainers -->
|
||||
<string name="device_RMX1971">Realme 5 Pro</string>
|
||||
<string name="device_RMX3461">Realme 9 SE 5g</string>
|
||||
<string name="RMX3461_maintainer">Dhruv00</string>
|
||||
<string name="device_RMX1971">Realme 5 Pro</string>
|
||||
<string name="RMX1971_maintainer">Samba Siva Rao K</string>
|
||||
<string name="device_RMX1901">Realme RMX1901</string>
|
||||
<string name="RMX1901_maintainer">Ritish</string>
|
||||
@@ -121,7 +125,7 @@
|
||||
<string name="device_RMX1805">Realme 2/C1</string>
|
||||
<string name="RMX1805_maintainer">AbhinavVermabest</string>
|
||||
<string name="device_RM6785">Realme 6/6i(Indian)/6s/7/Narzo/Narzo20Pro/Narzo30 4G</string>
|
||||
<string name="RM6785_maintainer">Pain</string>
|
||||
<string name="RM6785_maintainer">ꪖꪀ𝘴ꫝ|邪惡的</string>
|
||||
<string name="device_RMX3360">Realme GT Master Edition</string>
|
||||
<string name="RMX3360_maintainer">X-R-P</string>
|
||||
<!-- Asus Device maintainers -->
|
||||
@@ -155,4 +159,9 @@
|
||||
<!-- Motorola Device maintainers -->
|
||||
<string name="device_chef">Motorola One Power</string>
|
||||
<string name="chef_maintainer">Rushi Ranpise</string>
|
||||
|
||||
<!-- Samsung Device maintainers -->
|
||||
<string name="samsung_devices">Samsung</string>
|
||||
<string name="device_s10_n10_series">Galaxy S10 / Galaxy N10 Series</string>
|
||||
<string name="s10_n10_series_maintainer">FrEeRuNnEr4EvEr</string>
|
||||
</resources>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<string name="button_summary">Hardware keys, Navigation bar</string>
|
||||
<string name="gestures_title">Gestures</string>
|
||||
<string name="gestures_summary">Jump to camera, swipe to screenshot</string>
|
||||
<string name="fingerprint_category">Fingerprint</string>
|
||||
<string name="lockscreen_title">Lock screen</string>
|
||||
<string name="lockscreen_summary">Music visualizer, charging animation, clock style</string>
|
||||
<string name="misc_title">Miscellaneous</string>
|
||||
@@ -49,6 +50,7 @@
|
||||
<string name="ok">OK</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="enable">Enable</string>
|
||||
<string name="save">Save</string>
|
||||
<string name="none_string">None</string>
|
||||
<string name="default_string">Default</string>
|
||||
@@ -76,6 +78,13 @@
|
||||
<string name="dialog_delete_title">Delete</string>
|
||||
<string name="dialog_delete_message">Remove selected item?</string>
|
||||
|
||||
<!-- Units -->
|
||||
<string name="unit_milliseconds">milliseconds</string>
|
||||
<string name="unit_percent" translatable="false">\u0025</string>
|
||||
<string name="unit_pixels" translatable="false">dp</string>
|
||||
<string name="unit_seconds">seconds</string>
|
||||
<string name="unit_x1000ms" translatable="false">x1000 ms</string>
|
||||
|
||||
<!-- QS settings -->
|
||||
<string name="qs_title">Quick settings</string>
|
||||
|
||||
@@ -89,6 +98,13 @@
|
||||
<!-- Power menu Animations -->
|
||||
<string name="power_menu_animation">Power menu</string>
|
||||
|
||||
<!-- Color picker -->
|
||||
<string name="rgb">RGB</string>
|
||||
<string name="hsl">HSL</string>
|
||||
<string name="hsv">HSV</string>
|
||||
<string name="confirm">Confirm</string>
|
||||
<string name="invalid_color">Invalid color!</string>
|
||||
|
||||
<!-- QS header image -->
|
||||
|
||||
<!-- Lockscreen -->
|
||||
@@ -135,6 +151,10 @@
|
||||
<string name="theme_customization_wifi_icon_title">WiFi icon style</string>
|
||||
<string name="theme_customization_wifi_icon_summary">Set custom wifi icon style</string>
|
||||
|
||||
<!-- Fonts -->
|
||||
<string name="theme_customization_lock_clock_title">Lockscreen clock font</string>
|
||||
<string name="theme_customization_lock_clock_summary">Set LS clock font style</string>
|
||||
|
||||
<!-- Custom Signal bar icons -->
|
||||
<string name="custom_signal_bar_title">Signal</string>
|
||||
|
||||
@@ -171,6 +191,11 @@
|
||||
<string name="notification_sound_vib_screen_on_title">Noisy notifications if screen on</string>
|
||||
<string name="notification_sound_vib_screen_on_summary">Disable to block notifications sound and vibration when the screen is awake</string>
|
||||
|
||||
<!-- Heads up options -->
|
||||
<string name="notifications_category_title">Annoying notifications protection</string>
|
||||
<string name="less_boring_heads_up_title">Make heads up less annoying</string>
|
||||
<string name="less_boring_heads_up_summary">Show heads up only for dialer or messaging app if they are not in foreground</string>
|
||||
|
||||
<!-- Incall vibrate options -->
|
||||
<string name="incall_vibration_category">In-call vibration options</string>
|
||||
<string name="incall_vibrate_connect_title">Vibrate on connect</string>
|
||||
@@ -230,17 +255,13 @@
|
||||
<string name="lockscreen_albumart_filter_blur_radius_title">Blur amount for lockscreen media artwork</string>
|
||||
|
||||
<!-- Show VoLTE icon on statusbar -->
|
||||
<string name="volte_switch_title">VoLTE icon</string>
|
||||
<string name="volte_switch_summary">Display VoLTE icon</string>
|
||||
<string name="volte_icon_title">VoLTE icon</string>
|
||||
<string name="volte_icon_summary">Display VoLTE icon</string>
|
||||
<string name="volte_icon_style_title">Select VoLTE Icon</string>
|
||||
<string name="volte_icon_asus">VoLTE Asus Icon</string>
|
||||
<string name="volte_icon_style_title">Select VoLTE/HD Icon</string>
|
||||
<string name="volte_icon_off">Off</string>
|
||||
<string name="volte_icon_dynamic">Dynamic VOLTE Icons</string>
|
||||
<string name="volte_icon_vo">Vo Only Icon</string>
|
||||
<string name="volte_icon_volte">VoLTE Icon</string>
|
||||
<string name="volte_icon_oos">VoLTE OOS Icon</string>
|
||||
<string name="volte_icon_hd">HD Icon</string>
|
||||
<string name="volte_icon_hd2">HD CAF Icon</string>
|
||||
<string name="volte_icon_miui">MIUI 11 Icon</string>
|
||||
<string name="volte_icon_emui">EMUI Icon</string>
|
||||
<string name="volte_icon_margaritov">HD Filled Icon</string>
|
||||
@@ -261,6 +282,16 @@
|
||||
<string name="volte_icon_volit">Volit Icon</string>
|
||||
<string name="volte_icon_zirco">Ziroc Icon</string>
|
||||
|
||||
<!-- VoWiFi icon -->
|
||||
<string name="vowifi_icon_title">VoWiFi Icon</string>
|
||||
<string name="vowifi_icon_summary">Display VoWiFi icon when available</string>
|
||||
<string name="vowifi_icon_off">Off</string>
|
||||
<string name="vowifi_icon_dynamic">Dynamic VoWiFi Icon</string>
|
||||
<string name="vowifi_icon_asus">Asus VoWiFi Icon</string>
|
||||
<string name="vowifi_icon_oneplus">OnePlus VoWiFi Icon</string>
|
||||
<string name="vowifi_icon_moto">Moto VoWiFi Icons</string>
|
||||
<string name="vowifi_icon_emui">EMUI Icons</string>
|
||||
|
||||
<!-- Statusbar Battery -->
|
||||
<string name="battery_style_title">Battery icon style</string>
|
||||
<string name="battery_style_summary">Customize battery icons, hide or show percentage</string>
|
||||
@@ -269,6 +300,17 @@
|
||||
<string name="status_bar_battery_percent_title">Battery percentage</string>
|
||||
<string name="status_bar_battery_style_title">Battery style</string>
|
||||
<string name="status_bar_battery_style_icon_portrait">Icon portrait (default)</string>
|
||||
<string name="status_bar_battery_style_icon_rlandscape">Icon landscape (Right)</string>
|
||||
<string name="status_bar_battery_style_icon_landscape">Icon landscape (Left)</string>
|
||||
<string name="status_bar_battery_style_icon_rlandscape_style_a">Landscape R Style A</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_style_a">Landscape L Style A</string>
|
||||
<string name="status_bar_battery_style_icon_rlandscape_style_b">Landscape R Style B</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_style_b">Landscape L Style B</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_pill">Portrait Mx</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_line">Landscape Lorn</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_musku">Portrait IOS</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_signal">Landscape Airoo</string>
|
||||
<string name="status_bar_battery_style_icon_landscape_buddy">Landscape Capsule</string>
|
||||
<string name="status_bar_battery_style_circle">Circle</string>
|
||||
<string name="status_bar_battery_style_dotted_circle">Circle (Dotted)</string>
|
||||
<string name="status_bar_battery_style_filled_circle">Circle (Filled)</string>
|
||||
@@ -291,6 +333,18 @@
|
||||
<!-- Statusbar Clock background chip -->
|
||||
<string name="statusbar_clock_chip_title">Background chip</string>
|
||||
<string name="statusbar_clock_chip_summary">Display accented chip behind clock</string>
|
||||
<string name="solid_accent">Solid color accent</string>
|
||||
<string name="outline">Outline</string>
|
||||
<string name="solid_accent_gradient">Solid color accent gradient</string>
|
||||
<string name="solid_gradient">Solid Gradient side</string>
|
||||
<string name="solid_gradient_corner">Solid accent gradient sharp</string>
|
||||
<string name="solid_gradient_void">Gradient Void</string>
|
||||
<string name="solid_gradient_neumorph">Neumorph gradient</string>
|
||||
<string name="solid_gradient_stroke">Sharp gradient stroke</string>
|
||||
<string name="solid_accent_transperent">Accent transperent</string>
|
||||
<string name="solid_gradient_light">Gradient light</string>
|
||||
<string name="solid_gradient_shape">Sharp gradient corner</string>
|
||||
<string name="solid_gradient_void_light">Gradient Void light</string>
|
||||
|
||||
<!-- Quick Settings brightness slider -->
|
||||
<string name="qs_show_brightness_slider_title">Brightness slider</string>
|
||||
@@ -318,10 +372,6 @@
|
||||
<string name="qs_transparency_title">Background transparency</string>
|
||||
<string name="qs_transparency_summary">Set transparency level for QS background</string>
|
||||
|
||||
<!-- Brightness control -->
|
||||
<string name="status_bar_brightness_control_title">Brightness control</string>
|
||||
<string name="status_bar_brightness_control_summary">Adjust brightness by sliding across the status bar</string>
|
||||
|
||||
<!-- Power menu on lockscreen -->
|
||||
<string name="power_menu_hide_on_secure_title">Hide power menu on lock screen</string>
|
||||
<string name="power_menu_hide_on_secure_summary">This will hide the power menu only on a secure lock screen</string>
|
||||
@@ -494,7 +544,360 @@
|
||||
<!-- UDFPS Haptic Feedback -->
|
||||
<string name="udfps_haptic_feedback_title">UDFPS haptic feedback</string>
|
||||
<string name="udfps_haptic_feedback_summary">Vibrate when touching UDFPS icon</string>
|
||||
<string name="udfps_settings_title">UDFPS settings</string>
|
||||
<string name="udfps_settings_summary">Customizations for the UDFPS</string>
|
||||
|
||||
<!-- UDFPS settings -->
|
||||
<string name="udfps_category">UDFPS</string>
|
||||
<string name="udfps_settings_title">UDFPS customization</string>
|
||||
<string name="udfps_settings_summary">Customize under-display fingerprint scanner</string>
|
||||
<string name="udfps_icon_picker_title">UDFPS icon picker</string>
|
||||
<string name="udfps_icon_picker_summary">Choose your favorite fingerprint icon</string>
|
||||
<string name="udfps_recog_animation_effect_title">UDFPS custom animation</string>
|
||||
<string name="udfps_recog_animation_effect_summary">Choose animation effect</string>
|
||||
<string name="disable">Disable</string>
|
||||
|
||||
<!-- 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>
|
||||
<string name="location_privacy_indicator_title">Location privacy indicator</string>
|
||||
<string name="location_privacy_indicator_summary">Show indicator when any app uses location</string>
|
||||
<string name="projection_privacy_indicator_title">Media projection privacy indicator</string>
|
||||
<string name="projection_privacy_indicator_summary">Show indicator when device screen is projected</string>
|
||||
|
||||
<!-- Notification count -->
|
||||
<string name="statusbar_notif_count_title">Show notification count</string>
|
||||
<string name="statusbar_notif_count_summary">Display the number of pending notifications</string>
|
||||
|
||||
<!-- Statusbar colored icons -->
|
||||
<string name="statusbar_colored_icons_title">Colored icons</string>
|
||||
<string name="statusbar_colored_icons_summary">Use proper app icons for notification icons in statusbar</string>
|
||||
|
||||
<!-- Bluetooth status -->
|
||||
<string name="bluetooth_battery_title">Bluetooth battery status</string>
|
||||
<string name="bluetooth_battery_summary">Display battery status for the connected bluetooth device, if available</string>
|
||||
|
||||
<!-- Torch Power button gestures -->
|
||||
<string name="torch_power_button_gesture_title">Toggle torch when screen off</string>
|
||||
<string name="torch_power_button_gesture_none">Disabled</string>
|
||||
<string name="torch_power_button_gesture_dt">Double tap power button (slower single tap response), Disables double power tap for camera.</string>
|
||||
<string name="torch_power_button_gesture_dt_toast">Jump to camera gesture is now disabled</string>
|
||||
<string name="torch_power_button_gesture_lp">Long press power button</string>
|
||||
|
||||
<!-- Status bar - Clock -->
|
||||
<string name="status_bar_clock_title">Clock & date</string>
|
||||
<string name="status_bar_clock_summary">Customize clock & date</string>
|
||||
<string name="status_bar_clock_seconds_title">Clock seconds</string>
|
||||
<string name="status_bar_clock_seconds_summary">Display seconds next to clock in status bar</string>
|
||||
<string name="status_bar_clock_position_title">Clock style</string>
|
||||
<string name="status_bar_clock_position_right">Right</string>
|
||||
<string name="status_bar_clock_position_left">Left</string>
|
||||
<string name="status_bar_clock_position_center">Center</string>
|
||||
<string name="status_bar_clock_position_hidden">Hidden</string>
|
||||
<string name="status_bar_clock_auto_hide_title">Auto hide</string>
|
||||
<string name="status_bar_clock_auto_hide_launcher_summary">Hide clock if launcher is visible</string>
|
||||
<string name="status_bar_clock_auto_hide_summary">Hide clock at regular interval</string>
|
||||
<string name="status_bar_clock_auto_hide_hdur_title">Hide duration</string>
|
||||
<string name="status_bar_clock_auto_hide_hdur_summary">Number of seconds to hide clock</string>
|
||||
<string name="status_bar_clock_auto_hide_sdur_title">Show duration</string>
|
||||
<string name="status_bar_clock_auto_hide_sdur_summary">Number of seconds to wait before hiding clock</string>
|
||||
<string name="status_bar_am_pm_title">AM/PM style</string>
|
||||
<string name="status_bar_am_pm_info">24-hour clock is enabled</string>
|
||||
<string name="status_bar_am_pm_normal">Normal</string>
|
||||
<string name="status_bar_am_pm_small">Small</string>
|
||||
<string name="status_bar_am_pm_hidden">Hidden</string>
|
||||
<string name="status_bar_date_title">Date</string>
|
||||
<string name="status_bar_date_none">Hidden</string>
|
||||
<string name="status_bar_date_small">Small</string>
|
||||
<string name="status_bar_date_normal">Normal</string>
|
||||
<string name="status_bar_date_format_title">Date format</string>
|
||||
<string name="status_bar_date_style">Date style</string>
|
||||
<string name="status_bar_date_style_normal">Normal</string>
|
||||
<string name="status_bar_date_style_lowercase">Lowercase</string>
|
||||
<string name="status_bar_date_style_uppercase">Uppercase</string>
|
||||
<string name="status_bar_date_format_custom">Custom java format</string>
|
||||
<string name="status_bar_date_string_edittext_title">Must be in DateFormat eg. MM/dd/yy</string>
|
||||
<string name="status_bar_date_string_edittext_summary">Enter string</string>
|
||||
<string name="clock_date_position">Date position</string>
|
||||
<string name="clock_date_right">Right of time</string>
|
||||
<string name="clock_date_left">Left of time</string>
|
||||
<string name="clock_font_size_title">Clock font size</string>
|
||||
|
||||
<!-- QS clock -->
|
||||
<string name="qs_clock_title">Clock</string>
|
||||
<string name="qs_clock_summary">Display clock in quick status bar header</string>
|
||||
|
||||
<!-- Footer -->
|
||||
<string name="qs_footer_category">QS Footer</string>
|
||||
<string name="qs_footer_datausage_title">Data usage</string>
|
||||
<string name="qs_footer_datausage_summary">Display data usage summary in quick settings footer</string>
|
||||
|
||||
<!-- Quick settings styling -->
|
||||
<string name="qs_styles_title">Combined QS Element Styles</string>
|
||||
<string name="qs_outline">Outline</string>
|
||||
<string name="qs_two_tone">Two-Tone Accent</string>
|
||||
<string name="qs_color_pop">Color Pop</string>
|
||||
<string name="qs_shaded">Shaded</string>
|
||||
<string name="qs_cyberpunk">Cyberpunk</string>
|
||||
<string name="qs_neumorph">Neumorph</string>
|
||||
<string name="qs_reflected">Reflected</string>
|
||||
<string name="qs_surround">Surround</string>
|
||||
<string name="qs_thin">ThinLine</string>
|
||||
|
||||
<!-- QS tiles layout -->
|
||||
<string name="qs_layout_category_title">Quick Settings layout</string>
|
||||
<string name="qs_tile_layout_title">QS tiles layout</string>
|
||||
<string name="qs_tile_layout_summary">Customize tiles layout in QS panel</string>
|
||||
<string name="qs_tiles_layout_category">Tiles layout</string>
|
||||
<string name="qs_rows_portrait_title">Rows (Portrait)</string>
|
||||
<string name="qqs_rows_portrait_title">Rows (Quick QS portrait)</string>
|
||||
<string name="qs_columns_portrait_title">Columns (Portrait)</string>
|
||||
<string name="qs_apply_change_button_title">Apply change</string>
|
||||
<string name="qs_apply_change_failed">Failed to apply change</string>
|
||||
<string name="qs_tile_hide_label_title">Hide labels</string>
|
||||
<string name="qs_tile_hide_label_summary">Show only icon for QS tiles</string>
|
||||
<string name="qs_tile_vertical_layout_title">Vertical layout</string>
|
||||
<string name="qs_tile_vertical_layout_summary">Enable vertical layout for QS tiles</string>
|
||||
|
||||
<!-- Power menu Animations -->
|
||||
<string name="power_menu_animation_title">Power menu animation</string>
|
||||
<string name="power_menu_animation_dialog_title">Select power menu animation</string>
|
||||
<string name="power_menu_animation_aosp">AOSP (default)</string>
|
||||
<string name="power_menu_animation_bottom">Bottom</string>
|
||||
<string name="power_menu_animation_top">Top</string>
|
||||
<string name="power_menu_animation_xylon">Fly</string>
|
||||
<string name="power_menu_animation_slide">Slide</string>
|
||||
<string name="power_menu_animation_turn">Turn</string>
|
||||
<string name="power_menu_animation_fly">Glow</string>
|
||||
<string name="power_menu_animation_card">3D</string>
|
||||
<string name="power_menu_animation_translucent_top">Translucent (top)</string>
|
||||
<string name="power_menu_animation_translucent_bottom">Translucent (bottom)</string>
|
||||
<string name="power_menu_animation_rotate">Rotate</string>
|
||||
|
||||
<!-- QS tiles animations category -->
|
||||
<string name="qs_tile_animation_category_title">QS Tiles</string>
|
||||
|
||||
<!-- Tiles animation style -->
|
||||
<string name="qs_tile_animation_style_title">Animation style</string>
|
||||
<string name="qs_tile_animation_duration_title">Animation duration</string>
|
||||
<string name="qs_tile_animation_interpolator_title">Tiles animation interpolator</string>
|
||||
<string name="qs_tile_animation_style_off">No animation</string>
|
||||
<string name="qs_tile_animation_style_flip">Flip</string>
|
||||
<string name="qs_tile_animation_style_rotate">Rotate</string>
|
||||
<string name="qs_tile_animation_duration_low">Low</string>
|
||||
<string name="qs_tile_animation_duration_default">Default</string>
|
||||
<string name="qs_tile_animation_duration_fast">Fast</string>
|
||||
<string name="qs_tile_animation_duration_quite_fast">Quite fast</string>
|
||||
<string name="qs_tile_animation_duration_super_fast">Super fast</string>
|
||||
<string name="qs_tile_animation_interpolator_linearInterpolator">Linear</string>
|
||||
<string name="qs_tile_animation_interpolator_accelerateInterpolator">Accelerate</string>
|
||||
<string name="qs_tile_animation_interpolator_decelerateInterpolator">Decelerate</string>
|
||||
<string name="qs_tile_animation_interpolator_accelerateDecelerateInterpolator">Accelerate decelerate</string>
|
||||
<string name="qs_tile_animation_interpolator_bounceInterpolator">Bounce</string>
|
||||
<string name="qs_tile_animation_interpolator_overshootInterpolator">Overshoot</string>
|
||||
<string name="qs_tile_animation_interpolator_anticipateInterpolator">Anticipate</string>
|
||||
<string name="qs_tile_animation_interpolator_anticipateOvershootInterpolator">Anticipate overshoot</string>
|
||||
<string name="qs_set_animation_style">%1$s</string>
|
||||
<string name="qs_set_animation_duration">%1$s</string>
|
||||
<string name="qs_set_animation_interpolator">%1$s</string>
|
||||
|
||||
<!-- reTicker -->
|
||||
<string name="reticker_category" translatable="false">reTicker</string>
|
||||
<string name="reticker_title">reTicker</string>
|
||||
<string name="reticker_summary">Replace heads-up notification with slim and less invasive version of redesigned ticker</string>
|
||||
<string name="reticker_colored_title">Use app colored background</string>
|
||||
<string name="reticker_colored_summary">Replace reTicker background color using notification app main color</string>
|
||||
|
||||
<!-- Power menu and dialogs opacity -->
|
||||
<string name="power_menu_transparency">Power/reboot menu opacity</string>
|
||||
<string name="power_menu_dialog_dim">Power/reboot dialog dim background amount</string>
|
||||
|
||||
<!-- Smart charging -->
|
||||
<string name="smart_charging_title">Smart Charging</string>
|
||||
<string name="smart_charging_summary">Set maximum charging level</string>
|
||||
<string name="smart_charging_switch_title">Enable Smart Charging</string>
|
||||
<string name="smart_charging_level_title">Stop trigger level</string>
|
||||
<string name="smart_charging_resume_level_title">Start trigger level</string>
|
||||
<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_color_auto">Album</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_units_rounded_title">Rounded corners</string>
|
||||
<string name="pulse_solid_units_rounded_summary">Solid lines with rounded tip</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>
|
||||
|
||||
<!-- Pulse Gravity n Mirror Options -->
|
||||
<string name="pulse_custom_gravity_title">Gravity</string>
|
||||
<string name="pulse_custom_gravity_bottom">Bottom</string>
|
||||
<string name="pulse_custom_gravity_top">Top</string>
|
||||
<string name="pulse_custom_gravity_center">Center</string>
|
||||
<string name="visualizer_center_mirrored_title">Center mirrored</string>
|
||||
<string name="visualizer_center_mirrored_summary">Set the visualizer in center mirrored mode</string>
|
||||
<string name="pulse_vertical_mirror_title">Vertical Mirror</string>
|
||||
<string name="pulse_vertical_mirror_summary">Create other pulse and flip vertically</string>
|
||||
|
||||
<string name="click_partial_screenshot_title">Click to partial screenshot</string>
|
||||
<string name="click_partial_screenshot_summary">Short click Volume Down and Power to take partial screenshot</string>
|
||||
|
||||
<!-- Ambient edge lighting -->
|
||||
<string name="pulse_ambient_light_category">Screen edge lighting</string>
|
||||
<string name="pulse_ambient_light_title">Edge lighting</string>
|
||||
<string name="pulse_ambient_light_summary">Light up the side edges of the screen on notification pulse</string>
|
||||
<string name="pulse_ambient_light_color_title">Custom color</string>
|
||||
<string name="pulse_ambient_light_color_mode_title">Light color</string>
|
||||
<string name="pulse_ambient_light_color_mode_notification">Automatic (Notification Based)</string>
|
||||
<string name="pulse_ambient_light_color_mode_wall">Automatic (Wallpaper Based)</string>
|
||||
<string name="pulse_ambient_light_color_mode_accent">Accent</string>
|
||||
<string name="pulse_ambient_light_color_mode_custom">Custom</string>
|
||||
<string name="pulse_ambient_light_color_mode_random">Random Color</string>
|
||||
<string name="pulse_ambient_light_duration_title">Light duration</string>
|
||||
<string name="pulse_ambient_light_repeat_count_title">Light repeat count</string>
|
||||
<string name="pulse_ambient_light_show_always_title">Show always</string>
|
||||
<string name="pulse_ambient_light_show_always_summary">Show lights for all doze events and not just notifications</string>
|
||||
<string name="pulse_ambient_light_repeat_direction_title">Light repeat mode</string>
|
||||
<string name="pulse_ambient_light_repeat_direction_restart">Restart</string>
|
||||
<string name="pulse_ambient_light_repeat_direction_reverse">Reverse</string>
|
||||
<string name="pulse_ambient_light_layout_title">Light view</string>
|
||||
<string name="pulse_ambient_light_layout_solid">Solid</string>
|
||||
<string name="pulse_ambient_light_layout_faded">Faded</string>
|
||||
<string name="ambient_notification_light_enabled_title">Show on AOD</string>
|
||||
<string name="ambient_notification_light_enabled_summary">Show lights on Always On Display</string>
|
||||
<string name="ambient_notification_light_hide_aod_title">Hide AOD content</string>
|
||||
<string name="ambient_notification_light_hide_aod_summary">Hide AOD content when lights are showing</string>
|
||||
<string name="ambient_notification_light_timeout_title">Timeout</string>
|
||||
<string name="ambient_notification_light_timeout_forever">Forever</string>
|
||||
<string name="ambient_notification_light_timeout_half_minute">30 seconds</string>
|
||||
<string name="ambient_notification_light_timeout_minute">1 minute</string>
|
||||
<string name="ambient_notification_light_timeout_three_minutes">3 minutes</string>
|
||||
<string name="ambient_notification_light_timeout_five_minutes">5 minutes</string>
|
||||
<string name="ambient_notification_light_timeout_ten_minutes">10 minutes</string>
|
||||
|
||||
<!-- Edge Light -->
|
||||
<string name="pulse_ambient_light_width_title">Light width</string>
|
||||
|
||||
<!-- Pulse Light Layout Style -->
|
||||
<string name="pulse_light_layout_style_title">Light Layout Style</string>
|
||||
<string name="pulse_light_both">All Four Sides</string>
|
||||
<string name="pulse_light_top_bottom">Only Top-Bottom</string>
|
||||
<string name="pulse_light_left_right">Only Left-Right</string>
|
||||
|
||||
<!-- Ambient Customization -->
|
||||
<string name="ambient_text_category">Text Customization</string>
|
||||
<string name="ambient_image_category">Image Customization</string>
|
||||
<string name="ambient_text_category_title">Ambient-AOD Customization</string>
|
||||
<string name="ambient_text_category_summary">Customizing the looks of ambient-aod</string>
|
||||
<string name="ambient_text_title">Ambient Text</string>
|
||||
<string name="ambient_text_summary">Show Ambient Text in AoD</string>
|
||||
<string name="ambient_text_animation_title">Ambient Text Animation</string>
|
||||
<string name="ambient_text_animation_summary">Show a Animation when show AoD</string>
|
||||
<string name="ambient_text_size_title">Ambient Text Size</string>
|
||||
<string name="ambient_text_font_title">Ambient Text Font</string>
|
||||
<string name="ambient_text_string_title">Set Ambient Text</string>
|
||||
<string name="ambient_text_align_title">Ambient Text Align</string>
|
||||
<string name="ambient_text_align_start_top">Right n Top</string>
|
||||
<string name="ambient_text_align_start_center">Right n Center</string>
|
||||
<string name="ambient_text_align_start_bottom">Right n Bottom</string>
|
||||
<string name="ambient_text_align_center">Center</string>
|
||||
<string name="ambient_text_align_end_top">Left n Top</string>
|
||||
<string name="ambient_text_align_end_center">Left n Center</string>
|
||||
<string name="ambient_text_align_end_bottom">Left n Bottom</string>
|
||||
<string name="ambient_text_type_color_title">Ambient Text Type Color</string>
|
||||
<string name="ambient_text_color_title">Ambient Text Color</string>
|
||||
<string name="ambient_notification_light_color_mode_accent">System accent color</string>
|
||||
<string name="ambient_notification_light_color_mode_custom">Custom color</string>
|
||||
<string name="ambient_notification_light_color_mode_wall">Wallpaper color</string>
|
||||
<string name="ambient_image_title">Ambient Image</string>
|
||||
<string name="file_header_select_title">Select local image</string>
|
||||
<string name="file_header_select_summary">Select image from storage(recommended use Gallery Go)</string>
|
||||
|
||||
<!-- Black theme -->
|
||||
<string name="system_black_theme_title">Vivid Colors</string>
|
||||
<string name="system_black_theme_summary">Use colorful and darker monet shades</string>
|
||||
|
||||
<!-- Fingerprint authentication vibration -->
|
||||
<string name="fprint_error_vib_title">Fingerprint error vibration</string>
|
||||
<string name="fprint_error_vib_summary">Vibrate on error fingerprint authentication</string>
|
||||
<string name="fprint_success_vib_title">Fingerprint authentication vibration</string>
|
||||
<string name="fprint_success_vib_summary">Vibrate on successful fingerprint authentication</string>
|
||||
|
||||
<!-- Smart Pixels -->
|
||||
<string name="smart_pixels_warning_text">Smart pixels is a power saving feature. Depending on how many pixels you decide to turn off, you could see improvement in battery life. Note that in some cases it can result in unresponsive areas on touch screen</string>
|
||||
<string name="smart_pixels_title">Smart Pixels</string>
|
||||
<string name="smart_pixels_summary">Save battery by shutting off extra pixels</string>
|
||||
<string name="smart_pixels_enable_title">Enable Smart Pixels</string>
|
||||
<string name="smart_pixels_enable_summary">Shut off pixels to reduce power consumption</string>
|
||||
<string name="smart_pixels_on_power_save_title">Auto-enable on battery saver</string>
|
||||
<string name="smart_pixels_on_power_save_summary">Enable Smart Pixels when battery saver is enabled</string>
|
||||
<string name="smart_pixels_percent">Percent of pixels to disable</string>
|
||||
<string name="smart_pixels_shift_title">Burn-in protection</string>
|
||||
<string name="smart_pixels_shift_summary">Prevents burn-in on OLED devices by shifting pixels every so often</string>
|
||||
|
||||
<!-- Combined signal icons in status bar -->
|
||||
<string name="combined_status_bar_signal_icons_title">Combined signal icons</string>
|
||||
<string name="combined_status_bar_signal_icons_summary">Enable combined signal icons\n(WARNING: a soft reboot will occur upon enabling combined signal icons)</string>
|
||||
|
||||
<!-- Monet settings -->
|
||||
<string name="monet_settings_title">Monet theming</string>
|
||||
<string name="monet_settings_sammary">A few extra settings to customize monet engine</string>
|
||||
<string name="theme_style_title">Theme style</string>
|
||||
<string name="theme_style_tonal_spot">Tonal Spot (Default)</string>
|
||||
<string name="theme_style_vibrant">Vibrant</string>
|
||||
<string name="theme_style_expressive">Exspressive</string>
|
||||
<string name="theme_style_spritz">Spritz</string>
|
||||
<string name="theme_style_rainbow">Rainbow</string>
|
||||
<string name="theme_style_fruit_salad">Fruit Salad</string>
|
||||
<string name="theme_style_muted">Muted</string>
|
||||
<string name="theme_style_content">Content</string>
|
||||
<string name="theme_style_monochromatic">Monochromatic</string>
|
||||
<string name="color_source_title">Color source</string>
|
||||
<string name="color_source_both">Both (Default)</string>
|
||||
<string name="color_source_home">Home wallpaper</string>
|
||||
<string name="color_source_lock">Lock wallpaper</string>
|
||||
<string name="color_source_preset">Preset</string>
|
||||
<string name="accent_color_title">Accent Color</string>
|
||||
<string name="accent_color_summary">Override default accent color</string>
|
||||
<string name="accent_background_title">Accent background</string>
|
||||
<string name="accent_background_summary">Choose a different accent color for background</string>
|
||||
<string name="bg_color_title">Background Color</string>
|
||||
<string name="bg_color_summary">Override default background accent color</string>
|
||||
<string name="luminance_factor_title">Luminance</string>
|
||||
<string name="luminance_factor_summary">Higher values produce brighter colors</string>
|
||||
<string name="chroma_factor_title">Chroma</string>
|
||||
<string name="chroma_factor_summary">Higher values produce stronger colors</string>
|
||||
<string name="tint_background_title">Tint Background</string>
|
||||
<string name="tint_background_summary">Make Luminance and Chroma selection affect background colors as well</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -23,4 +23,46 @@
|
||||
<dimen name="fod_picker_item_padding">20dp</dimen>
|
||||
|
||||
<color name="option_border_default">#5f6368</color>
|
||||
|
||||
<style name="ColorPickerStyle" parent="Theme.MaterialComponents.BottomSheetDialog">
|
||||
<item name="colorPrimary">@*android:color/surface_highlight_light</item>
|
||||
<item name="colorPrimaryDark">@*android:color/primary_device_default_dark</item>
|
||||
<item name="colorAccent">@*android:color/accent_device_default_light</item>
|
||||
<item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item>
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPickerSeekBarStyle" parent="Widget.AppCompat.SeekBar">
|
||||
<item name="android:layout_marginTop">30dp</item>
|
||||
<item name="android:paddingStart">16dp</item>
|
||||
<item name="android:paddingEnd">18dp</item>
|
||||
<item name="android:maxHeight">8dp</item>
|
||||
<item name="android:progressDrawable">@drawable/color_picker_seekbar_background</item>
|
||||
<item name="android:thumb">@drawable/color_picker_seekbar_thumb</item>
|
||||
<item name="android:splitTrack">false</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPickerRadioButtonStyle">
|
||||
<item name="android:paddingTop">12dp</item>
|
||||
<item name="android:paddingBottom">12dp</item>
|
||||
<item name="android:buttonTint">?android:attr/colorAccent</item>
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPickerButtonStyle">
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
<item name="android:minWidth">0dp</item>
|
||||
<item name="android:minHeight">0dp</item>
|
||||
<item name="android:padding">8dp</item>
|
||||
<item name="android:textColor">?android:attr/textColorSecondary</item>
|
||||
</style>
|
||||
|
||||
<style name="ColorPickerEditTextStyle">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:inputType">textCapCharacters|textNoSuggestions</item>
|
||||
<item name="android:importantForAutofill">no</item>
|
||||
<item name="android:textCursorDrawable">@null</item>
|
||||
<item name="android:imeOptions">actionDone</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
94
res/xml/cherish_ambient_customization.xml
Normal file
94
res/xml/cherish_ambient_customization.xml
Normal file
@@ -0,0 +1,94 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2017 - 2021 The Project-Xtended
|
||||
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/ambient_text_category_title">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/ambient_text_category" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="ambient_text"
|
||||
android:title="@string/ambient_text_title"
|
||||
android:summary="@string/ambient_text_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="ambient_text_animation"
|
||||
android:title="@string/ambient_text_animation_title"
|
||||
android:summary="@string/ambient_text_animation_summary"
|
||||
android:dependency="ambient_text"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingEditTextPreference
|
||||
android:key="ambient_text_string"
|
||||
android:title="@string/ambient_text_string_title"
|
||||
android:dependency="ambient_text"
|
||||
android:defaultValue="#Welcome To Cherish" />
|
||||
|
||||
<ListPreference
|
||||
android:key="ambient_text_type_color"
|
||||
android:title="@string/ambient_text_type_color_title"
|
||||
android:dialogTitle="@string/ambient_text_type_color_title"
|
||||
android:entries="@array/ambient_text_type_color_entries"
|
||||
android:entryValues="@array/ambient_text_type_color_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0"
|
||||
android:dependency="ambient_text"
|
||||
android:persistent="false" />
|
||||
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="ambient_text_color"
|
||||
android:title="@string/ambient_text_color_title"
|
||||
android:persistent="false"
|
||||
settings:defaultColorValue="0xFF880000" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||
android:key="ambient_text_size"
|
||||
android:title="@string/ambient_text_size_title"
|
||||
android:max="100"
|
||||
android:min="1"
|
||||
android:dependency="ambient_text"
|
||||
settings:units="dp"
|
||||
android:defaultValue="30" />
|
||||
|
||||
<ListPreference
|
||||
android:key="ambient_text_alignment"
|
||||
android:title="@string/ambient_text_align_title"
|
||||
android:summary="%s"
|
||||
android:dialogTitle="@string/ambient_text_align_title"
|
||||
android:entries="@array/ambient_text_alignment_entries"
|
||||
android:entryValues="@array/ambient_text_alignment_values"
|
||||
android:defaultValue="3"
|
||||
android:dependency="ambient_text"
|
||||
android:persistent="false" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/ambient_image_category" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="ambient_image"
|
||||
android:title="@string/ambient_image_title"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<Preference
|
||||
android:key="file_ambient_select"
|
||||
android:title="@string/file_header_select_title"
|
||||
android:summary="@string/file_header_select_summary"
|
||||
android:persistent="false"
|
||||
android:dependency="ambient_image" >
|
||||
</Preference>
|
||||
|
||||
</PreferenceScreen>
|
||||
@@ -353,6 +353,15 @@
|
||||
android:data="https://t.me/bruh_its_your_brother" />
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
android:title="@string/grus_maintainer"
|
||||
android:summary="@string/device_grus"
|
||||
android:icon="@drawable/ic_devs_phone" >
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="https://t.me/Tkiliay" />
|
||||
</Preference>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
@@ -462,9 +471,18 @@
|
||||
android:icon="@drawable/ic_devs_phone" >
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="https://t.me/P_AA_ii_N" />
|
||||
android:data="https://t.me/EvilAnsh" />
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
android:title="@string/RMX3461_maintainer"
|
||||
android:summary="@string/device_RMX3461"
|
||||
android:icon="@drawable/ic_devs_phone">
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="https://t.me/DRvP00" />
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
android:title="@string/RMX1971_maintainer"
|
||||
android:summary="@string/device_RMX1971"
|
||||
@@ -581,4 +599,18 @@
|
||||
android:data="https://t.me/Iris041" />
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="samsung_devices"
|
||||
android:title="@string/samsung_devices" >
|
||||
|
||||
<Preference
|
||||
android:title="@string/s10_n10_series_maintainer"
|
||||
android:summary="@string/device_s10_n10_series"
|
||||
android:icon="@drawable/ic_devs_phone" >
|
||||
<intent
|
||||
android:action="android.intent.action.VIEW"
|
||||
android:data="https://t.me/FreeRunner4ever" />
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
||||
@@ -20,4 +20,42 @@
|
||||
android:title="@string/animations_title"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings" >
|
||||
|
||||
<ListPreference
|
||||
android:key="power_menu_animations"
|
||||
android:title="@string/power_menu_animation_title"
|
||||
android:dialogTitle="@string/power_menu_animation_dialog_title"
|
||||
android:entries="@array/power_menu_animations_entries"
|
||||
android:entryValues="@array/power_menu_animations_values"
|
||||
android:summary="%s"
|
||||
android:persistent="false" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/qs_tile_animation_category_title">
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingIntListPreference
|
||||
android:key="anim_tile_style"
|
||||
android:title="@string/qs_tile_animation_style_title"
|
||||
android:entries="@array/qs_tile_animation_style_entries"
|
||||
android:entryValues="@array/qs_tile_animation_style_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingIntListPreference
|
||||
android:key="anim_tile_duration"
|
||||
android:title="@string/qs_tile_animation_duration_title"
|
||||
android:entries="@array/qs_tile_animation_duration_entries"
|
||||
android:entryValues="@array/qs_tile_animation_duration_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="2000" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingIntListPreference
|
||||
android:key="anim_tile_interpolator"
|
||||
android:title="@string/qs_tile_animation_interpolator_title"
|
||||
android:entries="@array/qs_tile_animation_interpolator_entries"
|
||||
android:entryValues="@array/qs_tile_animation_interpolator_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
android:summary="@string/double_tap_sleep_lockscreen_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<ListPreference
|
||||
android:key="torch_power_button_gesture"
|
||||
android:title="@string/torch_power_button_gesture_title"
|
||||
android:entries="@array/torch_power_button_gesture_entries"
|
||||
android:entryValues="@array/torch_power_button_gesture_values" />
|
||||
|
||||
<com.cherish.settings.preferences.SecureSettingSwitchPreference
|
||||
android:key="power_menu_hide_on_secure"
|
||||
android:title="@string/power_menu_hide_on_secure_title"
|
||||
@@ -59,6 +65,30 @@
|
||||
android:summary="@string/udfps_settings_summary"
|
||||
android:fragment="com.cherish.settings.fragments.Udfps" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="enable_ripple_effect"
|
||||
android:title="@string/enable_fingerprint_ripple_effect_title"
|
||||
android:summary="@string/enable_fingerprint_ripple_effect_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="lockscreen_ui_finterprint_category"
|
||||
android:title="@string/fingerprint_category">
|
||||
|
||||
<SwitchPreference
|
||||
android:key="fingerprint_success_vib"
|
||||
android:title="@string/fprint_success_vib_title"
|
||||
android:summary="@string/fprint_success_vib_summary"
|
||||
android:persistent="true" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="fingerprint_error_vib"
|
||||
android:title="@string/fprint_error_vib_title"
|
||||
android:summary="@string/fprint_error_vib_summary"
|
||||
android:persistent="true" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
@@ -69,7 +99,7 @@
|
||||
android:key="lockscreen_media_metadata"
|
||||
android:title="@string/media_art_title"
|
||||
android:summary="@string/media_art_summary"
|
||||
android:defaultValue="true" />
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="lockscreen_albumart_filter"
|
||||
@@ -79,12 +109,19 @@
|
||||
android:dependency="lockscreen_media_metadata"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||
<!-- 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"
|
||||
android:title="@string/lockscreen_albumart_filter_blur_radius_title"
|
||||
android:defaultValue="10"
|
||||
android:max="25"
|
||||
settings:min="1" />
|
||||
settings:min="1" /> -->
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
|
||||
@@ -31,6 +31,20 @@
|
||||
android:summary="@string/laboratory_ignore_window_secure_summary"
|
||||
android:defaultValue="false"/>
|
||||
|
||||
<!-- Smart Charging -->
|
||||
<Preference
|
||||
android:key="smart_charging"
|
||||
android:title="@string/smart_charging_title"
|
||||
android:summary="@string/smart_charging_summary"
|
||||
android:fragment="com.cherish.settings.fragments.SmartCharging"/>
|
||||
|
||||
<!-- Smart Pixels -->
|
||||
<Preference
|
||||
android:key="smart_pixels"
|
||||
android:title="@string/smart_pixels_title"
|
||||
android:summary="@string/smart_pixels_summary"
|
||||
android:fragment="com.cherish.settings.fragments.SmartPixels" />
|
||||
|
||||
<!-- Unlock FPS for specific games -->
|
||||
<SwitchPreference
|
||||
android:key="use_games_spoof"
|
||||
@@ -43,4 +57,10 @@
|
||||
android:title="@string/use_photos_spoof_title"
|
||||
android:summary="@string/use_photos_spoof_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="click_partial_screenshot"
|
||||
android:title="@string/click_partial_screenshot_title"
|
||||
android:summary="@string/click_partial_screenshot_summary"
|
||||
android:defaultValue="false" />
|
||||
</PreferenceScreen>
|
||||
|
||||
@@ -18,36 +18,128 @@
|
||||
android:title="@string/notifications_title"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
|
||||
|
||||
<!-- <PreferenceCategory
|
||||
android:key="incall_vib_options"
|
||||
android:title="@string/incall_vibration_category">
|
||||
<PreferenceCategory
|
||||
android:key="pulse_ambient_light_category"
|
||||
android:title="@string/pulse_ambient_light_category" >
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="vibrate_on_connect"
|
||||
android:icon="@drawable/ic_vibrate"
|
||||
android:title="@string/incall_vibrate_connect_title"
|
||||
android:defaultValue="true" />
|
||||
android:key="pulse_ambient_light"
|
||||
android:title="@string/pulse_ambient_light_title"
|
||||
android:summary="@string/pulse_ambient_light_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="vibrate_on_callwaiting"
|
||||
android:icon="@drawable/ic_vibrate"
|
||||
android:title="@string/incall_vibrate_call_wait_title"
|
||||
android:defaultValue="true" />
|
||||
android:key="ambient_light_pulse_for_all"
|
||||
android:title="@string/pulse_ambient_light_show_always_title"
|
||||
android:summary="@string/pulse_ambient_light_show_always_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="vibrate_on_disconnect"
|
||||
android:icon="@drawable/ic_vibrate"
|
||||
android:title="@string/incall_vibrate_disconnect_title"
|
||||
android:defaultValue="true" />
|
||||
android:key="ambient_notification_light_enabled"
|
||||
android:title="@string/ambient_notification_light_enabled_title"
|
||||
android:summary="@string/ambient_notification_light_enabled_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
</PreferenceCategory> -->
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="ambient_notification_light_hide_aod"
|
||||
android:title="@string/ambient_notification_light_hide_aod_title"
|
||||
android:summary="@string/ambient_notification_light_hide_aod_summary"
|
||||
android:defaultValue="false"
|
||||
android:dependency="ambient_notification_light_enabled" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="ambient_notification_color_mode"
|
||||
android:title="@string/pulse_ambient_light_color_mode_title"
|
||||
android:entries="@array/pulse_ambient_light_color_mode_entries"
|
||||
android:entryValues="@array/pulse_ambient_light_color_mode_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="ambient_notification_light_color"
|
||||
android:title="@string/pulse_ambient_light_color_title"
|
||||
android:defaultValue="0xFFFFFFFF" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="pulse_light_layout_style"
|
||||
android:title="@string/pulse_light_layout_style_title"
|
||||
android:entries="@array/pulse_light_layout_style_entries"
|
||||
android:entryValues="@array/pulse_light_layout_style_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="ambient_light_layout"
|
||||
android:title="@string/pulse_ambient_light_layout_title"
|
||||
android:entries="@array/pulse_ambient_light_layout_entries"
|
||||
android:entryValues="@array/pulse_ambient_light_layout_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="1" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||
android:key="pulse_ambient_light_width"
|
||||
android:title="@string/pulse_ambient_light_width_title"
|
||||
android:max="150"
|
||||
android:min="1"
|
||||
settings:unitsLeft=""
|
||||
settings:unitsRight="px"
|
||||
android:defaultValue="125" />
|
||||
|
||||
<com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="ambient_notification_light_duration"
|
||||
android:title="@string/pulse_ambient_light_duration_title"
|
||||
android:max="5"
|
||||
settings:min="1"
|
||||
settings:defaultValue="2"
|
||||
settings:units="sec" />
|
||||
|
||||
<com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="ambient_notification_light_repeats"
|
||||
android:title="@string/pulse_ambient_light_repeat_count_title"
|
||||
android:max="10"
|
||||
settings:min="0"
|
||||
settings:defaultValue="0" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="ambient_light_repeat_direction"
|
||||
android:title="@string/pulse_ambient_light_repeat_direction_title"
|
||||
android:entries="@array/pulse_ambient_light_repeat_direction_entries"
|
||||
android:entryValues="@array/pulse_ambient_light_repeat_direction_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="ambient_notification_light_timeout"
|
||||
android:title="@string/ambient_notification_light_timeout_title"
|
||||
android:entries="@array/ambient_notification_light_timeout_entries"
|
||||
android:entryValues="@array/ambient_notification_light_timeout_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<Preference
|
||||
android:key="ambient_customization"
|
||||
android:title="@string/ambient_text_category_title"
|
||||
android:summary="@string/ambient_text_category_summary"
|
||||
android:fragment="com.cherish.settings.fragments.AmbientCustomizations" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<Preference
|
||||
android:key="charging_light"
|
||||
android:fragment="com.cherish.settings.fragments.BatteryLightSettings"
|
||||
android:title="@string/battery_light_settings" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
<PreferenceCategory
|
||||
android:key="notifications_category"
|
||||
android:title="@string/notifications_category_title">
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="less_boring_heads_up"
|
||||
android:title="@string/less_boring_heads_up_title"
|
||||
android:summary="@string/less_boring_heads_up_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="notification_sound_vib_screen_on"
|
||||
android:title="@string/notification_sound_vib_screen_on_title"
|
||||
android:summary="@string/notification_sound_vib_screen_on_summary"
|
||||
@@ -73,6 +165,21 @@
|
||||
android:summary="@string/toast_icon_summary"
|
||||
android:defaultValue="true"/>
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="reticker_status"
|
||||
android:title="@string/reticker_title"
|
||||
android:summary="@string/reticker_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:dependency="reticker_status"
|
||||
android:key="reticker_colored"
|
||||
android:title="@string/reticker_colored_title"
|
||||
android:summary="@string/reticker_colored_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="incall_vib_options"
|
||||
android:title="@string/incall_vibration_category" >
|
||||
@@ -93,4 +200,5 @@
|
||||
android:defaultValue="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
@@ -18,6 +18,20 @@
|
||||
android:title="@string/powermenu_title"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||
android:key="transparent_power_menu"
|
||||
android:title="@string/power_menu_transparency"
|
||||
android:max="100"
|
||||
android:min="0"
|
||||
android:defaultValue="100" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||
android:key="transparent_power_dialog_dim"
|
||||
android:title="@string/power_menu_dialog_dim"
|
||||
android:max="100"
|
||||
android:min="0"
|
||||
android:defaultValue="50" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="powermenu_power"
|
||||
android:title="@string/powermenu_power"
|
||||
|
||||
@@ -66,4 +66,28 @@
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/qs_footer_category">
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="qs_footer_data_usage"
|
||||
android:title="@string/qs_footer_datausage_title"
|
||||
android:summary="@string/qs_footer_datausage_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="qs_layout_category"
|
||||
android:title="@string/qs_layout_category_title">
|
||||
|
||||
<Preference
|
||||
android:key="qs_tile_layout"
|
||||
android:icon="@drawable/ic_qs_tile"
|
||||
android:title="@string/qs_tile_layout_title"
|
||||
android:summary="@string/qs_tile_layout_summary"
|
||||
android:fragment="com.cherish.settings.fragments.QsTileLayoutSettings" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
56
res/xml/cherish_settings_smart_pixels.xml
Normal file
56
res/xml/cherish_settings_smart_pixels.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2018-2022 crDroid Android 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/smart_pixels_title" >
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="smart_pixels_enable"
|
||||
android:title="@string/smart_pixels_enable_title"
|
||||
android:summary="@string/smart_pixels_enable_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="smart_pixels_pattern"
|
||||
android:entries="@array/smart_pixels_percent_strings"
|
||||
android:entryValues="@array/smart_pixels_percent_values"
|
||||
android:defaultValue="5"
|
||||
android:dependency="smart_pixels_enable"
|
||||
android:title="@string/smart_pixels_percent"
|
||||
android:dialogTitle="@string/smart_pixels_percent" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="smart_pixels_on_power_save"
|
||||
android:title="@string/smart_pixels_on_power_save_title"
|
||||
android:summary="@string/smart_pixels_on_power_save_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="smart_pixels_shift_timeout"
|
||||
android:entries="@array/smart_pixels_shift_times"
|
||||
android:entryValues="@array/smart_pixels_shift_values"
|
||||
android:defaultValue="4"
|
||||
android:title="@string/smart_pixels_shift_title"
|
||||
android:summary="@string/smart_pixels_shift_summary"
|
||||
android:dialogTitle="@string/smart_pixels_shift_title" />
|
||||
|
||||
<com.android.settingslib.widget.FooterPreference
|
||||
android:key="smart_pixels_footer"
|
||||
android:selectable="false"
|
||||
settings:searchable="false" />
|
||||
</PreferenceScreen>
|
||||
86
res/xml/cherish_settings_status_bar_clock.xml
Normal file
86
res/xml/cherish_settings_status_bar_clock.xml
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2019-2022 The CherishOS Projects
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:title="@string/status_bar_clock_title">
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="status_bar_clock_auto_hide_launcher"
|
||||
android:title="@string/status_bar_clock_auto_hide_title"
|
||||
android:summary="@string/status_bar_clock_auto_hide_launcher_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="status_bar_clock_auto_hide"
|
||||
android:title="@string/status_bar_clock_auto_hide_title"
|
||||
android:summary="@string/status_bar_clock_auto_hide_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||
android:key="status_bar_clock_auto_hide_hduration"
|
||||
android:title="@string/status_bar_clock_auto_hide_hdur_title"
|
||||
android:summary="@string/status_bar_clock_auto_hide_hdur_summary"
|
||||
android:max="300"
|
||||
settings:min="5"
|
||||
settings:interval="5"
|
||||
android:dependency="status_bar_clock_auto_hide"
|
||||
android:defaultValue="60"
|
||||
settings:units="@string/unit_seconds" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||
android:key="status_bar_clock_auto_hide_sduration"
|
||||
android:title="@string/status_bar_clock_auto_hide_sdur_title"
|
||||
android:summary="@string/status_bar_clock_auto_hide_sdur_summary"
|
||||
android:max="300"
|
||||
settings:min="5"
|
||||
settings:interval="5"
|
||||
android:dependency="status_bar_clock_auto_hide"
|
||||
android:defaultValue="5"
|
||||
settings:units="@string/unit_seconds" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="status_bar_clock_seconds"
|
||||
android:title="@string/status_bar_clock_seconds_title"
|
||||
android:summary="@string/status_bar_clock_seconds_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="status_bar_am_pm"
|
||||
android:title="@string/status_bar_am_pm_title"
|
||||
android:summary="%s"
|
||||
android:dialogTitle="@string/status_bar_am_pm_title"
|
||||
android:entries="@array/status_bar_am_pm_entries"
|
||||
android:entryValues="@array/status_bar_am_pm_values"
|
||||
android:defaultValue="2" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="status_bar_clock_date_display"
|
||||
android:title="@string/status_bar_date_title"
|
||||
android:entries="@array/status_bar_date_entries"
|
||||
android:entryValues="@array/status_bar_date_values"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="status_bar_clock_date_position"
|
||||
android:title="@string/clock_date_position"
|
||||
android:entries="@array/clock_date_position_entries"
|
||||
android:entryValues="@array/clock_date_position_values"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="status_bar_clock_date_style"
|
||||
android:title="@string/status_bar_date_style"
|
||||
android:entries="@array/status_bar_date_style_entries"
|
||||
android:entryValues="@array/status_bar_date_style_values"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<ListPreference
|
||||
android:key="status_bar_clock_date_format"
|
||||
android:title="@string/status_bar_date_format_title"
|
||||
android:entries="@array/status_bar_date_format_entries_values"
|
||||
android:entryValues="@array/status_bar_date_format_entries_values" />
|
||||
</PreferenceScreen>
|
||||
@@ -27,11 +27,13 @@
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="statusbar_clock_chip"
|
||||
android:title="@string/statusbar_clock_chip_title"
|
||||
android:summary="@string/statusbar_clock_chip_summary"
|
||||
android:defaultValue="false" />
|
||||
android:entries="@array/statusbar_clock_chip_entries"
|
||||
android:entryValues="@array/statusbar_clock_chip_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<Preference
|
||||
android:key="network_traffic_settings"
|
||||
@@ -48,6 +50,21 @@
|
||||
<PreferenceCategory
|
||||
android:title="@string/status_bar_icons_category_title">
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="status_bar_clock"
|
||||
android:title="@string/status_bar_clock_position_title"
|
||||
android:summary="%s"
|
||||
android:dialogTitle="@string/status_bar_clock_position_title"
|
||||
android:entries="@array/status_bar_clock_position_entries"
|
||||
android:entryValues="@array/status_bar_clock_position_values"
|
||||
android:defaultValue="2" />
|
||||
|
||||
<Preference
|
||||
android:key="clock"
|
||||
android:title="@string/status_bar_clock_title"
|
||||
android:summary="@string/status_bar_clock_summary"
|
||||
android:fragment="com.cherish.settings.fragments.Clock" />
|
||||
|
||||
<Preference
|
||||
android:key="status_bar_icons"
|
||||
android:title="@string/status_bar_icons_title"
|
||||
@@ -63,20 +80,27 @@
|
||||
android:summary="@string/data_disabled_icon_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="show_volte_icon"
|
||||
android:title="@string/volte_switch_title"
|
||||
android:summary="@string/volte_switch_summary"
|
||||
android:defaultValue="true" />
|
||||
<com.cherish.settings.preferences.SystemPropertySwitchPreference
|
||||
android:key="persist.sys.flags.combined_signal_icons"
|
||||
android:title="@string/combined_status_bar_signal_icons_title"
|
||||
android:summary="@string/combined_status_bar_signal_icons_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="volte_icon_style"
|
||||
android:title="@string/volte_icon_style_title"
|
||||
android:entries="@array/volte_icon_type_entries"
|
||||
android:entryValues="@array/volte_icon_type_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0"
|
||||
android:dependency="show_volte_icon"/>
|
||||
android:key="volte_icon_style"
|
||||
android:title="@string/volte_icon_style_title"
|
||||
android:entries="@array/volte_icon_type_entries"
|
||||
android:entryValues="@array/volte_icon_type_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="1"/>
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="vowifi_icon_style"
|
||||
android:title="@string/vowifi_icon_title"
|
||||
android:entries="@array/vowifi_icon_type_entries"
|
||||
android:entryValues="@array/vowifi_icon_type_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="1"/>
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="use_old_mobiletype"
|
||||
@@ -96,13 +120,42 @@
|
||||
android:summary="@string/roaming_indicator_icon_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<!-- Birghtness control -->
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="status_bar_brightness_control"
|
||||
android:title="@string/status_bar_brightness_control_title"
|
||||
android:summary="@string/status_bar_brightness_control_summary"
|
||||
<com.cherish.settings.preferences.SecureSettingSwitchPreference
|
||||
android:key="enable_camera_privacy_indicator"
|
||||
android:title="@string/mic_camera_privacy_indicator_title"
|
||||
android:summary="@string/mic_camera_privacy_indicator_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<com.cherish.settings.preferences.SecureSettingSwitchPreference
|
||||
android:key="enable_location_privacy_indicator"
|
||||
android:title="@string/location_privacy_indicator_title"
|
||||
android:summary="@string/location_privacy_indicator_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<com.cherish.settings.preferences.SecureSettingSwitchPreference
|
||||
android:key="enable_projection_privacy_indicator"
|
||||
android:title="@string/projection_privacy_indicator_title"
|
||||
android:summary="@string/projection_privacy_indicator_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="statusbar_notif_count"
|
||||
android:title="@string/statusbar_notif_count_title"
|
||||
android:summary="@string/statusbar_notif_count_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="statusbar_colored_icons"
|
||||
android:title="@string/statusbar_colored_icons_title"
|
||||
android:summary="@string/statusbar_colored_icons_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="bluetooth_show_battery"
|
||||
android:title="@string/bluetooth_battery_title"
|
||||
android:summary="@string/bluetooth_battery_summary"
|
||||
android:defaultValue="true"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
@@ -60,6 +60,37 @@
|
||||
android:fragment="com.android.settings.display.darkmode.DarkModeSettingsFragment"
|
||||
settings:controller="com.android.settings.display.DarkUIPreferenceController" />
|
||||
|
||||
<!-- Monet settings -->
|
||||
<Preference
|
||||
android:key="monet_settings"
|
||||
android:title="@string/monet_settings_title"
|
||||
android:summary="@string/monet_settings_sammary"
|
||||
android:fragment="com.cherish.settings.fragments.MonetSettings" />
|
||||
|
||||
<Preference
|
||||
android:key="android.theme.customization.lockscreen_clock_font"
|
||||
android:title="@string/theme_customization_lock_clock_title"
|
||||
android:summary="@string/theme_customization_lock_clock_summary"
|
||||
android:fragment="com.cherish.settings.fragments.ui.LockClockFonts"/>
|
||||
|
||||
<!-- QS style -->
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="qs_panel_style"
|
||||
android:title="@string/qs_styles_title"
|
||||
android:dialogTitle="@string/qs_styles_title"
|
||||
android:entries="@array/qs_styles_entries"
|
||||
android:entryValues="@array/qs_styles_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<!-- Black Theme -->
|
||||
<com.cherish.settings.preferences.SecureSettingSwitchPreference
|
||||
android:key="system_black_theme"
|
||||
android:title="@string/system_black_theme_title"
|
||||
android:summary="@string/system_black_theme_summary"
|
||||
android:dependency="dark_ui_mode"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<!-- Font style -->
|
||||
<Preference
|
||||
android:key="android.theme.customization.font"
|
||||
|
||||
@@ -14,4 +14,25 @@
|
||||
android:summary="@string/udfps_haptic_feedback_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<!-- Screen OFF FOD -->
|
||||
<com.cherish.settings.preferences.SecureSettingSwitchPreference
|
||||
android:key="screen_off_udfps_enabled"
|
||||
android:title="@string/screen_off_udfps_title"
|
||||
android:summary="@string/screen_off_udfps_summary"
|
||||
android:defaultValue="false"
|
||||
settings:controller="com.android.settings.security.UdfpsGesturePreferenceController" />
|
||||
|
||||
<!-- UDFPS ICON PICKER -->
|
||||
<Preference
|
||||
android:key="udfps_icon_picker"
|
||||
android:title="@string/udfps_icon_picker_title"
|
||||
android:summary="@string/udfps_icon_picker_summary"
|
||||
android:fragment="com.cherish.settings.fragments.UdfpsIconPicker" />
|
||||
|
||||
<!-- UDFPS ANIMATIONS -->
|
||||
<Preference
|
||||
android:key="udfps_recognizing_animation_preview"
|
||||
android:title="@string/udfps_recog_animation_effect_title"
|
||||
android:summary="@string/udfps_recog_animation_effect_summary"
|
||||
android:fragment="com.cherish.settings.fragments.UdfpsAnimation" />
|
||||
</PreferenceScreen>
|
||||
|
||||
79
res/xml/monet_settings.xml
Normal file
79
res/xml/monet_settings.xml
Normal file
@@ -0,0 +1,79 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2022 Yet Another AOSP 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"
|
||||
android:title="@string/monet_settings_title"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
|
||||
|
||||
<ListPreference
|
||||
android:key="theme_style"
|
||||
android:title="@string/theme_style_title"
|
||||
android:entries="@array/theme_style_entries"
|
||||
android:entryValues="@array/theme_style_values"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<ListPreference
|
||||
android:key="color_source"
|
||||
android:title="@string/color_source_title"
|
||||
android:entries="@array/color_source_entries"
|
||||
android:entryValues="@array/color_source_values"
|
||||
android:defaultValue="0" />
|
||||
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="accent_color"
|
||||
android:title="@string/accent_color_title"
|
||||
android:summary="@string/accent_color_summary" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="accent_background"
|
||||
android:title="@string/accent_background_title"
|
||||
android:summary="@string/accent_background_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<net.margaritov.preference.colorpicker.ColorPickerPreference
|
||||
android:key="bg_color"
|
||||
android:title="@string/bg_color_title"
|
||||
android:summary="@string/bg_color_summary" />
|
||||
|
||||
<com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="luminance_factor"
|
||||
android:title="@string/luminance_factor_title"
|
||||
android:summary="@string/luminance_factor_summary"
|
||||
android:max="100"
|
||||
settings:min="-95"
|
||||
settings:interval="5"
|
||||
settings:defaultValue="0"
|
||||
settings:units="%"
|
||||
settings:showSign="true" />
|
||||
|
||||
<com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="chroma_factor"
|
||||
android:title="@string/chroma_factor_title"
|
||||
android:summary="@string/chroma_factor_summary"
|
||||
android:max="100"
|
||||
settings:min="-95"
|
||||
settings:interval="5"
|
||||
settings:defaultValue="0"
|
||||
settings:units="%"
|
||||
settings:showSign="true" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="tint_background"
|
||||
android:title="@string/tint_background_title"
|
||||
android:summary="@string/tint_background_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
</PreferenceScreen>
|
||||
183
res/xml/pulse_settings.xml
Normal file
183
res/xml/pulse_settings.xml
Normal file
@@ -0,0 +1,183 @@
|
||||
<?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.SecureSettingListPreference
|
||||
android:key="pulse_custom_gravity"
|
||||
android:title="@string/pulse_custom_gravity_title"
|
||||
android:entries="@array/pulse_custom_gravity_entries"
|
||||
android:entryValues="@array/pulse_custom_gravity_values"
|
||||
android:summary="%s"
|
||||
android:defaultValue="0"/>
|
||||
|
||||
<com.cherish.settings.preferences.SecureSettingSwitchPreference
|
||||
android:key="visualizer_center_mirrored"
|
||||
android:title="@string/visualizer_center_mirrored_title"
|
||||
android:summary="@string/visualizer_center_mirrored_summary"
|
||||
android:defaultValue="false"/>
|
||||
|
||||
<com.cherish.settings.preferences.SecureSettingSwitchPreference
|
||||
android:key="pulse_vertical_mirror"
|
||||
android:title="@string/pulse_vertical_mirror_title"
|
||||
android:summary="@string/pulse_vertical_mirror_summary"
|
||||
android:defaultValue="false"/>
|
||||
|
||||
<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.SecureSettingSwitchPreference
|
||||
android:key="pulse_solid_units_rounded"
|
||||
android:title="@string/pulse_solid_units_rounded_title"
|
||||
android:summary="@string/pulse_solid_units_rounded_summary"
|
||||
android:defaultValue="false"
|
||||
android:dependency="pulse_2"/>
|
||||
|
||||
<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>
|
||||
49
res/xml/qs_tile_layout.xml
Normal file
49
res/xml/qs_tile_layout.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:title="@string/qs_tile_layout_title">
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="qs_tile_label_hide"
|
||||
android:title="@string/qs_tile_hide_label_title"
|
||||
android:summary="@string/qs_tile_hide_label_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="qs_tile_vertical_layout"
|
||||
android:title="@string/qs_tile_vertical_layout_title"
|
||||
android:summary="@string/qs_tile_vertical_layout_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="tiles_layout"
|
||||
android:title="@string/qs_tiles_layout_category">
|
||||
|
||||
<com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="qs_layout_columns"
|
||||
android:title="@string/qs_columns_portrait_title"
|
||||
android:defaultValue="2"
|
||||
android:max="6"
|
||||
settings:min="2" />
|
||||
|
||||
<com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="qs_layout_rows"
|
||||
android:title="@string/qs_rows_portrait_title"
|
||||
android:defaultValue="4"
|
||||
android:max="6"
|
||||
settings:min="2" />
|
||||
|
||||
<com.cherish.settings.preferences.CustomSeekBarPreference
|
||||
android:key="qqs_layout_rows"
|
||||
android:title="@string/qqs_rows_portrait_title"
|
||||
android:defaultValue="2"
|
||||
android:max="5"
|
||||
settings:min="1" />
|
||||
|
||||
<com.android.settingslib.widget.LayoutPreference
|
||||
android:key="apply_change_button"
|
||||
android:layout="@layout/qs_tile_apply_change_button" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
57
res/xml/smart_charging.xml
Normal file
57
res/xml/smart_charging.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2020-2022 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/smart_charging_title">
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="smart_charging"
|
||||
android:title="@string/smart_charging_switch_title"
|
||||
android:summary="@string/smart_charging_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="smart_charging_reset_stats"
|
||||
android:title="@string/smart_charging_reset_stats_title"
|
||||
android:summary="@string/smart_charging_reset_stats_summary"
|
||||
android:defaultValue="false"
|
||||
android:dependency="smart_charging" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||
android:key="smart_charging_level"
|
||||
android:title="@string/smart_charging_level_title"
|
||||
android:max="100"
|
||||
settings:min="65"
|
||||
settings:units="%"
|
||||
android:defaultValue="80"
|
||||
android:dependency="smart_charging" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||
android:key="smart_charging_resume_level"
|
||||
android:title="@string/smart_charging_resume_level_title"
|
||||
android:max="99"
|
||||
settings:min="15"
|
||||
settings:units="%"
|
||||
android:defaultValue="60"
|
||||
android:dependency="smart_charging" />
|
||||
|
||||
<com.android.settingslib.widget.FooterPreference
|
||||
android:key="smart_charging_footer"
|
||||
android:selectable="false"
|
||||
settings:searchable="false"
|
||||
android:dependency="smart_charging" />
|
||||
</PreferenceScreen>
|
||||
@@ -46,7 +46,7 @@
|
||||
</PreferenceCategory>
|
||||
|
||||
<!-- QS panel battery customizations -->
|
||||
<PreferenceCategory
|
||||
<!-- <PreferenceCategory
|
||||
android:title="@string/qs_battery_category_title">
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
@@ -63,6 +63,6 @@
|
||||
android:entryValues="@array/status_bar_battery_percent_values"
|
||||
android:defaultValue="2" />
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceCategory> -->
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
211
src/com/cherish/settings/fragments/AmbientCustomizations.java
Normal file
211
src/com/cherish/settings/fragments/AmbientCustomizations.java
Normal file
@@ -0,0 +1,211 @@
|
||||
/**
|
||||
* Copyright (C) 2014 The Android Open Source 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.cherish.settings.fragments;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.ContentResolver;
|
||||
import android.app.WallpaperManager;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PackageManager.NameNotFoundException;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.content.res.Resources;
|
||||
import android.hardware.fingerprint.FingerprintManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import androidx.preference.SwitchPreference;
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceCategory;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import android.provider.SearchIndexableResource;
|
||||
import android.provider.Settings;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
import android.provider.SearchIndexableResource;
|
||||
|
||||
import com.cherish.settings.preferences.CustomSeekBarPreference;
|
||||
import com.cherish.settings.preferences.SystemSettingListPreference;
|
||||
import com.cherish.settings.preferences.SystemSettingEditTextPreference;
|
||||
import net.margaritov.preference.colorpicker.ColorPickerPreference;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
|
||||
public class AmbientCustomizations extends SettingsPreferenceFragment implements
|
||||
Preference.OnPreferenceChangeListener {
|
||||
|
||||
private static final String AMBIENT_TEXT_STRING = "ambient_text_string";
|
||||
private static final String AMBIENT_TEXT_ALIGNMENT = "ambient_text_alignment";
|
||||
private static final String AMBIENT_TEXT_TYPE_COLOR = "ambient_text_type_color";
|
||||
private static final String AMBIENT_TEXT_COLOR = "ambient_text_color";
|
||||
private static final String FILE_AMBIENT_SELECT = "file_ambient_select";
|
||||
|
||||
private static final int REQUEST_PICK_IMAGE = 0;
|
||||
|
||||
private SystemSettingEditTextPreference mAmbientText;
|
||||
private ListPreference mAmbientTextAlign;
|
||||
private ListPreference mAmbientTextFonts;
|
||||
private ListPreference mAmbientTextTypeColor;
|
||||
private ColorPickerPreference mAmbientTextColor;
|
||||
|
||||
private Preference mAmbientImage;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
|
||||
addPreferencesFromResource(R.xml.cherish_ambient_customization);
|
||||
final PreferenceScreen prefScreen = getPreferenceScreen();
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
Resources resources = getResources();
|
||||
|
||||
// set ambient text alignment
|
||||
mAmbientTextAlign = (ListPreference) findPreference(AMBIENT_TEXT_ALIGNMENT);
|
||||
int align = Settings.System.getInt(resolver,
|
||||
Settings.System.AMBIENT_TEXT_ALIGNMENT, 3);
|
||||
mAmbientTextAlign.setValue(String.valueOf(align));
|
||||
mAmbientTextAlign.setSummary(mAmbientTextAlign.getEntry());
|
||||
mAmbientTextAlign.setOnPreferenceChangeListener(this);
|
||||
|
||||
// ambient text color type
|
||||
mAmbientTextTypeColor = (ListPreference) findPreference(AMBIENT_TEXT_TYPE_COLOR);
|
||||
mAmbientTextTypeColor.setValue(String.valueOf(Settings.System.getInt(
|
||||
getContentResolver(), Settings.System.AMBIENT_TEXT_TYPE_COLOR, 0)));
|
||||
mAmbientTextTypeColor.setSummary(mAmbientTextTypeColor.getEntry());
|
||||
mAmbientTextTypeColor.setOnPreferenceChangeListener(this);
|
||||
|
||||
mAmbientTextColor = (ColorPickerPreference) findPreference(AMBIENT_TEXT_COLOR);
|
||||
mAmbientTextColor.setOnPreferenceChangeListener(this);
|
||||
int ambientTextColor = Settings.System.getInt(getContentResolver(),
|
||||
Settings.System.AMBIENT_TEXT_COLOR, 0xFF3980FF);
|
||||
String ambientTextColorHex = String.format("#%08x", (0xFF3980FF & ambientTextColor));
|
||||
if (ambientTextColorHex.equals("#ff3980ff")) {
|
||||
mAmbientTextColor.setSummary(R.string.default_string);
|
||||
} else {
|
||||
mAmbientTextColor.setSummary(ambientTextColorHex);
|
||||
}
|
||||
mAmbientTextColor.setNewPreviewColor(ambientTextColor);
|
||||
|
||||
mAmbientImage = findPreference(FILE_AMBIENT_SELECT);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceTreeClick(Preference preference) {
|
||||
if (preference == mAmbientImage) {
|
||||
Intent intent = new Intent(Intent.ACTION_PICK);
|
||||
intent.setType("image/*");
|
||||
startActivityForResult(intent, REQUEST_PICK_IMAGE);
|
||||
return true;
|
||||
}
|
||||
return super.onPreferenceTreeClick(preference);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
if (preference == mAmbientText) {
|
||||
String value = (String) newValue;
|
||||
Settings.System.putString(resolver,
|
||||
Settings.System.AMBIENT_TEXT_STRING, value);
|
||||
return true;
|
||||
} else if (preference == mAmbientTextAlign) {
|
||||
int align = Integer.valueOf((String) newValue);
|
||||
int index = mAmbientTextAlign.findIndexOfValue((String) newValue);
|
||||
Settings.System.putInt(getActivity().getContentResolver(),
|
||||
Settings.System.AMBIENT_TEXT_ALIGNMENT, align);
|
||||
mAmbientTextAlign.setSummary(mAmbientTextAlign.getEntries()[index]);
|
||||
return true;
|
||||
} else if (preference == mAmbientTextTypeColor) {
|
||||
int value = Integer.valueOf((String) newValue);
|
||||
int vIndex = mAmbientTextTypeColor.findIndexOfValue((String) newValue);
|
||||
mAmbientTextTypeColor.setSummary(mAmbientTextTypeColor.getEntries()[vIndex]);
|
||||
Settings.System.putInt(getActivity().getContentResolver(),
|
||||
Settings.System.AMBIENT_TEXT_TYPE_COLOR, value);
|
||||
if (value == 2) {
|
||||
mAmbientTextColor.setEnabled(true);
|
||||
} else {
|
||||
mAmbientTextColor.setEnabled(false);
|
||||
}
|
||||
return true;
|
||||
} else if (preference == mAmbientTextColor) {
|
||||
String hex = ColorPickerPreference.convertToARGB(
|
||||
Integer.valueOf(String.valueOf(newValue)));
|
||||
if (hex.equals("#ff3980ff")) {
|
||||
preference.setSummary(R.string.default_string);
|
||||
} else {
|
||||
preference.setSummary(hex);
|
||||
}
|
||||
int intHex = ColorPickerPreference.convertToColorInt(hex);
|
||||
Settings.System.putInt(getContentResolver(),
|
||||
Settings.System.AMBIENT_TEXT_COLOR, intHex);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent result) {
|
||||
if (requestCode == REQUEST_PICK_IMAGE) {
|
||||
if (resultCode != Activity.RESULT_OK) {
|
||||
return;
|
||||
}
|
||||
final Uri imageUri = result.getData();
|
||||
Settings.System.putString(getContentResolver(), Settings.System.AMBIENT_CUSTOM_IMAGE, imageUri.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsProto.MetricsEvent.CHERISH_SETTINGS;
|
||||
}
|
||||
|
||||
public static final SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider() {
|
||||
|
||||
@Override
|
||||
public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
|
||||
boolean enabled) {
|
||||
ArrayList<SearchIndexableResource> result =
|
||||
new ArrayList<SearchIndexableResource>();
|
||||
SearchIndexableResource sir = new SearchIndexableResource(context);
|
||||
sir.xmlResId = R.xml.cherish_ambient_customization;
|
||||
result.add(sir);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -55,6 +55,10 @@ import java.util.List;
|
||||
public class AnimationsSettings extends SettingsPreferenceFragment
|
||||
implements OnPreferenceChangeListener {
|
||||
|
||||
private static final String POWER_MENU_ANIMATIONS = "power_menu_animations";
|
||||
|
||||
private ListPreference mPowerMenuAnimations;
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsEvent.CHERISH_SETTINGS;
|
||||
@@ -66,6 +70,12 @@ public class AnimationsSettings extends SettingsPreferenceFragment
|
||||
addPreferencesFromResource(R.xml.cherish_settings_animations);
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
PreferenceScreen prefs = getPreferenceScreen();
|
||||
|
||||
mPowerMenuAnimations = (ListPreference) findPreference(POWER_MENU_ANIMATIONS);
|
||||
mPowerMenuAnimations.setValue(String.valueOf(Settings.System.getInt(
|
||||
getContentResolver(), Settings.System.POWER_MENU_ANIMATIONS, 0)));
|
||||
mPowerMenuAnimations.setSummary(mPowerMenuAnimations.getEntry());
|
||||
mPowerMenuAnimations.setOnPreferenceChangeListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -75,7 +85,14 @@ public class AnimationsSettings extends SettingsPreferenceFragment
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
if (preference == mPowerMenuAnimations) {
|
||||
Settings.System.putInt(getContentResolver(), Settings.System.POWER_MENU_ANIMATIONS,
|
||||
Integer.valueOf((String) newValue));
|
||||
mPowerMenuAnimations.setValue(String.valueOf(newValue));
|
||||
mPowerMenuAnimations.setSummary(mPowerMenuAnimations.getEntry());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package com.cherish.settings.fragment
|
||||
|
||||
import android.content.Context
|
||||
import android.annotation.IntDef
|
||||
import android.content.pm.PackageInfo
|
||||
import android.content.pm.PackageManager
|
||||
import android.graphics.drawable.Drawable
|
||||
@@ -35,6 +35,7 @@ import android.widget.TextView
|
||||
|
||||
import androidx.core.view.ViewCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.ListAdapter
|
||||
@@ -43,8 +44,6 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import com.android.settings.R
|
||||
import com.google.android.material.appbar.AppBarLayout
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.cancel
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.sync.Mutex
|
||||
@@ -57,38 +56,29 @@ import kotlinx.coroutines.withContext
|
||||
* and package name of the application, along with a [CheckBox]
|
||||
* indicating whether the item is selected or not.
|
||||
*/
|
||||
abstract class AppListFragment: Fragment(R.layout.app_list_layout), MenuItem.OnActionExpandListener {
|
||||
abstract class AppListFragment : Fragment(R.layout.app_list_layout),
|
||||
MenuItem.OnActionExpandListener {
|
||||
|
||||
private val mutex = Mutex()
|
||||
|
||||
private lateinit var fragmentScope: CoroutineScope
|
||||
private lateinit var progressBar: ProgressBar
|
||||
private lateinit var appBarLayout: AppBarLayout
|
||||
private lateinit var packageManager: PackageManager
|
||||
private lateinit var recyclerView: RecyclerView
|
||||
private lateinit var pm: PackageManager
|
||||
private lateinit var adapter: AppListAdapter
|
||||
|
||||
private val packageList = mutableListOf<PackageInfo>()
|
||||
private var appBarLayout: AppBarLayout? = null
|
||||
private var recyclerView: RecyclerView? = null
|
||||
private var progressBar: ProgressBar? = null
|
||||
|
||||
private var searchText = ""
|
||||
private var displayCategory: Int = CATEGORY_USER_ONLY
|
||||
private var packageFilter: ((PackageInfo) -> Boolean) = { true }
|
||||
private var packageComparator: ((PackageInfo, PackageInfo) -> Int) = { a, b ->
|
||||
getLabel(a).compareTo(getLabel(b))
|
||||
}
|
||||
|
||||
private var needsToHideProgressBar = false
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
super.onAttach(context)
|
||||
fragmentScope = CoroutineScope(Dispatchers.Main)
|
||||
private var packageFilter: (PackageInfo) -> Boolean = { true }
|
||||
private var packageComparator: (PackageInfo, PackageInfo) -> Int = { first, second ->
|
||||
getLabel(first).compareTo(getLabel(second))
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setHasOptionsMenu(true)
|
||||
packageManager = requireContext().packageManager
|
||||
packageList.addAll(packageManager.getInstalledPackages(0))
|
||||
pm = requireContext().packageManager
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,15 +87,19 @@ abstract class AppListFragment: Fragment(R.layout.app_list_layout), MenuItem.OnA
|
||||
abstract protected fun getTitle(): Int
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
requireActivity().setTitle(getTitle())
|
||||
appBarLayout = requireActivity().findViewById(R.id.app_bar)
|
||||
val activity = requireActivity()
|
||||
activity.setTitle(getTitle())
|
||||
appBarLayout = activity.findViewById(R.id.app_bar)
|
||||
progressBar = view.findViewById(R.id.loading_progress)
|
||||
adapter = AppListAdapter()
|
||||
recyclerView = view.findViewById<RecyclerView>(R.id.apps_list).also {
|
||||
adapter = AppListAdapter(getInitialCheckedList(), layoutInflater).apply {
|
||||
setOnAppSelectListener { onAppSelected(it) }
|
||||
setOnAppDeselectListener { onAppDeselected(it) }
|
||||
setOnListUpdateListener { onListUpdate(it) }
|
||||
}
|
||||
recyclerView = view.findViewById<RecyclerView>(R.id.apps_list)?.also {
|
||||
it.layoutManager = LinearLayoutManager(context)
|
||||
it.adapter = adapter
|
||||
}
|
||||
needsToHideProgressBar = true
|
||||
refreshList()
|
||||
}
|
||||
|
||||
@@ -118,19 +112,21 @@ abstract class AppListFragment: Fragment(R.layout.app_list_layout), MenuItem.OnA
|
||||
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||
inflater.inflate(R.menu.app_list_menu, menu)
|
||||
val searchItem = menu.findItem(R.id.search).also {
|
||||
it.setOnActionExpandListener(this)
|
||||
if (appBarLayout != null) {
|
||||
it.setOnActionExpandListener(this)
|
||||
}
|
||||
}
|
||||
val searchView = searchItem.actionView as SearchView
|
||||
searchView.setQueryHint(getString(R.string.search_apps));
|
||||
searchView.setOnQueryTextListener(object: SearchView.OnQueryTextListener {
|
||||
searchView.setQueryHint(getString(R.string.search_apps))
|
||||
searchView.setOnQueryTextListener(object : SearchView.OnQueryTextListener {
|
||||
override fun onQueryTextSubmit(query: String) = false
|
||||
|
||||
override fun onQueryTextChange(newText: String): Boolean {
|
||||
fragmentScope.launch {
|
||||
lifecycleScope.launch {
|
||||
mutex.withLock {
|
||||
searchText = newText
|
||||
}
|
||||
refreshList()
|
||||
refreshListInternal()
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -139,34 +135,29 @@ abstract class AppListFragment: Fragment(R.layout.app_list_layout), MenuItem.OnA
|
||||
|
||||
override fun onMenuItemActionExpand(item: MenuItem): Boolean {
|
||||
// To prevent a large space on tool bar.
|
||||
appBarLayout.setExpanded(false /*expanded*/, false /*animate*/)
|
||||
appBarLayout?.setExpanded(false /*expanded*/, false /*animate*/)
|
||||
// To prevent user expanding the collapsing tool bar view.
|
||||
ViewCompat.setNestedScrollingEnabled(recyclerView, false)
|
||||
recyclerView?.let { ViewCompat.setNestedScrollingEnabled(it, false) }
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onMenuItemActionCollapse(item: MenuItem): Boolean {
|
||||
// We keep the collapsed status after user cancel the search function.
|
||||
appBarLayout.setExpanded(false /*expanded*/, false /*animate*/)
|
||||
appBarLayout?.setExpanded(false /*expanded*/, false /*animate*/)
|
||||
// Allow user to expande the tool bar view.
|
||||
ViewCompat.setNestedScrollingEnabled(recyclerView, true)
|
||||
recyclerView?.let { ViewCompat.setNestedScrollingEnabled(it, true) }
|
||||
return true
|
||||
}
|
||||
|
||||
override fun onDetach() {
|
||||
fragmentScope.cancel()
|
||||
super.onDetach()
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the type of apps that should be displayed in the list.
|
||||
* Defaults to [CATEGORY_USER_ONLY].
|
||||
*
|
||||
* @param category one of [CATEGORY_SYSTEM_ONLY],
|
||||
* [CATEGORY_USER_ONLY], [CATEGORY_BOTH]
|
||||
* [CATEGORY_USER_ONLY], [CATEGORY_BOTH]
|
||||
*/
|
||||
fun setDisplayCategory(category: Int) {
|
||||
fragmentScope.launch {
|
||||
fun setDisplayCategory(@Category category: Int) {
|
||||
lifecycleScope.launch {
|
||||
mutex.withLock {
|
||||
displayCategory = category
|
||||
}
|
||||
@@ -177,10 +168,10 @@ abstract class AppListFragment: Fragment(R.layout.app_list_layout), MenuItem.OnA
|
||||
* Set a custom filter to filter out items from the list.
|
||||
*
|
||||
* @param customFilter a function that takes a [PackageInfo] and
|
||||
* returns a [Boolean] indicating whether to show the item or not.
|
||||
* returns a [Boolean] indicating whether to show the item or not.
|
||||
*/
|
||||
fun setCustomFilter(customFilter: ((packageInfo: PackageInfo) -> Boolean)) {
|
||||
fragmentScope.launch {
|
||||
fun setCustomFilter(customFilter: (PackageInfo) -> Boolean) {
|
||||
lifecycleScope.launch {
|
||||
mutex.withLock {
|
||||
packageFilter = customFilter
|
||||
}
|
||||
@@ -188,13 +179,13 @@ abstract class AppListFragment: Fragment(R.layout.app_list_layout), MenuItem.OnA
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a [Comparator] for sorting the elements in the list..
|
||||
* Set a [Comparator] for sorting the elements in the list.
|
||||
*
|
||||
* @param comparator a function that takes two [PackageInfo]'s and returns
|
||||
* an [Int] representing their relative priority.
|
||||
* an [Int] representing their relative priority.
|
||||
*/
|
||||
fun setComparator(comparator: ((a: PackageInfo, b: PackageInfo) -> Int)) {
|
||||
fragmentScope.launch {
|
||||
fun setComparator(comparator: (PackageInfo, PackageInfo) -> Int) {
|
||||
lifecycleScope.launch {
|
||||
mutex.withLock {
|
||||
packageComparator = comparator
|
||||
}
|
||||
@@ -222,75 +213,111 @@ abstract class AppListFragment: Fragment(R.layout.app_list_layout), MenuItem.OnA
|
||||
*/
|
||||
open protected fun onAppDeselected(packageName: String) {}
|
||||
|
||||
protected fun refreshList() {
|
||||
fragmentScope.launch {
|
||||
val list = withContext(Dispatchers.Default) {
|
||||
mutex.withLock {
|
||||
packageList.filter {
|
||||
when (displayCategory) {
|
||||
CATEGORY_SYSTEM_ONLY -> it.applicationInfo.isSystemApp()
|
||||
CATEGORY_USER_ONLY -> !it.applicationInfo.isSystemApp()
|
||||
else -> true
|
||||
} &&
|
||||
getLabel(it).contains(searchText, true) &&
|
||||
packageFilter(it)
|
||||
}.sortedWith(packageComparator).map { appInfofromPackage(it) }
|
||||
}
|
||||
}
|
||||
adapter.submitList(list)
|
||||
if (needsToHideProgressBar) {
|
||||
progressBar.visibility = View.GONE
|
||||
needsToHideProgressBar = false
|
||||
}
|
||||
fun refreshList() {
|
||||
lifecycleScope.launch {
|
||||
refreshListInternal()
|
||||
}
|
||||
}
|
||||
|
||||
private fun appInfofromPackage(packageInfo: PackageInfo): AppInfo =
|
||||
AppInfo(
|
||||
packageInfo.packageName,
|
||||
getLabel(packageInfo),
|
||||
packageInfo.applicationInfo.loadIcon(packageManager),
|
||||
)
|
||||
private suspend fun refreshListInternal() {
|
||||
val list = withContext(Dispatchers.Default) {
|
||||
val sortedList = mutex.withLock {
|
||||
pm.getInstalledPackages(PackageManager.MATCH_ALL).filter {
|
||||
val categoryMatches = when (displayCategory) {
|
||||
CATEGORY_SYSTEM_ONLY -> it.applicationInfo.isSystemApp()
|
||||
CATEGORY_USER_ONLY -> !it.applicationInfo.isSystemApp()
|
||||
else -> true
|
||||
}
|
||||
categoryMatches && packageFilter(it) &&
|
||||
getLabel(it).contains(searchText, true)
|
||||
}.sortedWith(packageComparator)
|
||||
}
|
||||
sortedList.map {
|
||||
AppInfo(
|
||||
it.packageName,
|
||||
getLabel(it),
|
||||
it.applicationInfo.loadIcon(pm),
|
||||
)
|
||||
}
|
||||
}
|
||||
adapter.submitList(list)
|
||||
progressBar?.visibility = View.GONE
|
||||
}
|
||||
|
||||
private fun getLabel(packageInfo: PackageInfo) =
|
||||
packageInfo.applicationInfo.loadLabel(packageManager).toString()
|
||||
packageInfo.applicationInfo.loadLabel(pm).toString()
|
||||
|
||||
private inner class AppListAdapter :
|
||||
ListAdapter<AppInfo, AppListViewHolder>(itemCallback)
|
||||
{
|
||||
private val checkedList = getInitialCheckedList().toMutableList()
|
||||
private class AppListAdapter(
|
||||
initialCheckedList: List<String>,
|
||||
private val layoutInflater: LayoutInflater
|
||||
) : ListAdapter<AppInfo, AppListViewHolder>(itemCallback) {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) =
|
||||
AppListViewHolder(layoutInflater.inflate(
|
||||
R.layout.app_list_item, parent, false))
|
||||
private val checkedList = initialCheckedList.toMutableList()
|
||||
private var appSelectListener: (String) -> Unit = {}
|
||||
private var appDeselectListener: (String) -> Unit = {}
|
||||
private var listUpdateListener: (List<String>) -> Unit = {}
|
||||
|
||||
override fun onCreateViewHolder(
|
||||
parent: ViewGroup,
|
||||
viewType: Int
|
||||
) = AppListViewHolder(
|
||||
layoutInflater.inflate(
|
||||
R.layout.app_list_item,
|
||||
parent,
|
||||
false /* attachToParent */
|
||||
)
|
||||
)
|
||||
|
||||
override fun onBindViewHolder(holder: AppListViewHolder, position: Int) {
|
||||
val item = getItem(position)
|
||||
val pkg = item.packageName
|
||||
holder.label.setText(item.label)
|
||||
holder.packageName.setText(pkg)
|
||||
holder.label.text = item.label
|
||||
holder.packageName.text = item.packageName
|
||||
holder.icon.setImageDrawable(item.icon)
|
||||
holder.checkBox.setChecked(checkedList.contains(pkg))
|
||||
holder.checkBox.isChecked = checkedList.contains(item.packageName)
|
||||
holder.itemView.setOnClickListener {
|
||||
if (checkedList.contains(pkg)){
|
||||
checkedList.remove(pkg)
|
||||
onAppDeselected(pkg)
|
||||
if (checkedList.contains(item.packageName)) {
|
||||
checkedList.remove(item.packageName)
|
||||
appDeselectListener(item.packageName)
|
||||
} else {
|
||||
checkedList.add(pkg)
|
||||
onAppSelected(pkg)
|
||||
checkedList.add(item.packageName)
|
||||
appSelectListener(item.packageName)
|
||||
}
|
||||
notifyItemChanged(position)
|
||||
onListUpdate(checkedList.toList())
|
||||
listUpdateListener(checkedList.toList())
|
||||
}
|
||||
}
|
||||
|
||||
fun setOnAppSelectListener(listener: (String) -> Unit) {
|
||||
appSelectListener = listener
|
||||
}
|
||||
|
||||
fun setOnAppDeselectListener(listener: (String) -> Unit) {
|
||||
appDeselectListener = listener
|
||||
}
|
||||
|
||||
fun setOnListUpdateListener(listener: (List<String>) -> Unit) {
|
||||
listUpdateListener = listener
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val itemCallback = object : DiffUtil.ItemCallback<AppInfo>() {
|
||||
override fun areItemsTheSame(oldInfo: AppInfo, newInfo: AppInfo) =
|
||||
oldInfo.packageName == newInfo.packageName
|
||||
|
||||
override fun areContentsTheSame(oldInfo: AppInfo, newInfo: AppInfo) =
|
||||
oldInfo == newInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class AppListViewHolder(itemView: View) :
|
||||
RecyclerView.ViewHolder(itemView) {
|
||||
private class AppListViewHolder(
|
||||
itemView: View
|
||||
) : RecyclerView.ViewHolder(itemView) {
|
||||
|
||||
val icon: ImageView = itemView.findViewById(R.id.icon)
|
||||
val label: TextView = itemView.findViewById(R.id.label)
|
||||
val packageName: TextView = itemView.findViewById(R.id.packageName)
|
||||
val checkBox: CheckBox = itemView.findViewById(R.id.checkBox)
|
||||
val packageName: TextView = itemView.findViewById(R.id.package_name)
|
||||
val checkBox: CheckBox = itemView.findViewById(R.id.check_box)
|
||||
}
|
||||
|
||||
private data class AppInfo(
|
||||
@@ -300,18 +327,16 @@ abstract class AppListFragment: Fragment(R.layout.app_list_layout), MenuItem.OnA
|
||||
)
|
||||
|
||||
companion object {
|
||||
private const val TAG = "AppListFragment"
|
||||
|
||||
const val CATEGORY_SYSTEM_ONLY = 0
|
||||
const val CATEGORY_USER_ONLY = 1
|
||||
const val CATEGORY_BOTH = 2
|
||||
|
||||
private val itemCallback = object : DiffUtil.ItemCallback<AppInfo>() {
|
||||
override fun areItemsTheSame(oldInfo: AppInfo, newInfo: AppInfo) =
|
||||
oldInfo.packageName == newInfo.packageName
|
||||
|
||||
override fun areContentsTheSame(oldInfo: AppInfo, newInfo: AppInfo) =
|
||||
oldInfo == newInfo
|
||||
}
|
||||
@IntDef(value = intArrayOf(
|
||||
CATEGORY_SYSTEM_ONLY,
|
||||
CATEGORY_USER_ONLY,
|
||||
CATEGORY_BOTH
|
||||
))
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
annotation class Category
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,21 +14,32 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.cherish.settings.fragment
|
||||
package com.cherish.settings.fragments
|
||||
|
||||
import androidx.preference.Preference
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto
|
||||
import com.android.settings.dashboard.DashboardFragment
|
||||
import com.cherish.settings.fragments.ColorPickerFragment
|
||||
import com.cherish.settings.preferences.ColorPickerPreference
|
||||
|
||||
abstract class CherishDashboardFragment: DashboardFragment() {
|
||||
override fun getMetricsCategory(): Int = MetricsProto.MetricsEvent.CHERISH_SETTINGS
|
||||
|
||||
override fun onDisplayPreferenceDialog(preference: Preference) {
|
||||
super.onDisplayPreferenceDialog(preference)
|
||||
if (preference is ColorPickerPreference) {
|
||||
ColorPickerFragment(preference.color).apply {
|
||||
setOnConfirmListener {
|
||||
preference.setColor(it)
|
||||
}
|
||||
}.show(childFragmentManager, COLOR_PICKER_DIALOG_KEY)
|
||||
} else {
|
||||
super.onDisplayPreferenceDialog(preference)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val REQUEST_KEY = "CherishDashboardFragment#RequestKey"
|
||||
const val COLOR_PICKER_DIALOG_KEY = "color_picker_dialog"
|
||||
}
|
||||
}
|
||||
229
src/com/cherish/settings/fragments/Clock.java
Normal file
229
src/com/cherish/settings/fragments/Clock.java
Normal file
@@ -0,0 +1,229 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 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.
|
||||
*/
|
||||
package com.cherish.settings.fragments;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnCancelListener;
|
||||
import android.content.res.Resources;
|
||||
import android.database.ContentObserver;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
import android.text.format.DateFormat;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceCategory;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.Preference.OnPreferenceChangeListener;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
import com.cherish.settings.fragments.Clock;
|
||||
import com.cherish.settings.preferences.SecureSettingSwitchPreference;
|
||||
import com.cherish.settings.preferences.SystemSettingListPreference;
|
||||
import com.cherish.settings.preferences.SystemSettingSeekBarPreference;
|
||||
import com.cherish.settings.preferences.SystemSettingSwitchPreference;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
|
||||
public class Clock extends SettingsPreferenceFragment implements
|
||||
Preference.OnPreferenceChangeListener {
|
||||
|
||||
private static final String TAG = "Clock";
|
||||
|
||||
private static final String STATUS_BAR_AM_PM = "status_bar_am_pm";
|
||||
private static final String CLOCK_DATE_DISPLAY = "status_bar_clock_date_display";
|
||||
private static final String CLOCK_DATE_POSITION = "status_bar_clock_date_position";
|
||||
private static final String CLOCK_DATE_STYLE = "status_bar_clock_date_style";
|
||||
private static final String CLOCK_DATE_FORMAT = "status_bar_clock_date_format";
|
||||
|
||||
private static final int CLOCK_DATE_STYLE_LOWERCASE = 1;
|
||||
private static final int CLOCK_DATE_STYLE_UPPERCASE = 2;
|
||||
private static final int CUSTOM_CLOCK_DATE_FORMAT_INDEX = 18;
|
||||
|
||||
private SystemSettingListPreference mStatusBarAmPm;
|
||||
private SystemSettingListPreference mClockDateDisplay;
|
||||
private SystemSettingListPreference mClockDatePosition;
|
||||
private SystemSettingListPreference mClockDateStyle;
|
||||
private ListPreference mClockDateFormat;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
addPreferencesFromResource(R.xml.cherish_settings_status_bar_clock);
|
||||
|
||||
final ContentResolver resolver = getActivity().getContentResolver();
|
||||
final Context mContext = getActivity().getApplicationContext();
|
||||
final PreferenceScreen prefScreen = getPreferenceScreen();
|
||||
|
||||
mStatusBarAmPm =
|
||||
(SystemSettingListPreference) findPreference(STATUS_BAR_AM_PM);
|
||||
|
||||
if (DateFormat.is24HourFormat(getActivity())) {
|
||||
mStatusBarAmPm.setEnabled(false);
|
||||
mStatusBarAmPm.setSummary(R.string.status_bar_am_pm_info);
|
||||
}
|
||||
|
||||
int dateDisplay = Settings.System.getIntForUser(resolver,
|
||||
Settings.System.STATUS_BAR_CLOCK_DATE_DISPLAY, 0, UserHandle.USER_CURRENT);
|
||||
|
||||
mClockDateDisplay = (SystemSettingListPreference) findPreference(CLOCK_DATE_DISPLAY);
|
||||
mClockDateDisplay.setOnPreferenceChangeListener(this);
|
||||
|
||||
mClockDatePosition = (SystemSettingListPreference) findPreference(CLOCK_DATE_POSITION);
|
||||
mClockDatePosition.setEnabled(dateDisplay > 0);
|
||||
mClockDatePosition.setOnPreferenceChangeListener(this);
|
||||
|
||||
mClockDateStyle = (SystemSettingListPreference) findPreference(CLOCK_DATE_STYLE);
|
||||
mClockDateStyle.setEnabled(dateDisplay > 0);
|
||||
mClockDateStyle.setOnPreferenceChangeListener(this);
|
||||
|
||||
mClockDateFormat = (ListPreference) findPreference(CLOCK_DATE_FORMAT);
|
||||
if (mClockDateFormat.getValue() == null) {
|
||||
mClockDateFormat.setValue("EEE");
|
||||
}
|
||||
parseClockDateFormats();
|
||||
mClockDateFormat.setEnabled(dateDisplay > 0);
|
||||
mClockDateFormat.setOnPreferenceChangeListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
AlertDialog dialog;
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
if (preference == mClockDateDisplay) {
|
||||
int val = Integer.parseInt((String) newValue);
|
||||
if (val == 0) {
|
||||
mClockDatePosition.setEnabled(false);
|
||||
mClockDateStyle.setEnabled(false);
|
||||
mClockDateFormat.setEnabled(false);
|
||||
} else {
|
||||
mClockDatePosition.setEnabled(true);
|
||||
mClockDateStyle.setEnabled(true);
|
||||
mClockDateFormat.setEnabled(true);
|
||||
}
|
||||
return true;
|
||||
} else if (preference == mClockDatePosition) {
|
||||
parseClockDateFormats();
|
||||
return true;
|
||||
} else if (preference == mClockDateStyle) {
|
||||
parseClockDateFormats();
|
||||
return true;
|
||||
} else if (preference == mClockDateFormat) {
|
||||
int index = mClockDateFormat.findIndexOfValue((String) newValue);
|
||||
|
||||
if (index == CUSTOM_CLOCK_DATE_FORMAT_INDEX) {
|
||||
AlertDialog.Builder alert = new AlertDialog.Builder(getActivity());
|
||||
alert.setTitle(R.string.status_bar_date_string_edittext_title);
|
||||
alert.setMessage(R.string.status_bar_date_string_edittext_summary);
|
||||
|
||||
final EditText input = new EditText(getActivity());
|
||||
String oldText = Settings.System.getString(
|
||||
resolver,
|
||||
Settings.System.STATUS_BAR_CLOCK_DATE_FORMAT);
|
||||
if (oldText != null) {
|
||||
input.setText(oldText);
|
||||
}
|
||||
alert.setView(input);
|
||||
|
||||
alert.setPositiveButton(R.string.menu_save, new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialogInterface, int whichButton) {
|
||||
String value = input.getText().toString();
|
||||
if (value.equals("")) {
|
||||
return;
|
||||
}
|
||||
Settings.System.putString(resolver,
|
||||
Settings.System.STATUS_BAR_CLOCK_DATE_FORMAT, value);
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
alert.setNegativeButton(R.string.menu_cancel,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialogInterface, int which) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
dialog = alert.create();
|
||||
dialog.show();
|
||||
} else {
|
||||
if ((String) newValue != null) {
|
||||
Settings.System.putString(resolver,
|
||||
Settings.System.STATUS_BAR_CLOCK_DATE_FORMAT, (String) newValue);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void parseClockDateFormats() {
|
||||
String[] dateEntries = getResources().getStringArray(
|
||||
R.array.status_bar_date_format_entries_values);
|
||||
CharSequence parsedDateEntries[];
|
||||
parsedDateEntries = new String[dateEntries.length];
|
||||
Date now = new Date();
|
||||
|
||||
int lastEntry = dateEntries.length - 1;
|
||||
int dateFormat = Settings.System.getIntForUser(getActivity()
|
||||
.getContentResolver(), Settings.System.STATUS_BAR_CLOCK_DATE_STYLE, 0, UserHandle.USER_CURRENT);
|
||||
for (int i = 0; i < dateEntries.length; i++) {
|
||||
if (i == lastEntry) {
|
||||
parsedDateEntries[i] = dateEntries[i];
|
||||
} else {
|
||||
String newDate;
|
||||
CharSequence dateString = DateFormat.format(dateEntries[i], now);
|
||||
if (dateFormat == CLOCK_DATE_STYLE_LOWERCASE) {
|
||||
newDate = dateString.toString().toLowerCase();
|
||||
} else if (dateFormat == CLOCK_DATE_STYLE_UPPERCASE) {
|
||||
newDate = dateString.toString().toUpperCase();
|
||||
} else {
|
||||
newDate = dateString.toString();
|
||||
}
|
||||
|
||||
parsedDateEntries[i] = newDate;
|
||||
}
|
||||
}
|
||||
mClockDateFormat.setEntries(parsedDateEntries);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsEvent.CHERISH_SETTINGS;
|
||||
}
|
||||
|
||||
/**
|
||||
* For Search.
|
||||
*/
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.cherish_settings_status_bar_clock);
|
||||
}
|
||||
418
src/com/cherish/settings/fragments/ColorPickerFragment.kt
Normal file
418
src/com/cherish/settings/fragments/ColorPickerFragment.kt
Normal file
@@ -0,0 +1,418 @@
|
||||
/*
|
||||
* Copyright (C) 2022 FlamingoOS 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.cherish.settings.fragments
|
||||
|
||||
import android.annotation.ColorInt
|
||||
import android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.os.Bundle
|
||||
import android.text.Editable
|
||||
import android.text.Spanned
|
||||
import android.text.InputFilter
|
||||
import android.view.HapticFeedbackConstants.KEYBOARD_PRESS
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Button
|
||||
import android.widget.EditText
|
||||
import android.widget.RadioGroup
|
||||
import android.widget.SeekBar
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
|
||||
import androidx.core.graphics.ColorUtils
|
||||
import androidx.core.widget.doAfterTextChanged
|
||||
import androidx.fragment.app.DialogFragment.STYLE_NORMAL
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||
import com.android.settings.R
|
||||
|
||||
class ColorPickerFragment(
|
||||
defaultColor: String? = "#FFFFFF",
|
||||
) : BottomSheetDialogFragment(),
|
||||
RadioGroup.OnCheckedChangeListener,
|
||||
SeekBar.OnSeekBarChangeListener {
|
||||
|
||||
private lateinit var colorPreview: View
|
||||
private lateinit var colorInput: EditText
|
||||
private lateinit var seekBarOne: SeekBar
|
||||
private lateinit var seekBarTwo: SeekBar
|
||||
private lateinit var seekBarThree: SeekBar
|
||||
|
||||
private var colorModel = ColorModel.RGB
|
||||
private var textInputChangedInternal = false // Internal variable to prevent loops with TextWatcher
|
||||
private var confirmListener: (String) -> Unit = {}
|
||||
|
||||
@ColorInt
|
||||
private var color: Int
|
||||
|
||||
init {
|
||||
color = if (defaultColor == null || defaultColor.isEmpty()) {
|
||||
Color.WHITE
|
||||
} else {
|
||||
try {
|
||||
Color.parseColor(defaultColor)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
Color.WHITE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
activity?.requestedOrientation = SCREEN_ORIENTATION_PORTRAIT
|
||||
setStyle(STYLE_NORMAL, R.style.ColorPickerStyle)
|
||||
}
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View = inflater.inflate(R.layout.color_picker_layout, container, false)
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
colorPreview = view.findViewById(R.id.color_preview)
|
||||
colorInput = view.findViewById(R.id.color_input)
|
||||
|
||||
colorInput.doAfterTextChanged {
|
||||
if (textInputChangedInternal) {
|
||||
// Reset it here
|
||||
textInputChangedInternal = false
|
||||
return@doAfterTextChanged
|
||||
}
|
||||
if (it?.length != 7) return@doAfterTextChanged
|
||||
color = try {
|
||||
Color.parseColor(it.toString())
|
||||
} catch (e: IllegalArgumentException) {
|
||||
Toast.makeText(
|
||||
context,
|
||||
R.string.invalid_color,
|
||||
Toast.LENGTH_SHORT
|
||||
)
|
||||
Color.WHITE
|
||||
}
|
||||
updateSliders()
|
||||
updateSliderGradients(false)
|
||||
previewColor(true)
|
||||
}
|
||||
|
||||
colorInput.filters = arrayOf(
|
||||
InputFilter.LengthFilter(7),
|
||||
InputFilter filter@ { source, start, end, _, dstart, dend ->
|
||||
// Deletion
|
||||
if (start == 0 && end == 0) {
|
||||
return@filter null
|
||||
}
|
||||
if (dstart == 0) {
|
||||
// First character has to be # and rest of them
|
||||
// (if present) be a valid hex char
|
||||
if (!source.startsWith("#")) {
|
||||
return@filter ""
|
||||
}
|
||||
// Just a single char
|
||||
if (dstart == dend) return@filter null
|
||||
if (!HEX_PATTERN.matches(source.subSequence(1, end))) {
|
||||
return@filter ""
|
||||
}
|
||||
} else {
|
||||
// Does not start from 0, so every char has to be valid hex
|
||||
if (!HEX_PATTERN.matches(source)) {
|
||||
return@filter ""
|
||||
}
|
||||
}
|
||||
if ((end - start) == 7) { // Full hex input
|
||||
if (!COLOR_HEX_PATTERN.matches(source)) {
|
||||
return@filter ""
|
||||
}
|
||||
}
|
||||
null
|
||||
}
|
||||
)
|
||||
|
||||
view.findViewById<Button>(R.id.cancel_button).setOnClickListener {
|
||||
it.performHapticFeedback(KEYBOARD_PRESS)
|
||||
dialog?.dismiss()
|
||||
}
|
||||
|
||||
view.findViewById<Button>(R.id.confirm_button).setOnClickListener {
|
||||
it.performHapticFeedback(KEYBOARD_PRESS)
|
||||
dialog?.dismiss()
|
||||
val colorHex = colorInput.text.toString()
|
||||
if (colorHex.isEmpty() || colorHex.length == 7) {
|
||||
confirmListener(colorHex)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the drawables as mutable so that they
|
||||
* do not share a constant state or else all
|
||||
* three slider gradients will look alike
|
||||
*/
|
||||
seekBarOne = view.findViewById<SeekBar>(R.id.seekBar1).also {
|
||||
it.progressDrawable.mutate()
|
||||
it.setOnSeekBarChangeListener(this)
|
||||
}
|
||||
seekBarTwo = view.findViewById<SeekBar>(R.id.seekBar2).also {
|
||||
it.progressDrawable.mutate()
|
||||
it.setOnSeekBarChangeListener(this)
|
||||
}
|
||||
seekBarThree = view.findViewById<SeekBar>(R.id.seekBar3).also {
|
||||
it.progressDrawable.mutate()
|
||||
it.setOnSeekBarChangeListener(this)
|
||||
}
|
||||
|
||||
// Register listener for color model change
|
||||
view.findViewById<RadioGroup>(R.id.color_model_group).also {
|
||||
it.setOnCheckedChangeListener(this)
|
||||
}
|
||||
|
||||
// Update sliders and preview
|
||||
updateSliderMax()
|
||||
updateSliders()
|
||||
updateSliderGradients(true)
|
||||
previewColor(false)
|
||||
}
|
||||
|
||||
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
|
||||
if (!fromUser) return
|
||||
color = when (colorModel) {
|
||||
ColorModel.RGB -> {
|
||||
Color.rgb(
|
||||
seekBarOne.progress,
|
||||
seekBarTwo.progress,
|
||||
seekBarThree.progress
|
||||
)
|
||||
}
|
||||
ColorModel.HSV -> {
|
||||
HSVToColor(
|
||||
seekBarOne.progress.toFloat(),
|
||||
seekBarTwo.progress / 100f,
|
||||
seekBarThree.progress / 100f
|
||||
)
|
||||
}
|
||||
ColorModel.HSL -> {
|
||||
HSLToColor(
|
||||
seekBarOne.progress.toFloat(),
|
||||
seekBarTwo.progress / 100f,
|
||||
seekBarThree.progress / 100f
|
||||
)
|
||||
}
|
||||
}
|
||||
if (colorModel != ColorModel.RGB) {
|
||||
updateSliderGradients(false)
|
||||
}
|
||||
previewColor(false)
|
||||
}
|
||||
|
||||
override fun onStartTrackingTouch(seekBar: SeekBar) {
|
||||
// Not implemented
|
||||
}
|
||||
|
||||
override fun onStopTrackingTouch(seekBar: SeekBar) {
|
||||
// Not implemented
|
||||
}
|
||||
|
||||
override fun onCheckedChanged(group: RadioGroup, checkedId: Int) {
|
||||
colorModel = when (checkedId) {
|
||||
R.id.rgb_button -> ColorModel.RGB
|
||||
R.id.hsv_button -> ColorModel.HSV
|
||||
R.id.hsl_button -> ColorModel.HSL
|
||||
else -> ColorModel.RGB
|
||||
}
|
||||
updateSliderMax()
|
||||
updateSliders()
|
||||
updateSliderGradients(true)
|
||||
}
|
||||
|
||||
/*
|
||||
* Set a confirmation listener that will be invoked when confirm
|
||||
* button of the dialog is pressed.
|
||||
*
|
||||
* @param listener the listener to be invoked. Hex value of the
|
||||
* color (including # prefix and RGB) will be the type parameter
|
||||
* of the listener. Do note that the parameter can also be empty.
|
||||
*/
|
||||
fun setOnConfirmListener(listener: (String) -> Unit) {
|
||||
confirmListener = listener
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to update sliders if color model changes or
|
||||
* user inputs a color hex. For the latter it must be called
|
||||
* only after the accent colors are updated.
|
||||
*/
|
||||
private fun updateSliders() {
|
||||
when (colorModel) {
|
||||
ColorModel.RGB -> updateSliderProgressFromColor()
|
||||
ColorModel.HSV -> {
|
||||
val array = FloatArray(3)
|
||||
Color.colorToHSV(color, array)
|
||||
updateSliderProgressFromHSVorHSL(array)
|
||||
}
|
||||
ColorModel.HSL -> {
|
||||
val array = FloatArray(3)
|
||||
ColorUtils.colorToHSL(color, array)
|
||||
updateSliderProgressFromHSVorHSL(array)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// For updating RGB slider progress
|
||||
private fun updateSliderProgressFromColor() {
|
||||
seekBarOne.progress = Color.red(color)
|
||||
seekBarTwo.progress = Color.green(color)
|
||||
seekBarThree.progress = Color.blue(color)
|
||||
}
|
||||
|
||||
// For updating HSV / HSL slider progress
|
||||
private fun updateSliderProgressFromHSVorHSL(hsvOrHSL: FloatArray) {
|
||||
seekBarOne.progress = hsvOrHSL[0].toInt()
|
||||
seekBarTwo.progress = (hsvOrHSL[1] * 100).toInt()
|
||||
seekBarThree.progress = (hsvOrHSL[2] * 100).toInt()
|
||||
}
|
||||
|
||||
// For updating the slider GradientDrawable's based on ColorModel
|
||||
private fun updateSliderGradients(colorModelChanged: Boolean) {
|
||||
if (colorModel == ColorModel.RGB) {
|
||||
if (colorModelChanged) {
|
||||
updateRGBGradient(seekBarOne.progressDrawable, Color.RED)
|
||||
updateRGBGradient(seekBarTwo.progressDrawable, Color.GREEN)
|
||||
updateRGBGradient(seekBarThree.progressDrawable, Color.BLUE)
|
||||
}
|
||||
} else {
|
||||
if (colorModelChanged) {
|
||||
updateHueGradient()
|
||||
}
|
||||
updateSaturationGradient()
|
||||
if (colorModel == ColorModel.HSV) {
|
||||
updateValueGradient()
|
||||
} else {
|
||||
updateLuminanceGradient()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateLuminanceGradient() {
|
||||
val drawable = seekBarThree.progressDrawable as GradientDrawable
|
||||
drawable.colors = intArrayOf(
|
||||
Color.BLACK,
|
||||
HSLToColor(
|
||||
seekBarOne.progress.toFloat(),
|
||||
seekBarTwo.progress / 100f,
|
||||
0.5f
|
||||
),
|
||||
Color.WHITE,
|
||||
)
|
||||
}
|
||||
|
||||
private fun updateValueGradient() {
|
||||
val drawable = seekBarThree.progressDrawable as GradientDrawable
|
||||
drawable.colors = intArrayOf(
|
||||
Color.BLACK,
|
||||
HSVToColor(
|
||||
seekBarOne.progress.toFloat(),
|
||||
seekBarTwo.progress / 100f,
|
||||
1f
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
private fun updateSaturationGradient() {
|
||||
val drawable = seekBarTwo.progressDrawable as GradientDrawable
|
||||
drawable.colors = intArrayOf(
|
||||
Color.WHITE,
|
||||
if (colorModel == ColorModel.HSV) {
|
||||
HSVToColor(
|
||||
seekBarOne.progress.toFloat(),
|
||||
1f,
|
||||
seekBarThree.progress / 100f
|
||||
)
|
||||
} else {
|
||||
HSLToColor(
|
||||
seekBarOne.progress.toFloat(),
|
||||
1f,
|
||||
seekBarThree.progress / 100f
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
private fun updateHueGradient() {
|
||||
val drawable = seekBarOne.progressDrawable as GradientDrawable
|
||||
drawable.colors = hueGradientColors
|
||||
}
|
||||
|
||||
private fun updateRGBGradient(progressDrawable: Drawable, color: Int) {
|
||||
val drawable = progressDrawable as GradientDrawable
|
||||
drawable.colors = intArrayOf(Color.BLACK, color)
|
||||
}
|
||||
|
||||
// inputFromUser should be set to true when user has entered a hex color
|
||||
private fun previewColor(inputFromUser: Boolean) {
|
||||
colorPreview.backgroundTintList = ColorStateList.valueOf(color)
|
||||
colorInput.setTextColor(
|
||||
if (ColorUtils.calculateLuminance(color) > 0.5) {
|
||||
Color.BLACK
|
||||
} else {
|
||||
Color.WHITE
|
||||
}
|
||||
)
|
||||
textInputChangedInternal = true
|
||||
if (!inputFromUser) {
|
||||
colorInput.setText(colorToHex(color))
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateSliderMax() {
|
||||
val isRGB = colorModel == ColorModel.RGB
|
||||
seekBarOne.max = if (isRGB) 255 else 360
|
||||
seekBarTwo.max = if (isRGB) 255 else 100
|
||||
seekBarThree.max = if (isRGB) 255 else 100
|
||||
}
|
||||
|
||||
private enum class ColorModel {
|
||||
RGB,
|
||||
HSL,
|
||||
HSV
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val HEX_PATTERN = Regex("[0-9a-fA-F]+")
|
||||
private val COLOR_HEX_PATTERN = Regex("^[#][0-9a-fA-F]{6}")
|
||||
|
||||
private val hueGradientColors = IntArray(7) {
|
||||
HSVToColor(it * 60f, 1f, 1f)
|
||||
}
|
||||
|
||||
private fun HSVToColor(
|
||||
hue: Float,
|
||||
sat: Float,
|
||||
value: Float,
|
||||
): Int = Color.HSVToColor(floatArrayOf(hue, sat, value))
|
||||
|
||||
private fun HSLToColor(
|
||||
hue: Float,
|
||||
sat: Float,
|
||||
lum: Float,
|
||||
): Int = ColorUtils.HSLToColor(floatArrayOf(hue, sat, lum))
|
||||
|
||||
private fun colorToHex(color: Int) = String.format("#%06X", (0xFFFFFF and color))
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,7 @@ import com.cherish.settings.preferences.SystemSettingListPreference;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
import android.provider.SearchIndexableResource;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -60,20 +61,28 @@ public class LockScreenSettings extends SettingsPreferenceFragment implements
|
||||
Preference.OnPreferenceChangeListener {
|
||||
|
||||
private static final String UDFPS_CATEGORY = "udfps_category";
|
||||
private static final String TORCH_POWER_BUTTON_GESTURE = "torch_power_button_gesture";
|
||||
|
||||
private static final String FINGERPRINT_SUCCESS_VIB = "fingerprint_success_vib";
|
||||
private static final String FINGERPRINT_ERROR_VIB = "fingerprint_error_vib";
|
||||
|
||||
private FingerprintManager mFingerprintManager;
|
||||
private SwitchPreference mFingerprintSuccessVib;
|
||||
private SwitchPreference mFingerprintErrorVib;
|
||||
|
||||
|
||||
private ListPreference mLockClockStyles;
|
||||
private PreferenceCategory mUdfpsCategory;
|
||||
private Context mContext;
|
||||
private ListPreference mTorchPowerButton;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
addPreferencesFromResource(R.xml.cherish_settings_lockscreen);
|
||||
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
PreferenceScreen prefScreen = getPreferenceScreen();
|
||||
Resources resources = getResources();
|
||||
final ContentResolver resolver = getActivity().getContentResolver();
|
||||
final PreferenceScreen prefSet = getPreferenceScreen();
|
||||
final PackageManager mPm = getActivity().getPackageManager();
|
||||
|
||||
Resources res = null;
|
||||
Context ctx = getContext();
|
||||
@@ -89,6 +98,35 @@ public class LockScreenSettings extends SettingsPreferenceFragment implements
|
||||
if (!UdfpsUtils.hasUdfpsSupport(getContext())) {
|
||||
prefSet.removePreference(mUdfpsCategory);
|
||||
}
|
||||
|
||||
// screen off torch
|
||||
mTorchPowerButton = (ListPreference) findPreference(TORCH_POWER_BUTTON_GESTURE);
|
||||
int mTorchPowerButtonValue = Settings.System.getInt(resolver,
|
||||
Settings.System.TORCH_POWER_BUTTON_GESTURE, 0);
|
||||
mTorchPowerButton.setValue(Integer.toString(mTorchPowerButtonValue));
|
||||
mTorchPowerButton.setSummary(mTorchPowerButton.getEntry());
|
||||
mTorchPowerButton.setOnPreferenceChangeListener(this);
|
||||
|
||||
mFingerprintManager = (FingerprintManager) getActivity().getSystemService(Context.FINGERPRINT_SERVICE);
|
||||
mFingerprintSuccessVib = (SwitchPreference) findPreference(FINGERPRINT_SUCCESS_VIB);
|
||||
mFingerprintErrorVib = (SwitchPreference) findPreference(FINGERPRINT_ERROR_VIB);
|
||||
if (mPm.hasSystemFeature(PackageManager.FEATURE_FINGERPRINT) &&
|
||||
mFingerprintManager != null) {
|
||||
if (!mFingerprintManager.isHardwareDetected()){
|
||||
prefSet.removePreference(mFingerprintSuccessVib);
|
||||
prefSet.removePreference(mFingerprintErrorVib);
|
||||
} else {
|
||||
mFingerprintSuccessVib.setChecked((Settings.System.getInt(getContentResolver(),
|
||||
Settings.System.FP_SUCCESS_VIBRATE, 1) == 1));
|
||||
mFingerprintSuccessVib.setOnPreferenceChangeListener(this);
|
||||
mFingerprintErrorVib.setChecked((Settings.System.getInt(getContentResolver(),
|
||||
Settings.System.FP_ERROR_VIBRATE, 1) == 1));
|
||||
mFingerprintErrorVib.setOnPreferenceChangeListener(this);
|
||||
}
|
||||
} else {
|
||||
prefSet.removePreference(mFingerprintSuccessVib);
|
||||
prefSet.removePreference(mFingerprintErrorVib);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -98,6 +136,25 @@ public class LockScreenSettings extends SettingsPreferenceFragment implements
|
||||
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
if (preference == mTorchPowerButton) {
|
||||
int mTorchPowerButtonValue = Integer.valueOf((String) newValue);
|
||||
int index = mTorchPowerButton.findIndexOfValue((String) newValue);
|
||||
mTorchPowerButton.setSummary(
|
||||
mTorchPowerButton.getEntries()[index]);
|
||||
Settings.System.putInt(resolver, Settings.System.TORCH_POWER_BUTTON_GESTURE,
|
||||
mTorchPowerButtonValue);
|
||||
return true;
|
||||
} else if (preference == mFingerprintSuccessVib) {
|
||||
boolean value = (Boolean) newValue;
|
||||
Settings.System.putInt(getActivity().getContentResolver(),
|
||||
Settings.System.FP_SUCCESS_VIBRATE, value ? 1 : 0);
|
||||
return true;
|
||||
} else if (preference == mFingerprintErrorVib) {
|
||||
boolean value = (Boolean) newValue;
|
||||
Settings.System.putInt(getActivity().getContentResolver(),
|
||||
Settings.System.FP_ERROR_VIBRATE, value ? 1 : 0);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,10 +39,12 @@ import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
import android.provider.SearchIndexableResource;
|
||||
|
||||
import com.cherish.settings.fragments.SmartCharging;
|
||||
import com.cherish.settings.fragments.SmartPixels;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
|
||||
@SearchIndexable
|
||||
public class MiscSettings extends SettingsPreferenceFragment implements
|
||||
OnPreferenceChangeListener {
|
||||
private static final String KEY_GAMES_SPOOF = "use_games_spoof";
|
||||
@@ -51,8 +53,13 @@ public class MiscSettings extends SettingsPreferenceFragment implements
|
||||
private static final String SYS_GAMES_SPOOF = "persist.sys.pixelprops.games";
|
||||
private static final String SYS_PHOTOS_SPOOF = "persist.sys.pixelprops.gphotos";
|
||||
|
||||
private static final String SMART_CHARGING = "smart_charging";
|
||||
private static final String SMART_PIXELS = "smart_pixels";
|
||||
|
||||
private SwitchPreference mGamesSpoof;
|
||||
private SwitchPreference mPhotosSpoof;
|
||||
private Preference mSmartCharging;
|
||||
private Preference mSmartPixels;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
@@ -61,15 +68,8 @@ public class MiscSettings extends SettingsPreferenceFragment implements
|
||||
|
||||
addPreferencesFromResource(R.xml.cherish_settings_misc);
|
||||
|
||||
Resources res = null;
|
||||
Context ctx = getContext();
|
||||
float density = Resources.getSystem().getDisplayMetrics().density;
|
||||
|
||||
try {
|
||||
res = ctx.getPackageManager().getResourcesForApplication("com.android.systemui");
|
||||
} catch (NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
final PreferenceScreen prefScreen = getPreferenceScreen();
|
||||
final Resources res = getResources();
|
||||
|
||||
mGamesSpoof = (SwitchPreference) findPreference(KEY_GAMES_SPOOF);
|
||||
mGamesSpoof.setChecked(SystemProperties.getBoolean(SYS_GAMES_SPOOF, false));
|
||||
@@ -79,6 +79,18 @@ public class MiscSettings extends SettingsPreferenceFragment implements
|
||||
mPhotosSpoof.setChecked(SystemProperties.getBoolean(SYS_PHOTOS_SPOOF, true));
|
||||
mPhotosSpoof.setOnPreferenceChangeListener(this);
|
||||
|
||||
mSmartCharging = (Preference) prefScreen.findPreference(SMART_CHARGING);
|
||||
boolean mSmartChargingSupported = res.getBoolean(
|
||||
com.android.internal.R.bool.config_smartChargingAvailable);
|
||||
if (!mSmartChargingSupported)
|
||||
prefScreen.removePreference(mSmartCharging);
|
||||
|
||||
mSmartPixels = (Preference) prefScreen.findPreference(SMART_PIXELS);
|
||||
boolean mSmartPixelsSupported = getResources().getBoolean(
|
||||
com.android.internal.R.bool.config_supportSmartPixels);
|
||||
if (!mSmartPixelsSupported)
|
||||
prefScreen.removePreference(mSmartPixels);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -101,28 +113,22 @@ public class MiscSettings extends SettingsPreferenceFragment implements
|
||||
return MetricsProto.MetricsEvent.CHERISH_SETTINGS;
|
||||
}
|
||||
|
||||
/**
|
||||
* For Search.
|
||||
*/
|
||||
|
||||
public static final SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider() {
|
||||
|
||||
@Override
|
||||
public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
|
||||
boolean enabled) {
|
||||
ArrayList<SearchIndexableResource> result =
|
||||
new ArrayList<SearchIndexableResource>();
|
||||
SearchIndexableResource sir = new SearchIndexableResource(context);
|
||||
sir.xmlResId = R.xml.cherish_settings_misc;
|
||||
result.add(sir);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.cherish_settings_misc) {
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
|
||||
boolean mSmartChargingSupported = context.getResources().getBoolean(
|
||||
com.android.internal.R.bool.config_smartChargingAvailable);
|
||||
boolean mSmartPixelsSupported = context.getResources().getBoolean(
|
||||
com.android.internal.R.bool.config_supportSmartPixels);
|
||||
if (!mSmartChargingSupported)
|
||||
keys.add(SMART_CHARGING);
|
||||
if (!mSmartPixelsSupported)
|
||||
keys.add(SMART_PIXELS);
|
||||
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
350
src/com/cherish/settings/fragments/MonetSettings.java
Normal file
350
src/com/cherish/settings/fragments/MonetSettings.java
Normal file
@@ -0,0 +1,350 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Yet Another AOSP 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.cherish.settings.fragments;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.Preference.OnPreferenceChangeListener;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settings.R;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
import net.margaritov.preference.colorpicker.ColorPickerPreference;
|
||||
import com.cherish.settings.preferences.CustomSeekBarPreference;
|
||||
|
||||
import java.lang.CharSequence;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
@SearchIndexable
|
||||
public class MonetSettings extends SettingsPreferenceFragment implements
|
||||
OnPreferenceChangeListener {
|
||||
|
||||
private static final String OVERLAY_CATEGORY_ACCENT_COLOR =
|
||||
"android.theme.customization.accent_color";
|
||||
private static final String OVERLAY_CATEGORY_SYSTEM_PALETTE =
|
||||
"android.theme.customization.system_palette";
|
||||
private static final String OVERLAY_CATEGORY_THEME_STYLE =
|
||||
"android.theme.customization.theme_style";
|
||||
private static final String OVERLAY_CATEGORY_BG_COLOR =
|
||||
"android.theme.customization.bg_color";
|
||||
private static final String OVERLAY_COLOR_SOURCE =
|
||||
"android.theme.customization.color_source";
|
||||
private static final String OVERLAY_COLOR_BOTH =
|
||||
"android.theme.customization.color_both";
|
||||
private static final String OVERLAY_LUMINANCE_FACTOR =
|
||||
"android.theme.customization.luminance_factor";
|
||||
private static final String OVERLAY_CHROMA_FACTOR =
|
||||
"android.theme.customization.chroma_factor";
|
||||
private static final String OVERLAY_TINT_BACKGROUND =
|
||||
"android.theme.customization.tint_background";
|
||||
private static final String COLOR_SOURCE_PRESET = "preset";
|
||||
private static final String COLOR_SOURCE_HOME = "home_wallpaper";
|
||||
private static final String COLOR_SOURCE_LOCK = "lock_wallpaper";
|
||||
|
||||
private static final String PREF_THEME_STYLE = "theme_style";
|
||||
private static final String PREF_COLOR_SOURCE = "color_source";
|
||||
private static final String PREF_ACCENT_COLOR = "accent_color";
|
||||
private static final String PREF_ACCENT_BACKGROUND = "accent_background";
|
||||
private static final String PREF_BG_COLOR = "bg_color";
|
||||
private static final String PREF_LUMINANCE_FACTOR = "luminance_factor";
|
||||
private static final String PREF_CHROMA_FACTOR = "chroma_factor";
|
||||
private static final String PREF_TINT_BACKGROUND = "tint_background";
|
||||
|
||||
private ListPreference mThemeStylePref;
|
||||
private ListPreference mColorSourcePref;
|
||||
private ColorPickerPreference mAccentColorPref;
|
||||
private SwitchPreference mAccentBackgroundPref;
|
||||
private ColorPickerPreference mBgColorPref;
|
||||
private CustomSeekBarPreference mLuminancePref;
|
||||
private CustomSeekBarPreference mChromaPref;
|
||||
private SwitchPreference mTintBackgroundPref;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
addPreferencesFromResource(R.xml.monet_settings);
|
||||
|
||||
mThemeStylePref = findPreference(PREF_THEME_STYLE);
|
||||
mColorSourcePref = findPreference(PREF_COLOR_SOURCE);
|
||||
mAccentColorPref = findPreference(PREF_ACCENT_COLOR);
|
||||
mAccentBackgroundPref = findPreference(PREF_ACCENT_BACKGROUND);
|
||||
mBgColorPref = findPreference(PREF_BG_COLOR);
|
||||
mLuminancePref = findPreference(PREF_LUMINANCE_FACTOR);
|
||||
mChromaPref = findPreference(PREF_CHROMA_FACTOR);
|
||||
mTintBackgroundPref = findPreference(PREF_TINT_BACKGROUND);
|
||||
|
||||
updatePreferences();
|
||||
|
||||
mThemeStylePref.setOnPreferenceChangeListener(this);
|
||||
mColorSourcePref.setOnPreferenceChangeListener(this);
|
||||
mAccentColorPref.setOnPreferenceChangeListener(this);
|
||||
mAccentBackgroundPref.setOnPreferenceChangeListener(this);
|
||||
mBgColorPref.setOnPreferenceChangeListener(this);
|
||||
mLuminancePref.setOnPreferenceChangeListener(this);
|
||||
mChromaPref.setOnPreferenceChangeListener(this);
|
||||
mTintBackgroundPref.setOnPreferenceChangeListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
updatePreferences();
|
||||
}
|
||||
|
||||
private void updatePreferences() {
|
||||
final String overlayPackageJson = Settings.Secure.getStringForUser(
|
||||
getActivity().getContentResolver(),
|
||||
Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES,
|
||||
UserHandle.USER_CURRENT);
|
||||
if (overlayPackageJson != null && !overlayPackageJson.isEmpty()) {
|
||||
try {
|
||||
final JSONObject object = new JSONObject(overlayPackageJson);
|
||||
final String style = object.optString(OVERLAY_CATEGORY_THEME_STYLE, null);
|
||||
final String source = object.optString(OVERLAY_COLOR_SOURCE, null);
|
||||
final String color = object.optString(OVERLAY_CATEGORY_SYSTEM_PALETTE, null);
|
||||
final int bgColor = object.optInt(OVERLAY_CATEGORY_BG_COLOR);
|
||||
final boolean both = object.optInt(OVERLAY_COLOR_BOTH, 0) == 1;
|
||||
final boolean tintBG = object.optInt(OVERLAY_TINT_BACKGROUND, 0) == 1;
|
||||
final float lumin = (float) object.optDouble(OVERLAY_LUMINANCE_FACTOR, 1d);
|
||||
final float chroma = (float) object.optDouble(OVERLAY_CHROMA_FACTOR, 1d);
|
||||
// style handling
|
||||
boolean styleUpdated = false;
|
||||
if (style != null && !style.isEmpty()) {
|
||||
for (CharSequence value : mThemeStylePref.getEntryValues()) {
|
||||
if (value.toString().equals(style)) {
|
||||
styleUpdated = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (styleUpdated) {
|
||||
updateListByValue(mThemeStylePref, style);
|
||||
}
|
||||
}
|
||||
if (!styleUpdated) {
|
||||
updateListByValue(mThemeStylePref,
|
||||
mThemeStylePref.getEntryValues()[0].toString());
|
||||
}
|
||||
// color handling
|
||||
final String sourceVal = (source == null || source.isEmpty() ||
|
||||
(source.equals(COLOR_SOURCE_HOME) && both)) ? "both" : source;
|
||||
updateListByValue(mColorSourcePref, sourceVal);
|
||||
final boolean enabled = updateAccentEnablement(sourceVal);
|
||||
if (enabled && color != null && !color.isEmpty()) {
|
||||
mAccentColorPref.setNewPreviewColor(
|
||||
ColorPickerPreference.convertToColorInt(color));
|
||||
}
|
||||
final boolean bgEnabled = enabled && bgColor != 0;
|
||||
if (bgEnabled) {
|
||||
mBgColorPref.setNewPreviewColor(bgColor);
|
||||
} else if (!enabled) {
|
||||
mAccentBackgroundPref.setEnabled(false);
|
||||
}
|
||||
mAccentBackgroundPref.setChecked(bgEnabled);
|
||||
mBgColorPref.setEnabled(bgEnabled);
|
||||
// etc
|
||||
int luminV = 0;
|
||||
if (lumin > 1d) luminV = Math.round((lumin - 1f) * 100f);
|
||||
else if (lumin < 1d) luminV = -1 * Math.round((1f - lumin) * 100f);
|
||||
mLuminancePref.setValue(luminV);
|
||||
int chromaV = 0;
|
||||
if (chroma > 1d) chromaV = Math.round((chroma - 1f) * 100f);
|
||||
else if (chroma < 1d) chromaV = -1 * Math.round((1f - chroma) * 100f);
|
||||
mChromaPref.setValue(chromaV);
|
||||
mTintBackgroundPref.setChecked(tintBG);
|
||||
} catch (JSONException | IllegalArgumentException ignored) {}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
final ContentResolver resolver = getActivity().getContentResolver();
|
||||
if (preference == mThemeStylePref) {
|
||||
String value = (String) newValue;
|
||||
setStyleValue(value);
|
||||
updateListByValue(mThemeStylePref, value, false);
|
||||
return true;
|
||||
} else if (preference == mColorSourcePref) {
|
||||
String value = (String) newValue;
|
||||
setSourceValue(value);
|
||||
updateListByValue(mColorSourcePref, value, false);
|
||||
updateAccentEnablement(value);
|
||||
return true;
|
||||
} else if (preference == mAccentColorPref) {
|
||||
int value = (Integer) newValue;
|
||||
setColorValue(value);
|
||||
return true;
|
||||
} else if (preference == mAccentBackgroundPref) {
|
||||
boolean value = (Boolean) newValue;
|
||||
if (!value) setBgColorValue(0);
|
||||
mBgColorPref.setEnabled(value);
|
||||
return true;
|
||||
} else if (preference == mBgColorPref) {
|
||||
int value = (Integer) newValue;
|
||||
setBgColorValue(value);
|
||||
return true;
|
||||
} else if (preference == mLuminancePref) {
|
||||
int value = (Integer) newValue;
|
||||
setLuminanceValue(value);
|
||||
return true;
|
||||
} else if (preference == mChromaPref) {
|
||||
int value = (Integer) newValue;
|
||||
setChromaValue(value);
|
||||
return true;
|
||||
} else if (preference == mTintBackgroundPref) {
|
||||
boolean value = (Boolean) newValue;
|
||||
setTintBackgroundValue(value);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void updateListByValue(ListPreference pref, String value) {
|
||||
updateListByValue(pref, value, true);
|
||||
}
|
||||
|
||||
private void updateListByValue(ListPreference pref, String value, boolean set) {
|
||||
if (set) pref.setValue(value);
|
||||
final int index = pref.findIndexOfValue(value);
|
||||
pref.setSummary(pref.getEntries()[index]);
|
||||
}
|
||||
|
||||
private boolean updateAccentEnablement(String source) {
|
||||
final boolean shouldEnable = source != null && source.equals(COLOR_SOURCE_PRESET);
|
||||
mAccentColorPref.setEnabled(shouldEnable);
|
||||
mAccentBackgroundPref.setEnabled(shouldEnable);
|
||||
if (!shouldEnable) {
|
||||
mBgColorPref.setEnabled(false);
|
||||
mAccentBackgroundPref.setEnabled(false);
|
||||
mAccentBackgroundPref.setChecked(false);
|
||||
}
|
||||
return shouldEnable;
|
||||
}
|
||||
|
||||
private JSONObject getSettingsJson() throws JSONException {
|
||||
final String overlayPackageJson = Settings.Secure.getStringForUser(
|
||||
getActivity().getContentResolver(),
|
||||
Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES,
|
||||
UserHandle.USER_CURRENT);
|
||||
JSONObject object;
|
||||
if (overlayPackageJson == null || overlayPackageJson.isEmpty())
|
||||
return new JSONObject();
|
||||
return new JSONObject(overlayPackageJson);
|
||||
}
|
||||
|
||||
private void putSettingsJson(JSONObject object) {
|
||||
Settings.Secure.putStringForUser(
|
||||
getActivity().getContentResolver(),
|
||||
Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES,
|
||||
object.toString(), UserHandle.USER_CURRENT);
|
||||
}
|
||||
|
||||
private void setStyleValue(String style) {
|
||||
try {
|
||||
JSONObject object = getSettingsJson();
|
||||
object.putOpt(OVERLAY_CATEGORY_THEME_STYLE, style);
|
||||
putSettingsJson(object);
|
||||
} catch (JSONException | IllegalArgumentException ignored) {}
|
||||
}
|
||||
|
||||
private void setSourceValue(String source) {
|
||||
try {
|
||||
JSONObject object = getSettingsJson();
|
||||
if (source.equals("both")) {
|
||||
object.putOpt(OVERLAY_COLOR_BOTH, 1);
|
||||
object.putOpt(OVERLAY_COLOR_SOURCE, COLOR_SOURCE_HOME);
|
||||
} else {
|
||||
object.remove(OVERLAY_COLOR_BOTH);
|
||||
object.putOpt(OVERLAY_COLOR_SOURCE, source);
|
||||
}
|
||||
if (!source.equals(COLOR_SOURCE_PRESET)) {
|
||||
object.remove(OVERLAY_CATEGORY_ACCENT_COLOR);
|
||||
object.remove(OVERLAY_CATEGORY_SYSTEM_PALETTE);
|
||||
}
|
||||
putSettingsJson(object);
|
||||
} catch (JSONException | IllegalArgumentException ignored) {}
|
||||
}
|
||||
|
||||
private void setColorValue(int color) {
|
||||
try {
|
||||
JSONObject object = getSettingsJson();
|
||||
final String rgbColor = ColorPickerPreference.convertToRGB(color).replace("#", "");
|
||||
object.putOpt(OVERLAY_CATEGORY_ACCENT_COLOR, rgbColor);
|
||||
object.putOpt(OVERLAY_CATEGORY_SYSTEM_PALETTE, rgbColor);
|
||||
object.putOpt(OVERLAY_COLOR_SOURCE, COLOR_SOURCE_PRESET);
|
||||
putSettingsJson(object);
|
||||
} catch (JSONException | IllegalArgumentException ignored) {}
|
||||
}
|
||||
|
||||
private void setBgColorValue(int color) {
|
||||
try {
|
||||
JSONObject object = getSettingsJson();
|
||||
if (color != 0) object.putOpt(OVERLAY_CATEGORY_BG_COLOR, color);
|
||||
else object.remove(OVERLAY_CATEGORY_BG_COLOR);
|
||||
putSettingsJson(object);
|
||||
} catch (JSONException | IllegalArgumentException ignored) {}
|
||||
}
|
||||
|
||||
private void setLuminanceValue(int lumin) {
|
||||
try {
|
||||
JSONObject object = getSettingsJson();
|
||||
if (lumin == 0)
|
||||
object.remove(OVERLAY_LUMINANCE_FACTOR);
|
||||
else
|
||||
object.putOpt(OVERLAY_LUMINANCE_FACTOR, 1d + ((double) lumin / 100d));
|
||||
putSettingsJson(object);
|
||||
} catch (JSONException | IllegalArgumentException ignored) {}
|
||||
}
|
||||
|
||||
private void setChromaValue(int chroma) {
|
||||
try {
|
||||
JSONObject object = getSettingsJson();
|
||||
if (chroma == 0)
|
||||
object.remove(OVERLAY_CHROMA_FACTOR);
|
||||
else
|
||||
object.putOpt(OVERLAY_CHROMA_FACTOR, 1d + ((double) chroma / 100d));
|
||||
putSettingsJson(object);
|
||||
} catch (JSONException | IllegalArgumentException ignored) {}
|
||||
}
|
||||
|
||||
private void setTintBackgroundValue(boolean tint) {
|
||||
try {
|
||||
JSONObject object = getSettingsJson();
|
||||
if (!tint) object.remove(OVERLAY_TINT_BACKGROUND);
|
||||
else object.putOpt(OVERLAY_TINT_BACKGROUND, 1);
|
||||
putSettingsJson(object);
|
||||
} catch (JSONException | IllegalArgumentException ignored) {}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsProto.MetricsEvent.CHERISH_SETTINGS;
|
||||
}
|
||||
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.monet_settings);
|
||||
}
|
||||
@@ -40,6 +40,16 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
|
||||
private static final String INCALL_VIB_OPTIONS = "incall_vib_options";
|
||||
private static final String ALERT_SLIDER_PREF = "alert_slider_notifications";
|
||||
|
||||
private static final String AMBIENT_LIGHT_COLOR = "ambient_notification_color_mode";
|
||||
private static final String AMBIENT_LIGHT_CUSTOM_COLOR = "ambient_notification_light_color";
|
||||
private static final String AMBIENT_LIGHT_DURATION = "ambient_notification_light_duration";
|
||||
private static final String AMBIENT_LIGHT_REPEAT_COUNT = "ambient_notification_light_repeats";
|
||||
|
||||
private SystemSettingListPreference mEdgeLightColorMode;
|
||||
private ColorPickerPreference mEdgeLightColor;
|
||||
private CustomSeekBarPreference mEdgeLightDuration;
|
||||
private CustomSeekBarPreference mEdgeLightRepeatCount;
|
||||
|
||||
private Preference mChargingLeds;
|
||||
private Preference mAlertSlider;
|
||||
@Override
|
||||
@@ -64,6 +74,39 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
|
||||
prefScreen.removePreference(mChargingLeds);
|
||||
}
|
||||
|
||||
Context context = getContext();
|
||||
|
||||
mEdgeLightColorMode = (SystemSettingListPreference) findPreference(AMBIENT_LIGHT_COLOR);
|
||||
int edgeLightColorMode = Settings.System.getIntForUser(getContentResolver(),
|
||||
Settings.System.NOTIFICATION_PULSE_COLOR_MODE, 0, UserHandle.USER_CURRENT);
|
||||
mEdgeLightColorMode.setValue(String.valueOf(edgeLightColorMode));
|
||||
mEdgeLightColorMode.setSummary(mEdgeLightColorMode.getEntry());
|
||||
mEdgeLightColorMode.setOnPreferenceChangeListener(this);
|
||||
|
||||
mEdgeLightColor = (ColorPickerPreference) findPreference(AMBIENT_LIGHT_CUSTOM_COLOR);
|
||||
int edgeLightColor = Settings.System.getInt(getContentResolver(),
|
||||
Settings.System.NOTIFICATION_PULSE_COLOR, 0xFFFFFFFF);
|
||||
mEdgeLightColor.setNewPreviewColor(edgeLightColor);
|
||||
String edgeLightColorHex = String.format("#%08x", (0xFFFFFFFF & edgeLightColor));
|
||||
if (edgeLightColorHex.equals("#ffffffff")) {
|
||||
mEdgeLightColor.setSummary(R.string.default_string);
|
||||
} else {
|
||||
mEdgeLightColor.setSummary(edgeLightColorHex);
|
||||
}
|
||||
mEdgeLightColor.setOnPreferenceChangeListener(this);
|
||||
|
||||
mEdgeLightDuration = (CustomSeekBarPreference) findPreference(AMBIENT_LIGHT_DURATION);
|
||||
int lightDuration = Settings.System.getIntForUser(getContentResolver(),
|
||||
Settings.System.NOTIFICATION_PULSE_DURATION, 2, UserHandle.USER_CURRENT);
|
||||
mEdgeLightDuration.setValue(lightDuration);
|
||||
mEdgeLightDuration.setOnPreferenceChangeListener(this);
|
||||
|
||||
mEdgeLightRepeatCount = (CustomSeekBarPreference) findPreference(AMBIENT_LIGHT_REPEAT_COUNT);
|
||||
int edgeLightRepeatCount = Settings.System.getIntForUser(getContentResolver(),
|
||||
Settings.System.NOTIFICATION_PULSE_REPEATS, 0, UserHandle.USER_CURRENT);
|
||||
mEdgeLightRepeatCount.setValue(edgeLightRepeatCount);
|
||||
mEdgeLightRepeatCount.setOnPreferenceChangeListener(this);
|
||||
|
||||
PreferenceCategory incallVibCategory = (PreferenceCategory) findPreference(INCALL_VIB_OPTIONS);
|
||||
if (!CherishUtils.isVoiceCapable(getActivity())) {
|
||||
prefScreen.removePreference(incallVibCategory);
|
||||
@@ -73,6 +116,42 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
if (preference == mEdgeLightColorMode) {
|
||||
int edgeLightColorMode = Integer.valueOf((String) newValue);
|
||||
int index = mEdgeLightColorMode.findIndexOfValue((String) newValue);
|
||||
Settings.System.putIntForUser(getContentResolver(),
|
||||
Settings.System.NOTIFICATION_PULSE_COLOR_MODE, edgeLightColorMode, UserHandle.USER_CURRENT);
|
||||
mEdgeLightColorMode.setSummary(mEdgeLightColorMode.getEntries()[index]);
|
||||
if (edgeLightColorMode == 3) {
|
||||
mEdgeLightColor.setEnabled(true);
|
||||
} else {
|
||||
mEdgeLightColor.setEnabled(false);
|
||||
}
|
||||
return true;
|
||||
} else if (preference == mEdgeLightColor) {
|
||||
String hex = ColorPickerPreference.convertToARGB(
|
||||
Integer.valueOf(String.valueOf(newValue)));
|
||||
if (hex.equals("#ffffffff")) {
|
||||
preference.setSummary(R.string.default_string);
|
||||
} else {
|
||||
preference.setSummary(hex);
|
||||
}
|
||||
int intHex = ColorPickerPreference.convertToColorInt(hex);
|
||||
Settings.System.putInt(getContentResolver(),
|
||||
Settings.System.NOTIFICATION_PULSE_COLOR, intHex);
|
||||
return true;
|
||||
} else if (preference == mEdgeLightDuration) {
|
||||
int value = (Integer) newValue;
|
||||
Settings.System.putIntForUser(getContentResolver(),
|
||||
Settings.System.NOTIFICATION_PULSE_DURATION, value, UserHandle.USER_CURRENT);
|
||||
return true;
|
||||
} else if (preference == mEdgeLightRepeatCount) {
|
||||
int value = (Integer) newValue;
|
||||
Settings.System.putIntForUser(getContentResolver(),
|
||||
Settings.System.NOTIFICATION_PULSE_REPEATS, value, UserHandle.USER_CURRENT);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
171
src/com/cherish/settings/fragments/QsTileLayoutSettings.java
Normal file
171
src/com/cherish/settings/fragments/QsTileLayoutSettings.java
Normal file
@@ -0,0 +1,171 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The Nameless-AOSP 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.cherish.settings.fragments;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.internal.util.systemui.qs.QSLayoutUtils;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
|
||||
import com.android.settingslib.widget.LayoutPreference;
|
||||
|
||||
import com.cherish.settings.preferences.CustomSeekBarPreference;
|
||||
import com.cherish.settings.preferences.SystemSettingSwitchPreference;
|
||||
|
||||
public class QsTileLayoutSettings extends SettingsPreferenceFragment
|
||||
implements Preference.OnPreferenceChangeListener {
|
||||
|
||||
private static final String KEY_QS_HIDE_LABEL = "qs_tile_label_hide";
|
||||
private static final String KEY_QS_VERTICAL_LAYOUT = "qs_tile_vertical_layout";
|
||||
private static final String KEY_QS_COLUMN_PORTRAIT = "qs_layout_columns";
|
||||
private static final String KEY_QS_ROW_PORTRAIT = "qs_layout_rows";
|
||||
private static final String KEY_QQS_ROW_PORTRAIT = "qqs_layout_rows";
|
||||
private static final String KEY_APPLY_CHANGE_BUTTON = "apply_change_button";
|
||||
|
||||
private Context mContext;
|
||||
|
||||
private CustomSeekBarPreference mQsColumns;
|
||||
private CustomSeekBarPreference mQsRows;
|
||||
private CustomSeekBarPreference mQqsRows;
|
||||
|
||||
private Button mApplyChange;
|
||||
|
||||
private SystemSettingSwitchPreference mHide;
|
||||
private SystemSettingSwitchPreference mVertical;
|
||||
|
||||
private int[] currentValue = new int[2];
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstance) {
|
||||
super.onCreate(savedInstance);
|
||||
addPreferencesFromResource(R.xml.qs_tile_layout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
mQsColumns = (CustomSeekBarPreference) findPreference(KEY_QS_COLUMN_PORTRAIT);
|
||||
mQsColumns.setOnPreferenceChangeListener(this);
|
||||
|
||||
mQsRows = (CustomSeekBarPreference) findPreference(KEY_QS_ROW_PORTRAIT);
|
||||
mQsRows.setOnPreferenceChangeListener(this);
|
||||
|
||||
mQqsRows = (CustomSeekBarPreference) findPreference(KEY_QQS_ROW_PORTRAIT);
|
||||
mQqsRows.setOnPreferenceChangeListener(this);
|
||||
|
||||
mContext = getContext();
|
||||
|
||||
LayoutPreference preference = findPreference(KEY_APPLY_CHANGE_BUTTON);
|
||||
mApplyChange = (Button) preference.findViewById(R.id.apply_change);
|
||||
mApplyChange.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mApplyChange.isEnabled()) {
|
||||
final int[] newValue = {
|
||||
mQsRows.getValue() * 10 + mQsColumns.getValue(),
|
||||
mQqsRows.getValue() * 10 + mQsColumns.getValue()
|
||||
};
|
||||
Settings.System.putIntForUser(getContentResolver(),
|
||||
Settings.System.QS_LAYOUT, newValue[0], UserHandle.USER_CURRENT);
|
||||
Settings.System.putIntForUser(getContentResolver(),
|
||||
Settings.System.QQS_LAYOUT, newValue[1], UserHandle.USER_CURRENT);
|
||||
if (QSLayoutUtils.updateLayout(mContext)) {
|
||||
currentValue[0] = newValue[0];
|
||||
currentValue[1] = newValue[1];
|
||||
mApplyChange.setEnabled(false);
|
||||
} else {
|
||||
Settings.System.putIntForUser(getContentResolver(),
|
||||
Settings.System.QS_LAYOUT, currentValue[0], UserHandle.USER_CURRENT);
|
||||
Settings.System.putIntForUser(getContentResolver(),
|
||||
Settings.System.QQS_LAYOUT, currentValue[1], UserHandle.USER_CURRENT);
|
||||
Toast.makeText(mContext, R.string.qs_apply_change_failed, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
initPreference();
|
||||
|
||||
final boolean hideLabel = Settings.System.getIntForUser(getContentResolver(),
|
||||
Settings.System.QS_TILE_LABEL_HIDE, 0, UserHandle.USER_CURRENT) == 1;
|
||||
|
||||
mHide = (SystemSettingSwitchPreference) findPreference(KEY_QS_HIDE_LABEL);
|
||||
mHide.setOnPreferenceChangeListener(this);
|
||||
|
||||
mVertical = (SystemSettingSwitchPreference) findPreference(KEY_QS_VERTICAL_LAYOUT);
|
||||
mVertical.setEnabled(!hideLabel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
if (preference == mHide) {
|
||||
boolean hideLabel = (Boolean) newValue;
|
||||
mVertical.setEnabled(!hideLabel);
|
||||
} else if (preference == mQsColumns) {
|
||||
int qs_columns = Integer.parseInt(newValue.toString());
|
||||
mApplyChange.setEnabled(
|
||||
currentValue[0] != mQsRows.getValue() * 10 + qs_columns ||
|
||||
currentValue[1] != mQqsRows.getValue() * 10 + qs_columns
|
||||
);
|
||||
} else if (preference == mQsRows) {
|
||||
int qs_rows = Integer.parseInt(newValue.toString());
|
||||
mQqsRows.setMax(qs_rows - 1);
|
||||
if (mQqsRows.getValue() > qs_rows - 1) {
|
||||
mQqsRows.setValue(qs_rows - 1);
|
||||
}
|
||||
mApplyChange.setEnabled(
|
||||
currentValue[0] != qs_rows * 10 + mQsColumns.getValue() ||
|
||||
currentValue[1] != mQqsRows.getValue() * 10 + mQsColumns.getValue()
|
||||
);
|
||||
} else if (preference == mQqsRows) {
|
||||
int qqs_rows = Integer.parseInt(newValue.toString());
|
||||
mApplyChange.setEnabled(
|
||||
currentValue[0] != mQsRows.getValue() * 10 + mQsColumns.getValue() ||
|
||||
currentValue[1] != qqs_rows * 10 + mQsColumns.getValue()
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsProto.MetricsEvent.CHERISH_SETTINGS;
|
||||
}
|
||||
|
||||
private void initPreference() {
|
||||
final int index_qs = Settings.System.getIntForUser(getContentResolver(),
|
||||
Settings.System.QS_LAYOUT, 42, UserHandle.USER_CURRENT);
|
||||
final int index_qqs = Settings.System.getIntForUser(getContentResolver(),
|
||||
Settings.System.QQS_LAYOUT, 22, UserHandle.USER_CURRENT);
|
||||
mQsColumns.setValue(index_qs % 10);
|
||||
mQsRows.setValue(index_qs / 10);
|
||||
mQqsRows.setValue(index_qqs / 10);
|
||||
mQqsRows.setMax(mQsRows.getValue() - 1);
|
||||
currentValue[0] = index_qs;
|
||||
currentValue[1] = index_qqs;
|
||||
}
|
||||
}
|
||||
68
src/com/cherish/settings/fragments/SmartCharging.java
Normal file
68
src/com/cherish/settings/fragments/SmartCharging.java
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 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.
|
||||
*/
|
||||
|
||||
package com.cherish.settings.fragments;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.Preference.OnPreferenceChangeListener;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
|
||||
public class SmartCharging extends SettingsPreferenceFragment {
|
||||
|
||||
private static final String TAG = "SmartCharging";
|
||||
private static final String SMART_CHARGING_FOOTER = "smart_charging_footer";
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
addPreferencesFromResource(R.xml.smart_charging);
|
||||
|
||||
findPreference(SMART_CHARGING_FOOTER).setTitle(R.string.smart_charging_footer);
|
||||
}
|
||||
|
||||
public static void reset(Context mContext) {
|
||||
ContentResolver resolver = mContext.getContentResolver();
|
||||
Settings.System.putIntForUser(resolver,
|
||||
Settings.System.SMART_CHARGING, 0, UserHandle.USER_CURRENT);
|
||||
Settings.System.putIntForUser(resolver,
|
||||
Settings.System.SMART_CHARGING_RESET_STATS, 0, UserHandle.USER_CURRENT);
|
||||
Settings.System.putIntForUser(resolver,
|
||||
Settings.System.SMART_CHARGING_LEVEL, 80, UserHandle.USER_CURRENT);
|
||||
Settings.System.putIntForUser(resolver,
|
||||
Settings.System.SMART_CHARGING_RESUME_LEVEL, 60, UserHandle.USER_CURRENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsProto.MetricsEvent.CHERISH_SETTINGS;
|
||||
}
|
||||
}
|
||||
57
src/com/cherish/settings/fragments/SmartPixels.java
Normal file
57
src/com/cherish/settings/fragments/SmartPixels.java
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 crDroid Android 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.cherish.settings.fragments;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.Preference.OnPreferenceChangeListener;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
|
||||
public class SmartPixels extends SettingsPreferenceFragment {
|
||||
|
||||
private static final String TAG = "SmartPixels";
|
||||
|
||||
private static final String SMART_PIXELS_FOOTER = "smart_pixels_footer";
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
addPreferencesFromResource(R.xml.cherish_settings_smart_pixels);
|
||||
|
||||
findPreference(SMART_PIXELS_FOOTER).setTitle(R.string.smart_pixels_warning_text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsProto.MetricsEvent.CHERISH_SETTINGS;
|
||||
}
|
||||
}
|
||||
@@ -109,10 +109,6 @@ public class StatusBarBattery extends SettingsPreferenceFragment
|
||||
Settings.System.STATUS_BAR_SHOW_BATTERY_PERCENT, 0, UserHandle.USER_CURRENT);
|
||||
Settings.System.putIntForUser(resolver,
|
||||
Settings.System.STATUS_BAR_BATTERY_TEXT_CHARGING, 1, UserHandle.USER_CURRENT);
|
||||
Settings.System.putIntForUser(resolver,
|
||||
Settings.System.QS_BATTERY_STYLE, -1, UserHandle.USER_CURRENT);
|
||||
Settings.System.putIntForUser(resolver,
|
||||
Settings.System.QS_SHOW_BATTERY_PERCENT, 2, UserHandle.USER_CURRENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,7 +46,16 @@ import java.util.Collections;
|
||||
|
||||
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
|
||||
public class StatusBarSettings extends SettingsPreferenceFragment implements
|
||||
OnPreferenceChangeListener {
|
||||
Preference.OnPreferenceChangeListener {
|
||||
|
||||
private static final String VOLTE_ICON_STYLE = "volte_icon_style";
|
||||
private static final String VOWIFI_ICON_STYLE = "vowifi_icon_style";
|
||||
|
||||
private Preference mCombinedSignalIcons;
|
||||
|
||||
private SystemSettingListPreference mVolteIconStyle;
|
||||
private SystemSettingListPreference mVowifiIconStyle;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
@@ -56,11 +65,43 @@ public class StatusBarSettings extends SettingsPreferenceFragment implements
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
|
||||
PreferenceScreen prefSet = getPreferenceScreen();
|
||||
mVowifiIconStyle = (SystemSettingListPreference) findPreference(VOWIFI_ICON_STYLE);
|
||||
mVolteIconStyle = (SystemSettingListPreference) findPreference(VOLTE_ICON_STYLE);
|
||||
|
||||
int vowifiIconStyle = Settings.System.getInt(getActivity().getContentResolver(),
|
||||
Settings.System.VOWIFI_ICON_STYLE, 1);
|
||||
mVowifiIconStyle.setValue(String.valueOf(vowifiIconStyle));
|
||||
mVowifiIconStyle.setOnPreferenceChangeListener(this);
|
||||
if (vowifiIconStyle == 0) {
|
||||
mVolteIconStyle.setEnabled(true);
|
||||
} else {
|
||||
mVolteIconStyle.setEnabled(false);
|
||||
}
|
||||
|
||||
mCombinedSignalIcons = findPreference("persist.sys.flags.combined_signal_icons");
|
||||
mCombinedSignalIcons.setOnPreferenceChangeListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object objValue) {
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
if (preference == mVowifiIconStyle) {
|
||||
int vowifiIconStyle = Integer.parseInt(((String) newValue).toString());
|
||||
Settings.System.putInt(resolver,
|
||||
Settings.System.VOWIFI_ICON_STYLE, vowifiIconStyle);
|
||||
mVowifiIconStyle.setValue(String.valueOf(vowifiIconStyle));
|
||||
if (vowifiIconStyle == 0) {
|
||||
mVolteIconStyle.setEnabled(true);
|
||||
} else {
|
||||
mVolteIconStyle.setEnabled(false);
|
||||
}
|
||||
return true;
|
||||
} else if (preference == mCombinedSignalIcons) {
|
||||
boolean value = (Boolean) newValue;
|
||||
Settings.Secure.putIntForUser(getContentResolver(),
|
||||
Settings.Secure.ENABLE_COMBINED_SIGNAL_ICONS, value ? 1 : 0, UserHandle.USER_CURRENT);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cherish.settings.fragments;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import static android.os.UserHandle.USER_SYSTEM;
|
||||
import static android.os.UserHandle.USER_CURRENT;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
@@ -59,7 +60,9 @@ import android.provider.SearchIndexableResource;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
import android.database.ContentObserver;
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import com.android.internal.util.cherish.CherishUtils;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.cherish.settings.preferences.SystemSettingListPreference;
|
||||
@@ -73,13 +76,17 @@ public class ThemeSettings extends DashboardFragment implements OnPreferenceChan
|
||||
private static final String SETTINGS_DASHBOARD_STYLE = "settings_dashboard_style";
|
||||
private static final String USE_STOCK_LAYOUT = "use_stock_layout";
|
||||
private static final String DISABLE_USERCARD = "disable_usercard";
|
||||
private static final String QS_PANEL_STYLE = "qs_panel_style";
|
||||
|
||||
public static final String TAG = "ThemeSettings";
|
||||
static final int DEFAULT_QS_PANEL_COLOR = 0xffffffff;
|
||||
static final int DEFAULT = 0xff1a73e8;
|
||||
private Context mContext;
|
||||
|
||||
private Handler mHandler;
|
||||
private IOverlayManager mOverlayManager;
|
||||
private IOverlayManager mOverlayService;
|
||||
private SystemSettingListPreference mQsStyle;
|
||||
private UiModeManager mUiModeManager;
|
||||
private SystemSettingListPreference mSettingsDashBoardStyle;
|
||||
private SystemSettingSwitchPreference mAltSettingsLayout;
|
||||
@@ -125,12 +132,41 @@ public class ThemeSettings extends DashboardFragment implements OnPreferenceChan
|
||||
mUseStockLayout.setOnPreferenceChangeListener(this);
|
||||
mDisableUserCard = (SystemSettingSwitchPreference) findPreference(DISABLE_USERCARD);
|
||||
mDisableUserCard.setOnPreferenceChangeListener(this);
|
||||
|
||||
mOverlayService = IOverlayManager.Stub
|
||||
.asInterface(ServiceManager.getService(Context.OVERLAY_SERVICE));
|
||||
|
||||
mQsStyle = (SystemSettingListPreference) findPreference(QS_PANEL_STYLE);
|
||||
mCustomSettingsObserver.observe();
|
||||
}
|
||||
|
||||
public boolean isAvailable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private CustomSettingsObserver mCustomSettingsObserver = new CustomSettingsObserver(mHandler);
|
||||
private class CustomSettingsObserver extends ContentObserver {
|
||||
|
||||
CustomSettingsObserver(Handler handler) {
|
||||
super(handler);
|
||||
}
|
||||
|
||||
void observe() {
|
||||
Context mContext = getContext();
|
||||
ContentResolver resolver = mContext.getContentResolver();
|
||||
resolver.registerContentObserver(Settings.System.getUriFor(
|
||||
Settings.System.QS_PANEL_STYLE),
|
||||
false, this, UserHandle.USER_ALL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChange(boolean selfChange, Uri uri) {
|
||||
if (uri.equals(Settings.System.getUriFor(Settings.System.QS_PANEL_STYLE))) {
|
||||
updateQsStyle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object objValue) {
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
@@ -145,11 +181,79 @@ public class ThemeSettings extends DashboardFragment implements OnPreferenceChan
|
||||
return true;
|
||||
} else if (preference == mDisableUserCard) {
|
||||
CherishUtils.showSettingsRestartDialog(getContext());
|
||||
return true;
|
||||
} else if (preference == mQsStyle) {
|
||||
mCustomSettingsObserver.observe();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void updateQsStyle() {
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
|
||||
int qsPanelStyle = Settings.System.getIntForUser(getContext().getContentResolver(),
|
||||
Settings.System.QS_PANEL_STYLE , 0, UserHandle.USER_CURRENT);
|
||||
|
||||
if (qsPanelStyle == 0) {
|
||||
setDefaultStyle(mOverlayService);
|
||||
} else if (qsPanelStyle == 1) {
|
||||
setQsStyle(mOverlayService, "com.android.system.qs.outline");
|
||||
} else if (qsPanelStyle == 2 || qsPanelStyle == 3) {
|
||||
setQsStyle(mOverlayService, "com.android.system.qs.twotoneaccent");
|
||||
} else if (qsPanelStyle == 4) {
|
||||
setQsStyle(mOverlayService, "com.android.system.qs.shaded");
|
||||
} else if (qsPanelStyle == 5) {
|
||||
setQsStyle(mOverlayService, "com.android.system.qs.cyberpunk");
|
||||
} else if (qsPanelStyle == 6) {
|
||||
setQsStyle(mOverlayService, "com.android.system.qs.neumorph");
|
||||
} else if (qsPanelStyle == 7) {
|
||||
setQsStyle(mOverlayService, "com.android.system.qs.reflected");
|
||||
} else if (qsPanelStyle == 8) {
|
||||
setQsStyle(mOverlayService, "com.android.system.qs.surround");
|
||||
} else if (qsPanelStyle == 9) {
|
||||
setQsStyle(mOverlayService, "com.android.system.qs.thin");
|
||||
}
|
||||
}
|
||||
|
||||
public static void setDefaultStyle(IOverlayManager overlayManager) {
|
||||
for (int i = 0; i < QS_STYLES.length; i++) {
|
||||
String qsStyles = QS_STYLES[i];
|
||||
try {
|
||||
overlayManager.setEnabled(qsStyles, false, USER_SYSTEM);
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void setQsStyle(IOverlayManager overlayManager, String overlayName) {
|
||||
try {
|
||||
for (int i = 0; i < QS_STYLES.length; i++) {
|
||||
String qsStyles = QS_STYLES[i];
|
||||
try {
|
||||
overlayManager.setEnabled(qsStyles, false, USER_SYSTEM);
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
overlayManager.setEnabled(overlayName, true, USER_SYSTEM);
|
||||
} catch (RemoteException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static final String[] QS_STYLES = {
|
||||
"com.android.system.qs.outline",
|
||||
"com.android.system.qs.twotoneaccent",
|
||||
"com.android.system.qs.shaded",
|
||||
"com.android.system.qs.cyberpunk",
|
||||
"com.android.system.qs.neumorph",
|
||||
"com.android.system.qs.reflected",
|
||||
"com.android.system.qs.surround",
|
||||
"com.android.system.qs.thin"
|
||||
};
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsProto.MetricsEvent.CHERISH_SETTINGS;
|
||||
|
||||
@@ -38,7 +38,7 @@ import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.internal.util.cherish.CherishUtils;
|
||||
|
||||
import com.android.internal.util.cherish.udfps.UdfpsUtils;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
@@ -48,15 +48,40 @@ import com.android.settingslib.search.SearchIndexable;
|
||||
public class Udfps extends SettingsPreferenceFragment implements
|
||||
Preference.OnPreferenceChangeListener {
|
||||
|
||||
private static final String UDFPS_ICON_PICKER = "udfps_icon_picker";
|
||||
private static final String UDFPS_ANIM_PREVIEW = "udfps_recognizing_animation_preview";
|
||||
|
||||
private Preference mUdfpsIconPicker;
|
||||
private Preference mUdfpsAnimPreview;
|
||||
|
||||
private static final String UDFPS_CATEGORY = "udfps_category";
|
||||
|
||||
private PreferenceCategory mUdfpsCategory;
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
addPreferencesFromResource(R.xml.cherish_settings_udfps);
|
||||
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
final PreferenceScreen prefSet = getPreferenceScreen();
|
||||
Resources resources = getResources();
|
||||
|
||||
mUdfpsCategory = findPreference(UDFPS_CATEGORY);
|
||||
if (!UdfpsUtils.hasUdfpsSupport(getContext())) {
|
||||
prefSet.removePreference(mUdfpsCategory);
|
||||
}
|
||||
|
||||
final boolean udfpsResPkgInstalled = CherishUtils.isPackageInstalled(getContext(),
|
||||
"com.cherish.udfps.resources");
|
||||
mUdfpsIconPicker = findPreference(UDFPS_ICON_PICKER);
|
||||
mUdfpsAnimPreview = findPreference(UDFPS_ANIM_PREVIEW);
|
||||
if (!udfpsResPkgInstalled) {
|
||||
prefSet.removePreference(mUdfpsIconPicker);
|
||||
prefSet.removePreference(mUdfpsAnimPreview);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
258
src/com/cherish/settings/fragments/UdfpsAnimation.java
Normal file
258
src/com/cherish/settings/fragments/UdfpsAnimation.java
Normal file
@@ -0,0 +1,258 @@
|
||||
/*
|
||||
* Copyright (C) 2022 ColtsOS 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.cherish.settings.fragments;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.provider.SearchIndexableResource;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.preference.Preference.OnPreferenceChangeListener;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView.ViewHolder;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsActivity;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settings.widget.SettingsMainSwitchBar;
|
||||
import com.android.settingslib.search.Indexable;
|
||||
import com.android.settingslib.widget.OnMainSwitchChangeListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class UdfpsAnimation extends SettingsPreferenceFragment implements
|
||||
OnMainSwitchChangeListener {
|
||||
|
||||
private Switch mSwitch;
|
||||
|
||||
private RecyclerView mRecyclerView;
|
||||
private String mPkg = "com.cherish.udfps.resources";
|
||||
private AnimationDrawable animation;
|
||||
|
||||
private Resources udfpsRes;
|
||||
|
||||
private String[] mAnims;
|
||||
private String[] mAnimPreviews;
|
||||
private String[] mTitles;
|
||||
|
||||
private boolean mEnabled;
|
||||
private UdfpsAnimAdapter mUdfpsAnimAdapter;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getActivity().setTitle(R.string.udfps_recog_animation_effect_title);
|
||||
|
||||
loadResources();
|
||||
}
|
||||
|
||||
private void loadResources() {
|
||||
try {
|
||||
PackageManager pm = getActivity().getPackageManager();
|
||||
udfpsRes = pm.getResourcesForApplication(mPkg);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
mAnims = udfpsRes.getStringArray(udfpsRes.getIdentifier("udfps_animation_styles",
|
||||
"array", mPkg));
|
||||
mAnimPreviews = udfpsRes.getStringArray(udfpsRes.getIdentifier("udfps_animation_previews",
|
||||
"array", mPkg));
|
||||
mTitles = udfpsRes.getStringArray(udfpsRes.getIdentifier("udfps_animation_titles",
|
||||
"array", mPkg));
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(
|
||||
R.layout.item_view, container, false);
|
||||
|
||||
mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 3);
|
||||
mRecyclerView.setLayoutManager(gridLayoutManager);
|
||||
mUdfpsAnimAdapter = new UdfpsAnimAdapter(getActivity());
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
final SettingsActivity activity = (SettingsActivity) getActivity();
|
||||
final SettingsMainSwitchBar switchBar = activity.getSwitchBar();
|
||||
mSwitch = switchBar.getSwitch();
|
||||
mEnabled = Settings.System.getInt(getActivity().getContentResolver(),
|
||||
Settings.System.UDFPS_ANIM, 0) == 1;
|
||||
mSwitch.setChecked(mEnabled);
|
||||
setEnabled(mEnabled);
|
||||
switchBar.setTitle(getActivity().getString(R.string.enable));
|
||||
switchBar.addOnSwitchChangeListener(this);
|
||||
switchBar.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSwitchChanged(Switch switchView, boolean isChecked) {
|
||||
Settings.System.putInt(getActivity().getContentResolver(),
|
||||
Settings.System.UDFPS_ANIM, isChecked ? 1 : 0);
|
||||
mSwitch.setChecked(isChecked);
|
||||
setEnabled(isChecked);
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
if (enabled) {
|
||||
mRecyclerView.setAdapter(mUdfpsAnimAdapter);
|
||||
} else {
|
||||
mRecyclerView.setAdapter(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsEvent.CHERISH_SETTINGS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
public class UdfpsAnimAdapter extends RecyclerView.Adapter<UdfpsAnimAdapter.UdfpsAnimViewHolder> {
|
||||
Context context;
|
||||
String mSelectedAnim;
|
||||
String mAppliedAnim;
|
||||
|
||||
public UdfpsAnimAdapter(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UdfpsAnimViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_option, parent, false);
|
||||
UdfpsAnimViewHolder vh = new UdfpsAnimViewHolder(v);
|
||||
return vh;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(UdfpsAnimViewHolder holder, final int position) {
|
||||
String animName = mAnims[position];
|
||||
|
||||
Glide.with(holder.image.getContext())
|
||||
.load("")
|
||||
.placeholder(getDrawable(holder.image.getContext(), mAnimPreviews[position]))
|
||||
.into(holder.image);
|
||||
|
||||
holder.name.setText(mTitles[position]);
|
||||
|
||||
if (position == Settings.System.getInt(context.getContentResolver(),
|
||||
Settings.System.UDFPS_ANIM_STYLE, 0)) {
|
||||
mAppliedAnim = animName;
|
||||
if (mSelectedAnim == null) {
|
||||
mSelectedAnim = animName;
|
||||
}
|
||||
}
|
||||
|
||||
holder.itemView.setActivated(animName == mSelectedAnim);
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
updateActivatedStatus(mSelectedAnim, false);
|
||||
updateActivatedStatus(animName, true);
|
||||
mSelectedAnim = animName;
|
||||
holder.image.setBackgroundDrawable(getDrawable(v.getContext(), mAnims[position]));
|
||||
animation = (AnimationDrawable) holder.image.getBackground();
|
||||
animation.setOneShot(true);
|
||||
animation.start();
|
||||
Settings.System.putInt(getActivity().getContentResolver(),
|
||||
Settings.System.UDFPS_ANIM_STYLE, position);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mAnims.length;
|
||||
}
|
||||
|
||||
public class UdfpsAnimViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView name;
|
||||
ImageView image;
|
||||
public UdfpsAnimViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
name = (TextView) itemView.findViewById(R.id.option_label);
|
||||
image = (ImageView) itemView.findViewById(R.id.option_thumbnail);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateActivatedStatus(String anim, boolean isActivated) {
|
||||
int index = Arrays.asList(mAnims).indexOf(anim);
|
||||
if (index < 0) {
|
||||
return;
|
||||
}
|
||||
RecyclerView.ViewHolder holder = mRecyclerView.findViewHolderForAdapterPosition(index);
|
||||
if (holder != null && holder.itemView != null) {
|
||||
holder.itemView.setActivated(isActivated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Drawable getDrawable(Context context, String drawableName) {
|
||||
try {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
Resources res = pm.getResourcesForApplication(mPkg);
|
||||
return res.getDrawable(res.getIdentifier(drawableName, "drawable", mPkg));
|
||||
}
|
||||
catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
211
src/com/cherish/settings/fragments/UdfpsIconPicker.java
Normal file
211
src/com/cherish/settings/fragments/UdfpsIconPicker.java
Normal file
@@ -0,0 +1,211 @@
|
||||
/*
|
||||
* Copyright (C) 2022 ColtOS 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.cherish.settings.fragments;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.net.Uri;
|
||||
import android.provider.SearchIndexableResource;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.preference.Preference.OnPreferenceChangeListener;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView.ViewHolder;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.Indexable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class UdfpsIconPicker extends SettingsPreferenceFragment {
|
||||
|
||||
private RecyclerView mRecyclerView;
|
||||
|
||||
private Resources udfpsRes;
|
||||
|
||||
private String mPkg = "com.cherish.udfps.resources";
|
||||
|
||||
private String[] mIcons;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getActivity().setTitle(R.string.udfps_icon_picker_title);
|
||||
|
||||
loadResources();
|
||||
}
|
||||
|
||||
private void loadResources() {
|
||||
try {
|
||||
PackageManager pm = getActivity().getPackageManager();
|
||||
udfpsRes = pm.getResourcesForApplication(mPkg);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
mIcons = udfpsRes.getStringArray(udfpsRes.getIdentifier("udfps_icons",
|
||||
"array", mPkg));
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(
|
||||
R.layout.item_view, container, false);
|
||||
|
||||
mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 3);
|
||||
mRecyclerView.setLayoutManager(gridLayoutManager);
|
||||
UdfpsIconAdapter mUdfpsIconAdapter = new UdfpsIconAdapter(getActivity());
|
||||
mRecyclerView.setAdapter(mUdfpsIconAdapter);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsEvent.CHERISH_SETTINGS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
public class UdfpsIconAdapter extends RecyclerView.Adapter<UdfpsIconAdapter.UdfpsIconViewHolder> {
|
||||
Context context;
|
||||
String mSelectedIcon;
|
||||
String mAppliedIcon;
|
||||
|
||||
public UdfpsIconAdapter(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UdfpsIconViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_option, parent, false);
|
||||
UdfpsIconViewHolder vh = new UdfpsIconViewHolder(v);
|
||||
return vh;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(UdfpsIconViewHolder holder, final int position) {
|
||||
String iconRes = mIcons[position];
|
||||
|
||||
Glide.with(holder.image.getContext())
|
||||
.load("")
|
||||
.placeholder(getDrawable(holder.image.getContext(), mIcons[position]))
|
||||
.into(holder.image);
|
||||
|
||||
holder.image.setPadding(20,20,20,20);
|
||||
|
||||
holder.name.setVisibility(View.GONE);
|
||||
|
||||
if (position == Settings.System.getInt(context.getContentResolver(),
|
||||
Settings.System.UDFPS_ICON, 0)) {
|
||||
mAppliedIcon = iconRes;
|
||||
if (mSelectedIcon == null) {
|
||||
mSelectedIcon = iconRes;
|
||||
}
|
||||
}
|
||||
holder.itemView.setActivated(iconRes == mSelectedIcon);
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
updateActivatedStatus(mSelectedIcon, false);
|
||||
updateActivatedStatus(iconRes, true);
|
||||
mSelectedIcon = iconRes;
|
||||
Settings.System.putInt(getActivity().getContentResolver(),
|
||||
Settings.System.UDFPS_ICON, position);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mIcons.length;
|
||||
}
|
||||
|
||||
public class UdfpsIconViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView name;
|
||||
ImageView image;
|
||||
public UdfpsIconViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
name = (TextView) itemView.findViewById(R.id.option_label);
|
||||
image = (ImageView) itemView.findViewById(R.id.option_thumbnail);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateActivatedStatus(String icon, boolean isActivated) {
|
||||
int index = Arrays.asList(mIcons).indexOf(icon);
|
||||
if (index < 0) {
|
||||
return;
|
||||
}
|
||||
RecyclerView.ViewHolder holder = mRecyclerView.findViewHolderForAdapterPosition(index);
|
||||
if (holder != null && holder.itemView != null) {
|
||||
holder.itemView.setActivated(isActivated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Drawable getDrawable(Context context, String drawableName) {
|
||||
try {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
Resources res = pm.getResourcesForApplication(mPkg);
|
||||
Context ctx = context.createPackageContext(
|
||||
mPkg, Context.CONTEXT_IGNORE_SECURITY);
|
||||
return ctx.getDrawable(res.getIdentifier(drawableName, "drawable", mPkg));
|
||||
}
|
||||
catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
221
src/com/cherish/settings/fragments/sound/PulseSettings.java
Normal file
221
src/com/cherish/settings/fragments/sound/PulseSettings.java
Normal file
@@ -0,0 +1,221 @@
|
||||
/*
|
||||
* Copyright (C) 2016-2021 crDroid Android 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.cherish.settings.fragments.sound;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.res.Resources;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceCategory;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
import androidx.preference.Preference.OnPreferenceChangeListener;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
|
||||
import net.margaritov.preference.colorpicker.ColorPickerPreference;
|
||||
|
||||
public class PulseSettings extends SettingsPreferenceFragment implements
|
||||
Preference.OnPreferenceChangeListener {
|
||||
|
||||
private static final String TAG = PulseSettings.class.getSimpleName();
|
||||
|
||||
private static final String NAVBAR_PULSE_ENABLED_KEY = "navbar_pulse_enabled";
|
||||
private static final String LOCKSCREEN_PULSE_ENABLED_KEY = "lockscreen_pulse_enabled";
|
||||
private static final String AMBIENT_PULSE_ENABLED_KEY = "ambient_pulse_enabled";
|
||||
private static final String PULSE_SMOOTHING_KEY = "pulse_smoothing_enabled";
|
||||
private static final String PULSE_COLOR_MODE_KEY = "pulse_color_mode";
|
||||
private static final String PULSE_COLOR_MODE_CHOOSER_KEY = "pulse_color_user";
|
||||
private static final String PULSE_COLOR_MODE_LAVA_SPEED_KEY = "pulse_lavalamp_speed";
|
||||
private static final String PULSE_RENDER_CATEGORY_SOLID = "pulse_2";
|
||||
private static final String PULSE_RENDER_CATEGORY_FADING = "pulse_fading_bars_category";
|
||||
private static final String PULSE_RENDER_MODE_KEY = "pulse_render_style";
|
||||
private static final int RENDER_STYLE_FADING_BARS = 0;
|
||||
private static final int RENDER_STYLE_SOLID_LINES = 1;
|
||||
private static final int COLOR_TYPE_ACCENT = 0;
|
||||
private static final int COLOR_TYPE_USER = 1;
|
||||
private static final int COLOR_TYPE_LAVALAMP = 2;
|
||||
private static final int COLOR_TYPE_AUTO = 3;
|
||||
|
||||
private static final String PULSE_SETTINGS_FOOTER = "pulse_settings_footer";
|
||||
|
||||
private SwitchPreference mNavbarPulse;
|
||||
private SwitchPreference mLockscreenPulse;
|
||||
private SwitchPreference mAmbientPulse;
|
||||
private SwitchPreference mPulseSmoothing;
|
||||
private Preference mRenderMode;
|
||||
private ListPreference mColorModePref;
|
||||
private ColorPickerPreference mColorPickerPref;
|
||||
private Preference mLavaSpeedPref;
|
||||
private Preference mFooterPref;
|
||||
|
||||
private PreferenceCategory mFadingBarsCat;
|
||||
private PreferenceCategory mSolidBarsCat;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
addPreferencesFromResource(R.xml.pulse_settings);
|
||||
|
||||
ContentResolver resolver = getContext().getContentResolver();
|
||||
|
||||
mNavbarPulse = (SwitchPreference) findPreference(NAVBAR_PULSE_ENABLED_KEY);
|
||||
boolean navbarPulse = Settings.Secure.getIntForUser(resolver,
|
||||
Settings.Secure.NAVBAR_PULSE_ENABLED, 0, UserHandle.USER_CURRENT) != 0;
|
||||
mNavbarPulse.setChecked(navbarPulse);
|
||||
mNavbarPulse.setOnPreferenceChangeListener(this);
|
||||
|
||||
mLockscreenPulse = (SwitchPreference) findPreference(LOCKSCREEN_PULSE_ENABLED_KEY);
|
||||
boolean lockscreenPulse = Settings.Secure.getIntForUser(resolver,
|
||||
Settings.Secure.LOCKSCREEN_PULSE_ENABLED, 1, UserHandle.USER_CURRENT) != 0;
|
||||
mLockscreenPulse.setChecked(lockscreenPulse);
|
||||
mLockscreenPulse.setOnPreferenceChangeListener(this);
|
||||
|
||||
mAmbientPulse = (SwitchPreference) findPreference(AMBIENT_PULSE_ENABLED_KEY);
|
||||
boolean ambientPulse = Settings.Secure.getIntForUser(resolver,
|
||||
Settings.Secure.AMBIENT_PULSE_ENABLED, 0, UserHandle.USER_CURRENT) != 0;
|
||||
mAmbientPulse.setChecked(ambientPulse);
|
||||
mAmbientPulse.setOnPreferenceChangeListener(this);
|
||||
|
||||
mColorModePref = (ListPreference) findPreference(PULSE_COLOR_MODE_KEY);
|
||||
mColorPickerPref = (ColorPickerPreference) findPreference(PULSE_COLOR_MODE_CHOOSER_KEY);
|
||||
mLavaSpeedPref = findPreference(PULSE_COLOR_MODE_LAVA_SPEED_KEY);
|
||||
mColorModePref.setOnPreferenceChangeListener(this);
|
||||
|
||||
mRenderMode = findPreference(PULSE_RENDER_MODE_KEY);
|
||||
mRenderMode.setOnPreferenceChangeListener(this);
|
||||
|
||||
mFadingBarsCat = (PreferenceCategory) findPreference(
|
||||
PULSE_RENDER_CATEGORY_FADING);
|
||||
mSolidBarsCat = (PreferenceCategory) findPreference(
|
||||
PULSE_RENDER_CATEGORY_SOLID);
|
||||
|
||||
mPulseSmoothing = (SwitchPreference) findPreference(PULSE_SMOOTHING_KEY);
|
||||
|
||||
mFooterPref = findPreference(PULSE_SETTINGS_FOOTER);
|
||||
mFooterPref.setTitle(R.string.pulse_help_policy_notice_summary);
|
||||
|
||||
updateAllPrefs();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
ContentResolver resolver = getContext().getContentResolver();
|
||||
if (preference == mNavbarPulse) {
|
||||
boolean val = (Boolean) newValue;
|
||||
Settings.Secure.putIntForUser(resolver,
|
||||
Settings.Secure.NAVBAR_PULSE_ENABLED, val ? 1 : 0, UserHandle.USER_CURRENT);
|
||||
updateAllPrefs();
|
||||
return true;
|
||||
} else if (preference == mLockscreenPulse) {
|
||||
boolean val = (Boolean) newValue;
|
||||
Settings.Secure.putIntForUser(resolver,
|
||||
Settings.Secure.LOCKSCREEN_PULSE_ENABLED, val ? 1 : 0, UserHandle.USER_CURRENT);
|
||||
updateAllPrefs();
|
||||
return true;
|
||||
} else if (preference == mAmbientPulse) {
|
||||
boolean val = (Boolean) newValue;
|
||||
Settings.Secure.putIntForUser(resolver,
|
||||
Settings.Secure.AMBIENT_PULSE_ENABLED, val ? 1 : 0, UserHandle.USER_CURRENT);
|
||||
updateAllPrefs();
|
||||
return true;
|
||||
} else if (preference == mColorModePref) {
|
||||
updateColorPrefs(Integer.valueOf(String.valueOf(newValue)));
|
||||
return true;
|
||||
} else if (preference == mRenderMode) {
|
||||
updateRenderCategories(Integer.valueOf(String.valueOf(newValue)));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void updateAllPrefs() {
|
||||
ContentResolver resolver = getContext().getContentResolver();
|
||||
|
||||
boolean navbarPulse = Settings.Secure.getIntForUser(resolver,
|
||||
Settings.Secure.NAVBAR_PULSE_ENABLED, 0, UserHandle.USER_CURRENT) != 0;
|
||||
boolean lockscreenPulse = Settings.Secure.getIntForUser(resolver,
|
||||
Settings.Secure.LOCKSCREEN_PULSE_ENABLED, 1, UserHandle.USER_CURRENT) != 0;
|
||||
|
||||
boolean ambientPulse = Settings.Secure.getIntForUser(resolver,
|
||||
Settings.Secure.AMBIENT_PULSE_ENABLED, 0, UserHandle.USER_CURRENT) != 0;
|
||||
|
||||
mPulseSmoothing.setEnabled(navbarPulse || lockscreenPulse || ambientPulse);
|
||||
|
||||
mColorModePref.setEnabled(navbarPulse || lockscreenPulse || ambientPulse);
|
||||
if (navbarPulse || lockscreenPulse) {
|
||||
int colorMode = Settings.Secure.getIntForUser(resolver,
|
||||
Settings.Secure.PULSE_COLOR_MODE, COLOR_TYPE_LAVALAMP, UserHandle.USER_CURRENT);
|
||||
updateColorPrefs(colorMode);
|
||||
} else {
|
||||
mColorPickerPref.setEnabled(false);
|
||||
mLavaSpeedPref.setEnabled(false);
|
||||
}
|
||||
|
||||
mRenderMode.setEnabled(navbarPulse || lockscreenPulse || ambientPulse);
|
||||
if (navbarPulse || lockscreenPulse || ambientPulse) {
|
||||
int renderMode = Settings.Secure.getIntForUser(resolver,
|
||||
Settings.Secure.PULSE_RENDER_STYLE, RENDER_STYLE_SOLID_LINES, UserHandle.USER_CURRENT);
|
||||
updateRenderCategories(renderMode);
|
||||
} else {
|
||||
mFadingBarsCat.setEnabled(false);
|
||||
mSolidBarsCat.setEnabled(false);
|
||||
}
|
||||
|
||||
mFooterPref.setEnabled(navbarPulse || lockscreenPulse);
|
||||
}
|
||||
|
||||
private void updateColorPrefs(int val) {
|
||||
switch (val) {
|
||||
case COLOR_TYPE_ACCENT:
|
||||
mColorPickerPref.setEnabled(false);
|
||||
mLavaSpeedPref.setEnabled(false);
|
||||
break;
|
||||
case COLOR_TYPE_USER:
|
||||
mColorPickerPref.setEnabled(true);
|
||||
mLavaSpeedPref.setEnabled(false);
|
||||
break;
|
||||
case COLOR_TYPE_LAVALAMP:
|
||||
mColorPickerPref.setEnabled(false);
|
||||
mLavaSpeedPref.setEnabled(true);
|
||||
break;
|
||||
case COLOR_TYPE_AUTO:
|
||||
mColorPickerPref.setEnabled(false);
|
||||
mLavaSpeedPref.setEnabled(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void updateRenderCategories(int mode) {
|
||||
mFadingBarsCat.setEnabled(mode == RENDER_STYLE_FADING_BARS);
|
||||
mSolidBarsCat.setEnabled(mode == RENDER_STYLE_SOLID_LINES);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsProto.MetricsEvent.CHERISH_SETTINGS;
|
||||
}
|
||||
}
|
||||
235
src/com/cherish/settings/fragments/ui/LockClockFonts.java
Normal file
235
src/com/cherish/settings/fragments/ui/LockClockFonts.java
Normal file
@@ -0,0 +1,235 @@
|
||||
/*
|
||||
* Copyright (C) 2021 AospExtended ROM 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.cherish.settings.fragments.ui;
|
||||
|
||||
import static android.os.UserHandle.USER_SYSTEM;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.provider.SearchIndexableResource;
|
||||
import android.provider.Settings;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Gravity;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import android.text.TextUtils;
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
import android.view.ViewGroup.LayoutParams;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView.ViewHolder;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import android.net.Uri;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.Preference.OnPreferenceChangeListener;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.Indexable;
|
||||
import com.android.settings.SettingsPreferenceFragment;
|
||||
|
||||
import com.android.internal.util.cherish.ThemeUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.json.JSONObject;
|
||||
import org.json.JSONException;
|
||||
|
||||
public class LockClockFonts extends SettingsPreferenceFragment {
|
||||
|
||||
private RecyclerView mRecyclerView;
|
||||
private ThemeUtils mThemeUtils;
|
||||
private String mCategory = "android.theme.customization.lockscreen_clock_font";
|
||||
|
||||
private List<String> mPkgs;
|
||||
|
||||
private ExecutorService mExecutor = Executors.newSingleThreadExecutor();
|
||||
private Handler mHandler = new Handler();
|
||||
private final AtomicBoolean mApplyingOverlays = new AtomicBoolean(false);
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getActivity().setTitle(R.string.theme_customization_lock_clock_title);
|
||||
|
||||
mHandler = new Handler();
|
||||
mThemeUtils = new ThemeUtils(getActivity());
|
||||
mPkgs = mThemeUtils.getOverlayPackagesForCategory(mCategory, "android");
|
||||
Collections.sort(mPkgs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(
|
||||
R.layout.item_view, container, false);
|
||||
|
||||
mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
|
||||
GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 1);
|
||||
mRecyclerView.setLayoutManager(gridLayoutManager);
|
||||
Adapter mAdapter = new Adapter(getActivity());
|
||||
mRecyclerView.setAdapter(mAdapter);
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return MetricsEvent.CHERISH_SETTINGS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
public class Adapter extends RecyclerView.Adapter<Adapter.CustomViewHolder> {
|
||||
Context context;
|
||||
String mSelectedPkg;
|
||||
String mAppliedPkg;
|
||||
|
||||
public Adapter(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.lock_clock_fonts_option, parent, false);
|
||||
CustomViewHolder vh = new CustomViewHolder(v);
|
||||
return vh;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(CustomViewHolder holder, final int position) {
|
||||
String pkg = mPkgs.get(position);
|
||||
String label = getLabel(holder.itemView.getContext(), pkg);
|
||||
|
||||
String currentPackageName = mThemeUtils.getOverlayInfos(mCategory).stream()
|
||||
.filter(info -> info.isEnabled())
|
||||
.map(info -> info.packageName)
|
||||
.findFirst()
|
||||
.orElse("android");
|
||||
|
||||
holder.title.setTextSize(24);
|
||||
holder.title.setTypeface(getTypeface(holder.title.getContext(), pkg));
|
||||
holder.name.setVisibility(View.GONE);
|
||||
|
||||
if (currentPackageName.equals(pkg)) {
|
||||
mAppliedPkg = pkg;
|
||||
if (mSelectedPkg == null) {
|
||||
mSelectedPkg = pkg;
|
||||
}
|
||||
}
|
||||
|
||||
holder.itemView.setActivated(pkg == mSelectedPkg);
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (mApplyingOverlays.get()) return;
|
||||
updateActivatedStatus(mSelectedPkg, false);
|
||||
updateActivatedStatus(pkg, true);
|
||||
mSelectedPkg = pkg;
|
||||
enableOverlays(position);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mPkgs.size();
|
||||
}
|
||||
|
||||
public class CustomViewHolder extends RecyclerView.ViewHolder {
|
||||
TextView name;
|
||||
TextView title;
|
||||
public CustomViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
title = (TextView) itemView.findViewById(R.id.option_title);
|
||||
name = (TextView) itemView.findViewById(R.id.option_label);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateActivatedStatus(String pkg, boolean isActivated) {
|
||||
int index = mPkgs.indexOf(pkg);
|
||||
if (index < 0) {
|
||||
return;
|
||||
}
|
||||
RecyclerView.ViewHolder holder = mRecyclerView.findViewHolderForAdapterPosition(index);
|
||||
if (holder != null && holder.itemView != null) {
|
||||
holder.itemView.setActivated(isActivated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Typeface getTypeface(Context context, String pkg) {
|
||||
try {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
Resources res = pkg.equals("android") ? Resources.getSystem()
|
||||
: pm.getResourcesForApplication(pkg);
|
||||
return Typeface.create(res.getString(
|
||||
res.getIdentifier("config_clockFontFamily",
|
||||
"string", pkg)), Typeface.NORMAL);
|
||||
}
|
||||
catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getLabel(Context context, String pkg) {
|
||||
PackageManager pm = context.getPackageManager();
|
||||
try {
|
||||
return pm.getApplicationInfo(pkg, 0)
|
||||
.loadLabel(pm).toString();
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return pkg;
|
||||
}
|
||||
|
||||
public void enableOverlays(int position) {
|
||||
mApplyingOverlays.set(true);
|
||||
mExecutor.execute(() -> {
|
||||
mThemeUtils.setOverlayEnabled(mCategory, mPkgs.get(position));
|
||||
mHandler.post(() -> mApplyingOverlays.set(false));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (C) 2022 FlamingoOS 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.cherish.settings.preferences
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.TypedArray
|
||||
import android.util.AttributeSet
|
||||
|
||||
import androidx.preference.DialogPreference
|
||||
|
||||
open class ColorPickerPreference @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
) : DialogPreference(context, attrs) {
|
||||
|
||||
var color: String? = null
|
||||
private set
|
||||
|
||||
override protected fun onGetDefaultValue(a: TypedArray, index: Int): Any? {
|
||||
return a.getString(index)
|
||||
}
|
||||
|
||||
override protected fun onSetInitialValue(restoreValue: Boolean, defaultValue: Any?) {
|
||||
val def = defaultValue as? String
|
||||
color = if (restoreValue) getPersistedString(def) else def
|
||||
setSummary(color)
|
||||
}
|
||||
|
||||
fun setColor(color: String) {
|
||||
if (!callChangeListener(color)) return
|
||||
this.color = color
|
||||
setSummary(color)
|
||||
persistString(color)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2022 FlamingoOS 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.cherish.settings.preferences
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
|
||||
public class SecureSettingColorPickerPreference @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
): ColorPickerPreference(context, attrs) {
|
||||
init {
|
||||
setPreferenceDataStore(SecureSettingsStore(context.contentResolver))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Project Kaleidoscope
|
||||
*
|
||||
* 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.cherish.settings.preferences;
|
||||
|
||||
import android.os.SystemProperties;
|
||||
import android.preference.PreferenceDataStore;
|
||||
|
||||
public class SystemPropertiesStore extends androidx.preference.PreferenceDataStore
|
||||
implements PreferenceDataStore {
|
||||
|
||||
public SystemPropertiesStore() {
|
||||
}
|
||||
|
||||
public boolean getBoolean(String key, boolean defValue) {
|
||||
return SystemProperties.getBoolean(key, defValue);
|
||||
}
|
||||
|
||||
public int getInt(String key, int defValue) {
|
||||
return SystemProperties.getInt(key, defValue);
|
||||
}
|
||||
|
||||
public long getLong(String key, long defValue) {
|
||||
return SystemProperties.getLong(key, defValue);
|
||||
}
|
||||
|
||||
public String getString(String key, String defValue) {
|
||||
return SystemProperties.get(key, defValue);
|
||||
}
|
||||
|
||||
public void putBoolean(String key, boolean value) {
|
||||
putString(key, value ? "1" : "0");
|
||||
}
|
||||
|
||||
public void putInt(String key, int value) {
|
||||
putString(key, Integer.toString(value));
|
||||
}
|
||||
|
||||
public void putLong(String key, long value) {
|
||||
putString(key, Long.toString(value));
|
||||
}
|
||||
|
||||
public void putString(String key, String value) {
|
||||
SystemProperties.set(key, value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The CyanogenMod Project
|
||||
* Copyright (C) 2017 AICP
|
||||
* Copyright (C) 2022 Project Kaleidoscope
|
||||
*
|
||||
* 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.cherish.settings.preferences;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
public class SystemPropertySwitchPreference extends SwitchPreference {
|
||||
|
||||
public SystemPropertySwitchPreference(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
setPreferenceDataStore(new SystemPropertiesStore());
|
||||
}
|
||||
|
||||
public SystemPropertySwitchPreference(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
setPreferenceDataStore(new SystemPropertiesStore());
|
||||
}
|
||||
|
||||
public SystemPropertySwitchPreference(Context context) {
|
||||
super(context);
|
||||
setPreferenceDataStore(new SystemPropertiesStore());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {
|
||||
// This is what default TwoStatePreference implementation is doing without respecting
|
||||
// real default value:
|
||||
//setChecked(restoreValue ? getPersistedBoolean(mChecked)
|
||||
// : (Boolean) defaultValue);
|
||||
// Instead, we better do
|
||||
setChecked(restoreValue ? getPersistedBoolean((Boolean) defaultValue)
|
||||
: (Boolean) defaultValue);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2022 FlamingoOS 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.cherish.settings.preferences
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
|
||||
public class SystemSettingColorPickerPreference @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
): ColorPickerPreference(context, attrs) {
|
||||
init {
|
||||
setPreferenceDataStore(SystemSettingsStore(context.contentResolver))
|
||||
}
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class ColorPickerPreference extends Preference implements
|
||||
mAlphaSliderEnabled = attrs.getAttributeBooleanValue(null, "alphaSlider", false);
|
||||
int defVal = attrs.getAttributeIntValue(SETTINGS_NS, "defaultColorValue", DEF_VALUE_DEFAULT);
|
||||
if (defVal != DEF_VALUE_DEFAULT) {
|
||||
mUsesDefaultButton = true;
|
||||
mUsesDefaultButton = true;
|
||||
mDefValue = defVal;
|
||||
}
|
||||
mShowLedPreview = attrs.getAttributeBooleanValue(null, "ledPreview", false);
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (C) 2020 crDroid Android 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 net.margaritov.preference.colorpicker;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.provider.Settings;
|
||||
|
||||
import com.cherish.settings.preferences.SecureSettingsStore;
|
||||
|
||||
import net.margaritov.preference.colorpicker.ColorPickerPreference;
|
||||
|
||||
public class SecureSettingColorPickerPreference extends ColorPickerPreference {
|
||||
|
||||
public SecureSettingColorPickerPreference(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
|
||||
}
|
||||
|
||||
public SecureSettingColorPickerPreference(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
|
||||
}
|
||||
|
||||
public SecureSettingColorPickerPreference(Context context) {
|
||||
super(context, null);
|
||||
setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver()));
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user