Cherish: Hide power menu on secure lockscreen [2/2]

Change-Id: Iae2fa48103c08d95c4dc855b8544056a920dc75f
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
This commit is contained in:
Pranav Vashi
2018-09-12 13:04:10 +07:00
committed by Hung Phan
parent 84efe6f23e
commit dc547a0bd1
4 changed files with 26 additions and 1 deletions

10
res/drawable/ic_power.xml Normal file
View File

@@ -0,0 +1,10 @@
<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="#FF000000"
android:pathData="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13" />
</vector>

View File

@@ -281,4 +281,7 @@
<string name="show_carrier_keyguard">Màn hình khóa</string>
<string name="show_carrier_statusbar">Thanh trạng thái</string>
<string name="show_carrier_enabled">Cả hai</string>
<!-- Power menu on secure lockscreen -->
<string name="lockscreen_enable_power_menu_title">Menu nguồn</string>
<string name="lockscreen_enable_power_menu_summary">Cho phép truy cập menu nguồn trên màn hình khóa an toàn</string>
</resources>

View File

@@ -323,4 +323,8 @@
<string name="show_carrier_statusbar">Statusbar</string>
<string name="show_carrier_enabled">Both</string>
<!-- Power menu on secure lockscreen -->
<string name="lockscreen_enable_power_menu_title">Power menu</string>
<string name="lockscreen_enable_power_menu_summary">Allow accessing power menu on secure lock screen</string>
</resources>

View File

@@ -55,13 +55,21 @@
<PreferenceCategory
android:title="@string/lockscreen_secure_power_title">
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"
android:summary="@string/lockscreen_power_menu_disabled_summary"
android:defaultValue="false" />
<com.cherish.settings.preferences.GlobalSettingSwitchPreference
android:key="lockscreen_enable_power_menu"
android:icon="@drawable/ic_power"
android:title="@string/lockscreen_enable_power_menu_title"
android:summary="@string/lockscreen_enable_power_menu_summary"
android:defaultValue="true" />
<com.cherish.settings.preferences.GlobalSettingSwitchPreference
android:key="lockscreen_powermenu_secure"
android:icon="@drawable/ic_lock_outline"