Cherish:Battery Saver Profiles [2/2]
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
@@ -1356,4 +1356,21 @@
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Power Profiles -->
|
||||
<string-array name="power_profile_type_entries">
|
||||
<item>@string/power_profile_light</item>
|
||||
<item>@string/power_profile_default</item>
|
||||
<item>@string/power_profile_med</item>
|
||||
<item>@string/power_profile_high</item>
|
||||
<item>@string/power_profile_ext</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="power_profile_type_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -32,4 +32,6 @@
|
||||
<!-- FOD icon picker -->
|
||||
<color name="fod_item_background_stroke_color">#d6d6d6</color>
|
||||
<color name="preview_container_border">@*android:color/accent_device_default_light</color>
|
||||
|
||||
<color name="white">#FFF</color>
|
||||
</resources>
|
||||
|
||||
@@ -1327,4 +1327,14 @@
|
||||
<string name="hide_apps_from_recents_summary">Hide apps from appearing in recents</string>
|
||||
<string name="hide_from_recents_add_app">Add app</string>
|
||||
<string name="title_activity_spark_recents_settings">Recents</string>
|
||||
|
||||
<!-- Power Profiles -->
|
||||
<string name="powersave_title">Power Saving</string>
|
||||
<string name="power_profile">Battery saver profile</string>
|
||||
<string name="power_profile_default">Default</string>
|
||||
<string name="power_profile_light">Light</string>
|
||||
<string name="power_profile_med">Moderate</string>
|
||||
<string name="power_profile_high">High</string>
|
||||
<string name="power_profile_ext">Extreme</string>
|
||||
<string name="powersave_summary">Options to extend your battery life</string>
|
||||
</resources>
|
||||
|
||||
@@ -129,6 +129,13 @@
|
||||
<intent android:action="android.intent.action.MAIN"
|
||||
android:targetPackage="com.android.settings"
|
||||
android:targetClass="com.cherish.settings.fragments.HAFRAppListActivity" />
|
||||
|
||||
<Preference
|
||||
android:key="ps_cat"
|
||||
android:title="@string/powersave_title"
|
||||
android:summary="@string/powersave_summary"
|
||||
android:fragment="com.cherish.settings.fragments.PowerSaving"/>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceCategory
|
||||
|
||||
28
res/xml/cherish_settings_powersave.xml
Normal file
28
res/xml/cherish_settings_powersave.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2021 NezukoOS
|
||||
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=" "
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||
android:key="power_profile_type"
|
||||
android:title="@string/power_profile"
|
||||
android:dialogTitle="@string/power_profile"
|
||||
android:entries="@array/power_profile_type_entries"
|
||||
android:defaultValue="1"
|
||||
android:entryValues="@array/power_profile_type_values"/>
|
||||
|
||||
</PreferenceScreen>
|
||||
Reference in New Issue
Block a user