Cherish:Add an option to ask pin for shutdown/reboot on secure lockscreen [2/2]

This commit is contained in:
DarkJoker360
2020-04-15 13:49:34 +07:00
committed by Hung Phan
parent bdf8835e5d
commit 84efe6f23e
4 changed files with 46 additions and 6 deletions

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2017 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="M12,17C10.89,17 10,16.1 10,15C10,13.89 10.89,13 12,13A2,2 0 0,1 14,15A2,2 0 0,1 12,17M18,20V10H6V20H18M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10C4,8.89 4.89,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z" />
</vector>

View File

@@ -243,6 +243,9 @@
<string name="gradient_color">Chọn Gradient</string>
<string name="gradient_summary">Làm hiệu ứng Gradient</string>
<!-- Power menu and dialogs opacity -->
<string name="lockscreen_secure_power_title">Menu nguồn an toàn</string>
<string name="lockscreen_secure_power_menu_title">Khóa menu nguồn</string>
<string name="lockscreen_secure_power_menu_summary">Chỉ cho phép hành động menu nguồn sau khi xác thực</string>
<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="power_menu_transparency">Độ mờ của menu nguồn / khởi động lại</string>

View File

@@ -280,6 +280,9 @@
<string name="gradient_summary">Gradient effect maker</string>
<!-- Power menu and dialogs opacity -->
<string name="lockscreen_secure_power_title">Secure power menu</string>
<string name="lockscreen_secure_power_menu_title">Secure power menu</string>
<string name="lockscreen_secure_power_menu_summary">Allow power menu action only after authentication</string>
<string name="power_menu_emergency_title">Emergency</string>
<string name="panel_porn_title">Power Menu Transparency</string>
<string name="power_menu_transparency">Power/reboot menu opacity</string>

View File

@@ -46,7 +46,16 @@
android:title="@string/advanced_reboot_title"
android:summary="@string/advanced_reboot_summary"
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" />
<PreferenceCategory
android:title="@string/lockscreen_secure_power_title">
<com.cherish.settings.preferences.SystemSettingSwitchPreference
android:key="lockscreen_disable_power_menu"
android:title="@string/lockscreen_power_menu_disabled_title"
@@ -54,9 +63,11 @@
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" />
android:key="lockscreen_powermenu_secure"
android:icon="@drawable/ic_lock_outline"
android:title="@string/lockscreen_secure_power_menu_title"
android:summary="@string/lockscreen_secure_power_menu_summary"
android:dependency="lockscreen_enable_power_menu"
android:defaultValue="false" />
</PreferenceCategory>
</PreferenceScreen>