diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/ic_delete.xml | 25 | ||||
-rwxr-xr-x | res/layout/zen_rule_name.xml | 32 | ||||
-rwxr-xr-x | res/layout/zen_schedule_rule_day.xml (renamed from res/layout/zen_downtime_day.xml) | 2 | ||||
-rw-r--r-- | res/menu/zen_mode_automation.xml | 24 | ||||
-rw-r--r-- | res/menu/zen_mode_rule.xml | 24 | ||||
-rw-r--r-- | res/values/arrays.xml | 14 | ||||
-rwxr-xr-x | res/values/dimens.xml | 4 | ||||
-rw-r--r-- | res/values/strings.xml | 88 | ||||
-rw-r--r-- | res/xml/zen_mode_automation_settings.xml | 40 | ||||
-rw-r--r-- | res/xml/zen_mode_priority_settings.xml | 2 | ||||
-rw-r--r-- | res/xml/zen_mode_schedule_rule_settings.xml | 42 |
11 files changed, 174 insertions, 123 deletions
diff --git a/res/drawable/ic_delete.xml b/res/drawable/ic_delete.xml new file mode 100644 index 0000000..d4f79e3 --- /dev/null +++ b/res/drawable/ic_delete.xml @@ -0,0 +1,25 @@ +<!-- +Copyright (C) 2015 The Android Open Source 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:tint="?android:attr/colorControlNormal" + android:viewportWidth="48.0" + android:viewportHeight="48.0"> + <path + android:fillColor="@android:color/white" + android:pathData="M12.0,38.0c0.0,2.21 1.79,4.0 4.0,4.0l16.0,0.0c2.21,0.0 4.0,-1.79 4.0,-4.0L36.0,14.0L12.0,14.0l0.0,24.0zM38.0,8.0l-7.0,0.0l-2.0,-2.0L19.0,6.0l-2.0,2.0l-7.0,0.0l0.0,4.0l28.0,0.0L38.0,8.0z"/> +</vector> diff --git a/res/layout/zen_rule_name.xml b/res/layout/zen_rule_name.xml new file mode 100755 index 0000000..62f51ea --- /dev/null +++ b/res/layout/zen_rule_name.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 The Android Open Source 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. +--> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" > + + <EditText + android:id="@+id/rule_name" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:singleLine="true" + android:layout_marginLeft="22dp" + android:layout_marginRight="22dp" > + + <requestFocus /> + + </EditText> + +</FrameLayout> diff --git a/res/layout/zen_downtime_day.xml b/res/layout/zen_schedule_rule_day.xml index 8d2fa73..1d300d2 100755 --- a/res/layout/zen_downtime_day.xml +++ b/res/layout/zen_schedule_rule_day.xml @@ -20,4 +20,4 @@ android:minHeight="?android:attr/listPreferredItemHeightSmall" android:textAppearance="?android:attr/textAppearanceMedium" android:gravity="center_vertical" - android:paddingStart="@dimen/zen_downtime_checkbox_padding" /> + android:paddingStart="@dimen/zen_schedule_rule_checkbox_padding" /> diff --git a/res/menu/zen_mode_automation.xml b/res/menu/zen_mode_automation.xml new file mode 100644 index 0000000..02ec41f --- /dev/null +++ b/res/menu/zen_mode_automation.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 The Android Open Source 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. +--> + +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:id="@+id/add" + android:title="@string/zen_mode_time_add_rule" + android:icon="@drawable/ic_menu_add_white" + android:visible="true" + android:showAsAction="collapseActionView|ifRoom" /> +</menu> diff --git a/res/menu/zen_mode_rule.xml b/res/menu/zen_mode_rule.xml new file mode 100644 index 0000000..eea30a8 --- /dev/null +++ b/res/menu/zen_mode_rule.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2015 The Android Open Source 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. +--> + +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:id="@+id/delete" + android:title="@string/zen_mode_delete_rule" + android:icon="@drawable/ic_delete" + android:visible="true" + android:showAsAction="collapseActionView|ifRoom" /> +</menu> diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 22c351c..4f1eb97 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -1210,20 +1210,6 @@ <item>3</item> </string-array> - <!-- Setting display values for zen mode --> - <string-array name="entries_zen_mode"> - <item>Off</item> - <item>Limited interruptions</item> - <item>Zero interruptions</item> - </string-array> - - <!-- Setting values for zen mode, must match the Settings.Global.ZEN_MODE_ constants --> - <string-array name="entryvalues_zen_mode" translatable="false"> - <item>0</item> - <item>1</item> - <item>2</item> - </string-array> - <!-- Battery saver mode: allowable trigger threshold levels. --> <integer-array name="battery_saver_trigger_values" translatable="false" > <item>0</item> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 580ae22..1fd22e0 100755 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -90,8 +90,8 @@ <dimen name="notification_app_icon_size">64dp</dimen> <dimen name="notification_app_icon_badge_size">20dp</dimen> <dimen name="notification_app_icon_badge_margin">4dp</dimen> - <dimen name="zen_downtime_checkbox_padding">7dp</dimen> - <dimen name="zen_downtime_margin">17dp</dimen> + <dimen name="zen_schedule_rule_checkbox_padding">7dp</dimen> + <dimen name="zen_schedule_day_margin">17dp</dimen> <!-- Default text size for caption preview samples. Uses dp rather than sp because captions are not scaled. --> <dimen name="caption_preview_text_size">48dp</dimen> diff --git a/res/values/strings.xml b/res/values/strings.xml index 635b4650b..b6ec685 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -587,23 +587,11 @@ <!-- Button label for generic cancel action [CHAR LIMIT=20] --> <string name="cancel">Cancel</string> - <!-- Button label for generic cancel action in all caps [CHAR LIMIT=20] --> - <string name="cancel_all_caps">CANCEL</string> - - <!-- Button label for generic continue action in all caps [CHAR LIMIT=20] --> - <string name="continue_all_caps">CONTINUE</string> - <!-- Button label for generic OK action [CHAR LIMIT=20] --> <string name="okay">OK</string> - <!-- Button label for generic YES action [CHAR LIMIT=20] --> - <string name="yes_all_caps">YES</string> - - <!-- Button label for generic NO action [CHAR LIMIT=20] --> - <string name="no_all_caps">NO</string> - - <!-- Button label for generic FORGET action [CHAR LIMIT=20] --> - <string name="forget">FORGET</string> + <!-- Button label for generic forget action [CHAR LIMIT=20] --> + <string name="forget">Forget</string> <!-- Title of the Settings activity shown within the application itself. --> <string name="settings_label">Settings</string> @@ -5699,7 +5687,7 @@ <string name="notification_volume_option_title">Notification volume</string> <!-- Sound & notification > Sound section: Title for the Interruptions option and associated settings page. [CHAR LIMIT=30] --> - <string name="zen_mode_settings_title">Block interruptions</string> + <string name="zen_mode_settings_title">@*android:string/zen_mode_feature_name</string> <!-- Sound & notification > Sound section: Title for the Priority interruptions option and associated settings page. [CHAR LIMIT=30] --> <string name="zen_mode_priority_settings_title">Priority only allows</string> @@ -5717,7 +5705,7 @@ <string name="zen_mode_option_no_interruptions">No interruptions</string> <!-- Sound & notification > Sound section: Zen mode combined summary + condition line [CHAR LIMIT=60] --> - <string name="zen_mode_summary_combination"><xliff:g id="mode" example="Priority only">%1$s</xliff:g> <xliff:g id="exit condition" example="until you turn this off">%2$s</xliff:g></string> + <string name="zen_mode_summary_combination"><xliff:g id="mode" example="Priority only">%1$s</xliff:g>: <xliff:g id="exit condition" example="Until you turn this off">%2$s</xliff:g></string> <!-- Sound & notification > Sound section: Title for the option defining the phone ringtone. [CHAR LIMIT=30] --> <string name="ringtone_title">Phone ringtone</string> @@ -5822,32 +5810,6 @@ to dismiss these notifications or touch action buttons within them. </string> - <!-- Title of preference to manage condition providers --> - <string name="manage_condition_providers">Condition providers</string> - - <!-- Summary of preference to manage condition providers, when none are enabled --> - <string name="manage_condition_providers_summary_zero">No apps provide conditions</string> - - <!-- Summary of preference to manage condition providers, when one or more are enabled --> - <plurals name="manage_condition_providers_summary_nonzero"> - <item quantity="one">%d app provides conditions</item> - <item quantity="other">%d apps provide conditions</item> - </plurals> - - <!-- String to show in the list of condition providers, when none is installed --> - <string name="no_condition_providers">No condition providers are installed.</string> - - <!-- Title for a warning message about security implications of enabling a condition - provider, displayed as a dialog message. [CHAR LIMIT=NONE] --> - <string name="condition_provider_security_warning_title">Enable - <xliff:g id="service" example="ConditionProvider">%1$s</xliff:g>?</string> - <!-- Summary for a warning message about security implications of enabling a condition - provider, displayed as a dialog message. [CHAR LIMIT=NONE] --> - <string name="condition_provider_security_warning_summary"> - <xliff:g id="condition_provider_name">%1$s</xliff:g> will be able to - add exit conditions to Do not disturb mode. - </string> - <!-- [CHAR LIMIT=NONE] Text when loading app list in notification settings --> <string name="loading_notification_apps">Loading apps...</string> @@ -5887,29 +5849,29 @@ <!-- [CHAR LIMIT=20] Notification settings: App notifications dialog dismiss button caption --> <string name="app_notifications_dialog_done">Done</string> - <!-- [CHAR LIMIT=60] Zen mode settings: Downtime category text --> - <string name="zen_mode_downtime_category">Downtime</string> + <!-- [CHAR LIMIT=40] Zen mode settings: Rule name option and edit dialog title --> + <string name="zen_mode_rule_name">Rule name</string> - <!-- [CHAR LIMIT=40] Zen mode settings: Downtime days option title --> - <string name="zen_mode_downtime_days">Days</string> + <!-- [CHAR LIMIT=40] Zen mode settings: Add rule menu option name --> + <string name="zen_mode_time_add_rule">Add rule</string> - <!-- [CHAR LIMIT=40] Zen mode settings: Downtime days option value, no days set --> - <string name="zen_mode_downtime_days_none">None</string> + <!-- [CHAR LIMIT=40] Zen mode settings: Delete rule menu option name --> + <string name="zen_mode_delete_rule">Delete rule</string> - <!-- [CHAR LIMIT=60] Zen mode settings: Downtime mode option title --> - <string name="zen_mode_downtime_mode_title">Interruptions allowed</string> + <!-- [CHAR LIMIT=40] Zen mode settings: Delete rule dialog confirmation message --> + <string name="zen_mode_delete_rule_confirmation">Delete \"<xliff:g id="rule" example="Weekends">%1$s</xliff:g>\" rule?</string> - <!-- [CHAR LIMIT=40] Zen mode settings: Downtime mode option value, priority only --> - <string name="zen_mode_downtime_mode_priority">Priority only</string> + <!-- [CHAR LIMIT=40] Zen mode settings: Delete rule dialog button caption --> + <string name="zen_mode_delete_rule_button">Delete</string> - <!-- [CHAR LIMIT=40] Zen mode settings: Downtime mode option value, none --> - <string name="zen_mode_downtime_mode_none">None</string> + <!-- [CHAR LIMIT=40] Zen mode settings: Text to display if rule isn't found --> + <string name="zen_mode_rule_not_found_text">Rule not found.</string> - <!-- [CHAR LIMIT=40] Zen mode settings: Automation category text --> - <string name="zen_mode_automation_category">Automation</string> + <!-- [CHAR LIMIT=40] Zen mode settings: Timebased rule days option title --> + <string name="zen_mode_schedule_rule_days">Days</string> - <!-- [CHAR LIMIT=40] Zen mode settings: Entry conditions option: title --> - <string name="zen_mode_entry_conditions_title">Automatically turn on</string> + <!-- [CHAR LIMIT=40] Zen mode settings: Downtime days option value, no days set --> + <string name="zen_mode_schedule_rule_days_none">None</string> <!-- [CHAR LIMIT=40] General divider text when concatenating multiple items in a text summary --> <string name="summary_divider_text">,\u0020</string> @@ -5962,14 +5924,8 @@ <!-- [CHAR LIMIT=20] Zen mode settings: End time option --> <string name="zen_mode_end_time">End time</string> - <!-- [CHAR LIMIT=60] Zen mode settings: End time option: Summary text value format when downtime mode = priority and end time = next day --> - <string name="zen_mode_end_time_priority_next_day_summary_format"><xliff:g id="formatted_time">%s</xliff:g> next day</string> - - <!-- [CHAR LIMIT=60] Zen mode settings: End time option: Summary text value format when downtime mode = none and end time = same day --> - <string name="zen_mode_end_time_none_same_day_summary_format"><xliff:g id="formatted_time">%s</xliff:g> or any alarm before</string> - - <!-- [CHAR LIMIT=60] Zen mode settings: End time option: Summary text value format when downtime mode = none and end time = next day --> - <string name="zen_mode_end_time_none_next_day_summary_format"><xliff:g id="formatted_time">%s</xliff:g> next day or any alarm before</string> + <!-- [CHAR LIMIT=60] Zen mode settings: End time option: Summary text value format when end time = next day --> + <string name="zen_mode_end_time_next_day_summary_format"><xliff:g id="formatted_time">%s</xliff:g> next day</string> <!-- [CHAR LIMIT=20] Notifications settings: Apps section header --> <string name="notification_settings_apps_title">App notifications</string> diff --git a/res/xml/zen_mode_automation_settings.xml b/res/xml/zen_mode_automation_settings.xml index 3098630..7cfffd4 100644 --- a/res/xml/zen_mode_automation_settings.xml +++ b/res/xml/zen_mode_automation_settings.xml @@ -19,43 +19,5 @@ android:key="zen_mode_settings" android:title="@string/zen_mode_automation_settings_title" > - <!-- Downtime --> - <PreferenceCategory - android:key="downtime" - android:title="@string/zen_mode_downtime_category" > - - <!-- Days --> - <Preference - android:key="days" - android:title="@string/zen_mode_downtime_days" - android:persistent="false" /> - - <!-- Start time/End time added and removed here! :-) --> - - <!-- Interruptions allowed --> - <com.android.settings.DropDownPreference - android:key="downtime_mode" - android:title="@string/zen_mode_downtime_mode_title" - android:order="100" - android:persistent="false" /> - - </PreferenceCategory> - - <PreferenceCategory - android:key="automation" - android:title="@string/zen_mode_automation_category" > - - <Preference - android:key="entry" - android:title="@string/zen_mode_entry_conditions_title" - android:persistent="false" /> - - <Preference - android:key="manage_condition_providers" - android:title="@string/manage_condition_providers" - android:persistent="false" - android:fragment="com.android.settings.notification.ConditionProviderSettings" /> - - </PreferenceCategory> - + <!-- Rules added at runtime --> </PreferenceScreen> diff --git a/res/xml/zen_mode_priority_settings.xml b/res/xml/zen_mode_priority_settings.xml index e8bab66..6cdbe95 100644 --- a/res/xml/zen_mode_priority_settings.xml +++ b/res/xml/zen_mode_priority_settings.xml @@ -16,7 +16,7 @@ --> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" - android:key="zen_mode_settings" + android:key="zen_mode_priority_settings" android:title="@string/zen_mode_priority_settings_title" > <!-- Alarms --> diff --git a/res/xml/zen_mode_schedule_rule_settings.xml b/res/xml/zen_mode_schedule_rule_settings.xml new file mode 100644 index 0000000..d808b10 --- /dev/null +++ b/res/xml/zen_mode_schedule_rule_settings.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 The Android Open Source 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. +--> + +<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" + android:key="zen_mode_schedule_rule_settings" > + + <!-- Rule name --> + <Preference + android:key="rule_name" + android:title="@string/zen_mode_rule_name" + android:persistent="false" /> + + <!-- Days --> + <Preference + android:key="days" + android:title="@string/zen_mode_schedule_rule_days" + android:persistent="false" /> + + <!-- Start time/End time added and removed here! :-) --> + + <!-- Zen mode --> + <com.android.settings.DropDownPreference + android:key="zen_mode" + android:title="@string/zen_mode_settings_title" + android:order="100" + android:persistent="false" /> + +</PreferenceScreen> |