packages/apps/Settings
修訂 | 04f77b3a6f0ec50c65534a9f54aed3a738b2284b (tree) |
---|---|
時間 | 2017-06-20 00:15:50 |
作者 | Alison Cichowlas <asc@goog...> |
Commiter | Alison Cichowlas |
Notification settings update.
- Use "what happens" descriptors instead of priority level names in summary
- Group some settings under Advanced header.
Bug: 62705435
Test: make RunSettingsRoboTests; manual verification
Merged-In: Iac31575d894d7f3532c8e631ee9d77ee21830b29
Change-Id: Iac31575d894d7f3532c8e631ee9d77ee21830b29
@@ -37,28 +37,34 @@ | ||
37 | 37 | android:title="@string/notification_vibrate_title" |
38 | 38 | settings:useAdditionalSummary="true" /> |
39 | 39 | |
40 | - <!-- Show badge --> | |
41 | - <com.android.settingslib.RestrictedSwitchPreference | |
42 | - android:key="badge" | |
43 | - android:title="@string/notification_channel_badge_title" | |
44 | - settings:useAdditionalSummary="true" | |
45 | - settings:restrictedSwitchSummary="@string/enabled_by_admin" /> | |
40 | + <PreferenceCategory | |
41 | + android:title="@string/advanced_apps"> | |
46 | 42 | |
47 | - <!-- Lights --> | |
48 | - <com.android.settingslib.RestrictedSwitchPreference | |
49 | - android:key="lights" | |
50 | - android:title="@string/notification_show_lights_title" | |
51 | - settings:useAdditionalSummary="true" /> | |
43 | + <!-- Show badge --> | |
44 | + <com.android.settingslib.RestrictedSwitchPreference | |
45 | + android:key="badge" | |
46 | + android:title="@string/notification_channel_badge_title" | |
47 | + settings:useAdditionalSummary="true" | |
48 | + settings:restrictedSwitchSummary="@string/enabled_by_admin" /> | |
49 | + | |
50 | + <!-- Lights --> | |
51 | + <com.android.settingslib.RestrictedSwitchPreference | |
52 | + android:key="lights" | |
53 | + android:title="@string/notification_show_lights_title" | |
54 | + settings:useAdditionalSummary="true" /> | |
52 | 55 | |
53 | - <!-- Visibility Override --> | |
54 | - <com.android.settings.notification.RestrictedDropDownPreference | |
56 | + <!-- Visibility Override --> | |
57 | + <com.android.settings.notification.RestrictedDropDownPreference | |
55 | 58 | android:key="visibility_override" |
56 | 59 | android:title="@string/app_notification_visibility_override_title" /> |
57 | 60 | |
58 | - <!-- Bypass DND --> | |
59 | - <com.android.settingslib.RestrictedSwitchPreference | |
61 | + <!-- Bypass DND --> | |
62 | + <com.android.settingslib.RestrictedSwitchPreference | |
60 | 63 | android:key="bypass_dnd" |
61 | 64 | android:title="@string/app_notification_override_dnd_title" |
62 | 65 | android:summary="@string/app_notification_override_dnd_summary" |
63 | 66 | settings:useAdditionalSummary="true" /> |
67 | + | |
68 | + </PreferenceCategory> | |
69 | + | |
64 | 70 | </PreferenceScreen> |
@@ -339,15 +339,15 @@ public class AppNotificationSettings extends NotificationSettingsBase { | ||
339 | 339 | case NotificationManager.IMPORTANCE_NONE: |
340 | 340 | return getContext().getString(R.string.notification_toggle_off); |
341 | 341 | case NotificationManager.IMPORTANCE_MIN: |
342 | - return getContext().getString(R.string.notification_importance_min_title); | |
342 | + return getContext().getString(R.string.notification_importance_min); | |
343 | 343 | case NotificationManager.IMPORTANCE_LOW: |
344 | - return getContext().getString(R.string.notification_importance_low_title); | |
344 | + return getContext().getString(R.string.notification_importance_low); | |
345 | 345 | case NotificationManager.IMPORTANCE_DEFAULT: |
346 | - return getContext().getString(R.string.notification_importance_default_title); | |
346 | + return getContext().getString(R.string.notification_importance_default); | |
347 | 347 | case NotificationManager.IMPORTANCE_HIGH: |
348 | 348 | case NotificationManager.IMPORTANCE_MAX: |
349 | 349 | default: |
350 | - return getContext().getString(R.string.notification_importance_high_title); | |
350 | + return getContext().getString(R.string.notification_importance_high); | |
351 | 351 | } |
352 | 352 | |
353 | 353 | } |