Loading AndroidManifest.xml +24 −0 Original line number Diff line number Diff line Loading @@ -696,6 +696,10 @@ <action android:name="android.settings.ZEN_MODE_AUTOMATION_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter android:priority="1"> <action android:name="android.settings.ACTION_CONDITION_PROVIDER_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> Loading Loading @@ -729,6 +733,26 @@ android:value="true" /> </activity> <activity android:name="Settings$ZenModeExternalRuleSettingsActivity" android:exported="true" android:taskAffinity=""> <intent-filter android:priority="1"> <action android:name="android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="com.android.settings.SHORTCUT" /> </intent-filter> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.notification.ZenModeExternalRuleSettings" /> <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID" android:resource="@id/notification_settings" /> <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED" android:value="true" /> </activity> <activity android:name="Settings$HomeSettingsActivity" android:label="@string/home_settings" android:taskAffinity=""> Loading res/layout/zen_rule_name.xml +33 −2 Original line number Diff line number Diff line Loading @@ -13,7 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" > Loading @@ -29,4 +30,34 @@ </EditText> </FrameLayout> <RadioGroup android:id="@+id/rule_types" android:visibility="gone" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="22dp" android:layout_marginRight="22dp" android:layout_marginTop="16dp" android:orientation="vertical" android:checkedButton="@+id/rule_type_schedule" > <RadioButton android:id="@+id/rule_type_schedule" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/zen_schedule_rule_type_name" /> <RadioButton android:id="@+id/rule_type_2" android:layout_width="match_parent" android:layout_height="wrap_content" /> <RadioButton android:id="@+id/rule_type_3" android:layout_width="match_parent" android:layout_height="wrap_content" /> <RadioButton android:id="@+id/rule_type_4" android:layout_width="match_parent" android:layout_height="wrap_content" /> </RadioGroup> </LinearLayout> res/values/strings.xml +13 −1 Original line number Diff line number Diff line Loading @@ -5898,11 +5898,23 @@ <!-- [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: External rule type --> <string name="zen_mode_rule_type">Rule type</string> <!-- [CHAR LIMIT=40] Zen mode settings: External rule type name if unknown --> <string name="zen_mode_rule_type_unknown">Unknown</string> <!-- [CHAR LIMIT=40] Zen mode settings: Configure external rule --> <string name="zen_mode_configure_rule">Configure rule</string> <!-- [CHAR LIMIT=40] Zen mode settings: Schedule rule type name --> <string name="zen_schedule_rule_type_name">Schedule rule</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: Rule summary template (when enabled) --> <string name="zen_mode_rule_summary_template"><xliff:g id="days" example="Sun - Thu">%1$s</xliff:g> / <xliff:g id="timerange" example="10:00 PM to 7:30 AM">%2$s</xliff:g> / <xliff:g id="mode" example="Alarms only">%3$s</xliff:g></string> <string name="zen_mode_rule_summary_combination"><xliff:g id="description" example="Sun - Thu">%1$s</xliff:g> / <xliff:g id="mode" example="Alarms only">%2$s</xliff:g></string> <!-- [CHAR LIMIT=40] Zen mode settings: Timebased rule days option title --> <string name="zen_mode_schedule_rule_days">Days</string> Loading res/xml/zen_mode_external_rule_settings.xml 0 → 100644 +45 −0 Original line number Diff line number Diff line <?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_external_rule_settings" > <!-- Rule name --> <Preference android:key="rule_name" android:title="@string/zen_mode_rule_name" android:persistent="false" /> <!-- Rule type --> <Preference android:key="type" android:title="@string/zen_mode_rule_type" android:persistent="false" /> <!-- Configure --> <Preference android:key="configure" android:title="@string/zen_mode_configure_rule" android:persistent="false" /> <!-- Zen mode --> <com.android.settings.DropDownPreference android:key="zen_mode" android:title="@string/zen_mode_settings_title" android:persistent="false" /> </PreferenceScreen> src/com/android/settings/Settings.java +1 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ public class Settings extends SettingsActivity { public static class ZenModePrioritySettingsActivity extends SettingsActivity { /* empty */ } public static class ZenModeAutomationSettingsActivity extends SettingsActivity { /* empty */ } public static class ZenModeScheduleRuleSettingsActivity extends SettingsActivity { /* empty */ } public static class ZenModeExternalRuleSettingsActivity extends SettingsActivity { /* empty */ } public static class NotificationSettingsActivity extends SettingsActivity { /* empty */ } public static class NotificationAppListActivity extends SettingsActivity { /* empty */ } public static class AppNotificationSettingsActivity extends SettingsActivity { /* empty */ } Loading Loading
AndroidManifest.xml +24 −0 Original line number Diff line number Diff line Loading @@ -696,6 +696,10 @@ <action android:name="android.settings.ZEN_MODE_AUTOMATION_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter android:priority="1"> <action android:name="android.settings.ACTION_CONDITION_PROVIDER_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> Loading Loading @@ -729,6 +733,26 @@ android:value="true" /> </activity> <activity android:name="Settings$ZenModeExternalRuleSettingsActivity" android:exported="true" android:taskAffinity=""> <intent-filter android:priority="1"> <action android:name="android.settings.ZEN_MODE_EXTERNAL_RULE_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="com.android.settings.SHORTCUT" /> </intent-filter> <meta-data android:name="com.android.settings.FRAGMENT_CLASS" android:value="com.android.settings.notification.ZenModeExternalRuleSettings" /> <meta-data android:name="com.android.settings.TOP_LEVEL_HEADER_ID" android:resource="@id/notification_settings" /> <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED" android:value="true" /> </activity> <activity android:name="Settings$HomeSettingsActivity" android:label="@string/home_settings" android:taskAffinity=""> Loading
res/layout/zen_rule_name.xml +33 −2 Original line number Diff line number Diff line Loading @@ -13,7 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" > Loading @@ -29,4 +30,34 @@ </EditText> </FrameLayout> <RadioGroup android:id="@+id/rule_types" android:visibility="gone" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="22dp" android:layout_marginRight="22dp" android:layout_marginTop="16dp" android:orientation="vertical" android:checkedButton="@+id/rule_type_schedule" > <RadioButton android:id="@+id/rule_type_schedule" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/zen_schedule_rule_type_name" /> <RadioButton android:id="@+id/rule_type_2" android:layout_width="match_parent" android:layout_height="wrap_content" /> <RadioButton android:id="@+id/rule_type_3" android:layout_width="match_parent" android:layout_height="wrap_content" /> <RadioButton android:id="@+id/rule_type_4" android:layout_width="match_parent" android:layout_height="wrap_content" /> </RadioGroup> </LinearLayout>
res/values/strings.xml +13 −1 Original line number Diff line number Diff line Loading @@ -5898,11 +5898,23 @@ <!-- [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: External rule type --> <string name="zen_mode_rule_type">Rule type</string> <!-- [CHAR LIMIT=40] Zen mode settings: External rule type name if unknown --> <string name="zen_mode_rule_type_unknown">Unknown</string> <!-- [CHAR LIMIT=40] Zen mode settings: Configure external rule --> <string name="zen_mode_configure_rule">Configure rule</string> <!-- [CHAR LIMIT=40] Zen mode settings: Schedule rule type name --> <string name="zen_schedule_rule_type_name">Schedule rule</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: Rule summary template (when enabled) --> <string name="zen_mode_rule_summary_template"><xliff:g id="days" example="Sun - Thu">%1$s</xliff:g> / <xliff:g id="timerange" example="10:00 PM to 7:30 AM">%2$s</xliff:g> / <xliff:g id="mode" example="Alarms only">%3$s</xliff:g></string> <string name="zen_mode_rule_summary_combination"><xliff:g id="description" example="Sun - Thu">%1$s</xliff:g> / <xliff:g id="mode" example="Alarms only">%2$s</xliff:g></string> <!-- [CHAR LIMIT=40] Zen mode settings: Timebased rule days option title --> <string name="zen_mode_schedule_rule_days">Days</string> Loading
res/xml/zen_mode_external_rule_settings.xml 0 → 100644 +45 −0 Original line number Diff line number Diff line <?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_external_rule_settings" > <!-- Rule name --> <Preference android:key="rule_name" android:title="@string/zen_mode_rule_name" android:persistent="false" /> <!-- Rule type --> <Preference android:key="type" android:title="@string/zen_mode_rule_type" android:persistent="false" /> <!-- Configure --> <Preference android:key="configure" android:title="@string/zen_mode_configure_rule" android:persistent="false" /> <!-- Zen mode --> <com.android.settings.DropDownPreference android:key="zen_mode" android:title="@string/zen_mode_settings_title" android:persistent="false" /> </PreferenceScreen>
src/com/android/settings/Settings.java +1 −0 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ public class Settings extends SettingsActivity { public static class ZenModePrioritySettingsActivity extends SettingsActivity { /* empty */ } public static class ZenModeAutomationSettingsActivity extends SettingsActivity { /* empty */ } public static class ZenModeScheduleRuleSettingsActivity extends SettingsActivity { /* empty */ } public static class ZenModeExternalRuleSettingsActivity extends SettingsActivity { /* empty */ } public static class NotificationSettingsActivity extends SettingsActivity { /* empty */ } public static class NotificationAppListActivity extends SettingsActivity { /* empty */ } public static class AppNotificationSettingsActivity extends SettingsActivity { /* empty */ } Loading