Cherish:Add toggle for emergency affordance in power menu [2/2]

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
Pranav Vashi
2019-12-01 13:00:46 +07:00
committed by Hung Phan
parent 9d4cffdecb
commit bdf8835e5d
4 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2019 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24.0dp"
android:height="24.0dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?android:attr/colorControlNormal">
<path
android:fillColor="?android:attr/colorControlNormal"
android:pathData="M6.8,17.3C5.3,15.9 4.5,14.0 4.5,12.0c0.0,-2.0 0.8,-3.8 2.1,-5.2l1.4,1.4c-1.0,1.0 -1.6,2.4 -1.6,3.8c0.0,1.5 0.6,2.9 1.6,3.9L6.8,17.3z"/>
<path
android:fillColor="?android:attr/colorControlNormal"
android:pathData="M3.3,20.2C1.2,18.0 0.0,15.1 0.0,12.0c0.0,-3.1 1.2,-6.0 3.3,-8.2l1.4,1.4C3.0,7.0 2.0,9.4 2.0,12.0s1.0,5.0 2.7,6.9L3.3,20.2z"/>
<path
android:fillColor="?android:attr/colorControlNormal"
android:pathData="M17.2,17.3l-1.4,-1.4c1.1,-1.0 1.6,-2.4 1.6,-3.9c0.0,-1.4 -0.6,-2.8 -1.6,-3.8l1.4,-1.4c1.4,1.4 2.1,3.3 2.1,5.2C19.5,14.0 18.7,15.9 17.2,17.3z"/>
<path
android:fillColor="?android:attr/colorControlNormal"
android:pathData="M20.7,20.2l-1.4,-1.4C21.0,17.0 22.0,14.6 22.0,12.0c0.0,-2.6 -1.0,-5.0 -2.7,-6.9l1.4,-1.4C22.8,6.0 24.0,8.9 24.0,12.0C24.0,15.1 22.8,18.0 20.7,20.2z"/>
<path
android:fillColor="?android:attr/colorControlNormal"
android:pathData="M11.0,15.0l2.0,0.0l0.0,2.0l-2.0,0.0z"/>
<path
android:fillColor="?android:attr/colorControlNormal"
android:pathData="M11.0,7.0l2.0,0.0l0.0,6.0l-2.0,0.0z"/>
</vector>

View File

@@ -243,6 +243,7 @@
<string name="gradient_color">Chọn Gradient</string> <string name="gradient_color">Chọn Gradient</string>
<string name="gradient_summary">Làm hiệu ứng Gradient</string> <string name="gradient_summary">Làm hiệu ứng Gradient</string>
<!-- Power menu and dialogs opacity --> <!-- Power menu and dialogs opacity -->
<string name="power_menu_emergency_title">Khẩn cấp</string>
<string name="panel_porn_title">Menu nguồn trong suốt</string> <string name="panel_porn_title">Menu nguồn trong suốt</string>
<string name="power_menu_transparency">Độ mờ của menu nguồn / khởi động lại</string> <string name="power_menu_transparency">Độ mờ của menu nguồn / khởi động lại</string>
<string name="power_menu_dialog_dim"> Nguồn/ khởi động lại hộp thoại mờ nền</string> <string name="power_menu_dialog_dim"> Nguồn/ khởi động lại hộp thoại mờ nền</string>

View File

@@ -280,6 +280,7 @@
<string name="gradient_summary">Gradient effect maker</string> <string name="gradient_summary">Gradient effect maker</string>
<!-- Power menu and dialogs opacity --> <!-- Power menu and dialogs opacity -->
<string name="power_menu_emergency_title">Emergency</string>
<string name="panel_porn_title">Power Menu Transparency</string> <string name="panel_porn_title">Power Menu Transparency</string>
<string name="power_menu_transparency">Power/reboot menu opacity</string> <string name="power_menu_transparency">Power/reboot menu opacity</string>
<string name="power_menu_dialog_dim">Power/reboot dialog dim background amount</string> <string name="power_menu_dialog_dim">Power/reboot dialog dim background amount</string>

View File

@@ -53,4 +53,10 @@
android:summary="@string/lockscreen_power_menu_disabled_summary" android:summary="@string/lockscreen_power_menu_disabled_summary"
android:defaultValue="false" /> android:defaultValue="false" />
<com.cherish.settings.preferences.GlobalSettingSwitchPreference
android:key="power_menu_emergency_affordance"
android:icon="@drawable/ic_emergency"
android:title="@string/power_menu_emergency_title"
android:defaultValue="true" />
</PreferenceScreen> </PreferenceScreen>