Add additional summaries for some restricted switch preferences.

For some of the switch preferences, we need the new summary
"Enabled/Disabled" so that the user know about the switch state but
we can't replace some existing summaries because they provide
context.

Bug: 27659072
Change-Id: I65aca79184f543ef3fc85634594cad75f516d2fa
This commit is contained in:
Sudheer Shanka
2016-04-13 10:13:16 -07:00
parent 6a41da8e9a
commit 415bd9ece1
2 changed files with 6 additions and 3 deletions

View File

@@ -15,7 +15,8 @@
--> -->
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/security_settings_title"> xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
android:title="@string/security_settings_title">
<PreferenceCategory android:key="sim_lock" <PreferenceCategory android:key="sim_lock"
android:title="@string/sim_lock_settings_title" android:title="@string/sim_lock_settings_title"
@@ -54,7 +55,8 @@
<com.android.settingslib.RestrictedSwitchPreference android:key="toggle_install_applications" <com.android.settingslib.RestrictedSwitchPreference android:key="toggle_install_applications"
android:title="@string/install_applications" android:title="@string/install_applications"
android:summaryOff="@string/install_unknown_applications" android:summaryOff="@string/install_unknown_applications"
android:summaryOn="@string/install_unknown_applications" /> android:summaryOn="@string/install_unknown_applications"
settings:useAdditionalSummary="true" />
</PreferenceCategory> </PreferenceCategory>

View File

@@ -34,7 +34,8 @@
<com.android.settingslib.RestrictedSwitchPreference <com.android.settingslib.RestrictedSwitchPreference
android:key="add_users_when_locked" android:key="add_users_when_locked"
android:title="@string/user_add_on_lockscreen_menu" android:title="@string/user_add_on_lockscreen_menu"
android:summary="@string/user_add_on_lockscreen_menu_summary" /> android:summary="@string/user_add_on_lockscreen_menu_summary"
settings:useAdditionalSummary="true" />
</PreferenceCategory> </PreferenceCategory>
<Preference <Preference
android:key="emergency_info" android:key="emergency_info"