Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5881ed09 authored by Matías Hernández's avatar Matías Hernández
Browse files

Inline MODES_UI and related flags (Settings)

Removed most of settings.notification.zen and related resources (preferences, layouts, strings).

Bug: 368247671
Test: atest + manual
Flag: EXEMPT Removing flags
Change-Id: Ie54989e3b6c218a0281041a30c04f9cc9d20b9fb
parent 533234f1
Loading
Loading
Loading
Loading
+9 −103
Original line number Diff line number Diff line
@@ -1420,29 +1420,24 @@
            android:label="@string/zen_modes_list_title"
            android:icon="@*android:drawable/ic_zen_priority_modes"
            android:exported="true">
            <intent-filter android:priority="1"
                           android:featureFlag="android.app.modes_ui">
            <intent-filter android:priority="1">
                <action android:name="android.settings.ZEN_MODE_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:priority="1"
                           android:featureFlag="android.app.modes_ui">
            <intent-filter android:priority="1">
                <action android:name="android.settings.ZEN_MODE_PRIORITY_SETTINGS" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:priority="41"
                           android:featureFlag="android.app.modes_ui">
            <intent-filter android:priority="41">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="com.android.settings.SHORTCUT" />
            </intent-filter>
            <intent-filter android:priority="10"
                           android:featureFlag="android.app.modes_ui">
            <intent-filter android:priority="10">
                <action android:name="android.settings.ZEN_MODE_AUTOMATION_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:priority="10"
                           android:featureFlag="android.app.modes_ui">
            <intent-filter android:priority="10">
                <action android:name="android.settings.ACTION_CONDITION_PROVIDER_SETTINGS" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
@@ -1455,40 +1450,10 @@
                       android:value="true" />
        </activity>

        <activity
            android:name="Settings$ZenModeSettingsActivity"
            android:label="@string/zen_mode_settings_title"
            android:icon="@drawable/ic_homepage_notification"
            android:exported="true">
            <intent-filter android:priority="1"
                           android:featureFlag="!android.app.modes_ui">
                <action android:name="android.settings.ZEN_MODE_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:priority="1"
                           android:featureFlag="!android.app.modes_ui">
                <action android:name="android.settings.ZEN_MODE_PRIORITY_SETTINGS" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:priority="41"
                           android:featureFlag="!android.app.modes_ui">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="com.android.settings.SHORTCUT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.notification.zen.ZenModeSettings" />
            <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
                       android:value="@string/menu_key_notifications"/>
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
                android:value="true" />
        </activity>

        <activity
            android:name="Settings$ModeSettingsActivity"
            android:exported="true">
            <intent-filter android:priority="1"
                           android:featureFlag="android.app.modes_ui">
            <intent-filter android:priority="1">
                <action android:name="android.settings.AUTOMATIC_ZEN_RULE_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
@@ -1500,8 +1465,7 @@

        <activity
            android:name="Settings$DndModeDisplaySettingsActivity"
            android:exported="true"
            android:featureFlag="android.app.modes_ui">
            android:exported="true">
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.notification.modes.ZenModeDisplayFragment"/>
            <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
@@ -1516,30 +1480,6 @@
            android:theme="@style/Theme.Settings.NoActionBar">
        </activity>

        <activity
            android:name="Settings$ZenModeAutomationSettingsActivity"
            android:label="@string/zen_mode_automation_settings_title"
            android:icon="@drawable/ic_notifications"
            android:exported="true">
            <intent-filter android:priority="10"
                           android:featureFlag="!android.app.modes_ui">
                <action android:name="android.settings.ZEN_MODE_AUTOMATION_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:priority="10"
                           android:featureFlag="!android.app.modes_ui">
                <action android:name="android.settings.ACTION_CONDITION_PROVIDER_SETTINGS" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                       android:value="com.android.settings.notification.zen.ZenModeAutomationSettings" />
            <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
                       android:value="@string/menu_key_notifications"/>
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
                       android:value="true" />
        </activity>

        <activity
            android:name=".Settings$ManageAdaptiveNotificationsActivity"
            android:exported="true">
@@ -1607,40 +1547,6 @@
            <meta-data android:name="com.android.settings.icon_tintable" android:value="true" />
        </activity>

        <activity
            android:name="Settings$ZenModeScheduleRuleSettingsActivity"
            android:exported="true">
            <intent-filter android:priority="1">
                <action android:name="android.settings.ZEN_MODE_SCHEDULE_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" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.notification.zen.ZenModeScheduleRuleSettings" />
            <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
                       android:value="@string/menu_key_notifications"/>
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
                android:value="true" />
        </activity>

        <activity
            android:name="Settings$ZenModeEventRuleSettingsActivity"
            android:exported="true">
            <intent-filter android:priority="1">
                <action android:name="android.settings.ZEN_MODE_EVENT_RULE_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.notification.zen.ZenModeEventRuleSettings" />
            <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
                       android:value="@string/menu_key_notifications"/>
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
                android:value="true" />
        </activity>

        <activity
            android:name="Settings$DisplaySettingsActivity"
            android:label="@string/display_settings"
@@ -4101,7 +4007,7 @@

        <activity
            android:name="Settings$ZenAccessDetailSettingsActivity"
            android:label="@string/manage_zen_access_title"
            android:label="@string/manage_zen_modes_access_title"
            android:exported="true"
            android:excludeFromRecents="true">
            <intent-filter>
@@ -4118,7 +4024,7 @@
        <activity
            android:name="Settings$ZenAccessSettingsActivity"
            android:exported="true"
            android:label="@string/manage_zen_access_title">
            android:label="@string/manage_zen_modes_access_title">
            <intent-filter android:priority="1">
                <action android:name="android.settings.NOTIFICATION_POLICY_ACCESS_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@

                    <TextView
                        android:id="@+id/settings_description"
                        android:text="@string/nls_feature_settings_summary"
                        android:text="@string/nls_feature_modes_settings_summary"
                        style="@style/AccessibilityDialogPermissionDescription" />

                </LinearLayout>
+0 −171
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 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.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:fadeScrollbars="false"
            android:scrollIndicators="top|bottom">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingStart="24dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginTop="14dp">
            <TextView
                android:id="@+id/zen_custom_settings_dialog_calls"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/zen_mode_calls" />

            <TextView
                android:id="@+id/zen_custom_settings_dialog_calls_allow"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceListItem" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginTop="14dp">
            <TextView
                android:id="@+id/zen_custom_settings_dialog_messages"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/zen_mode_messages" />

            <TextView
                android:id="@+id/zen_custom_settings_dialog_messages_allow"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceListItem" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginTop="14dp">
            <TextView
                android:id="@+id/zen_custom_settings_dialog_alarms"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/zen_mode_alarms" />

            <TextView
                android:id="@+id/zen_custom_settings_dialog_alarms_allow"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceListItem" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginTop="14dp">
            <TextView
                android:id="@+id/zen_custom_settings_dialog_media"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/zen_mode_media" />

            <TextView
                android:id="@+id/zen_custom_settings_dialog_media_allow"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceListItem" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginTop="14dp">
            <TextView
                android:id="@+id/zen_custom_settings_dialog_system"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/zen_mode_system" />

            <TextView
                android:id="@+id/zen_custom_settings_dialog_system_allow"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceListItem" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginTop="14dp">
            <TextView
                android:id="@+id/zen_custom_settings_dialog_reminders"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/zen_mode_reminders"/>

            <TextView
                android:id="@+id/zen_custom_settings_dialog_reminders_allow"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceListItem" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginTop="14dp">
            <TextView
                android:id="@+id/zen_custom_settings_dialog_events"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/zen_mode_events"/>

            <TextView
                android:id="@+id/zen_custom_settings_dialog_events_allow"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceListItem" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginTop="14dp">
            <TextView
                android:id="@+id/zen_custom_settings_dialog_notifications"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/zen_custom_settings_notifications_header" />

            <TextView
                android:id="@+id/zen_custom_settings_dialog_show_notifications"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="?android:attr/textAppearanceListItem" />
        </LinearLayout>
    </LinearLayout>
</ScrollView>
 No newline at end of file
+0 −50
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  Copyright (C) 2017 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.
  -->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:orientation="vertical">

    <TextView
        android:text="@string/zen_mode_settings_summary"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/zen_mode_settings_button_margin_vertical"/>

    <Button
        android:id="@+id/zen_mode_settings_turn_on_button"
        style="@style/ActionPrimaryButton"
        android:layout_marginTop="@dimen/zen_mode_settings_button_margin_vertical"
        android:layout_marginBottom="@dimen/zen_mode_settings_button_margin_vertical"
        android:text="@string/zen_mode_button_turn_on"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

    <Button
        android:id="@+id/zen_mode_settings_turn_off_button"
        style="@style/ActionPrimaryButton"
        android:layout_marginTop="@dimen/zen_mode_settings_button_margin_vertical"
        android:layout_marginBottom="@dimen/zen_mode_settings_button_margin_vertical"
        android:text="@string/zen_mode_button_turn_off"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

</LinearLayout>
 No newline at end of file

res/layout/zen_rule_name.xml

deleted100755 → 0
+0 −46
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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" >

    <EditText
        android:id="@+id/zen_mode_rule_name"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        android:singleLine="true"
        android:inputType="textCapSentences"
        android:hint="@string/zen_mode_rule_name_hint"
        android:layout_marginLeft="22dp"
        android:layout_marginRight="22dp" >

        <requestFocus />

    </EditText>

    <TextView
        android:id="@+id/zen_mode_rule_name_warning"
        android:visibility="invisible"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:singleLine="true"
        android:layout_marginLeft="26dp"
        android:layout_marginRight="26dp"
        android:textColor="?android:attr/colorError"
        android:text="@string/zen_mode_rule_name_warning" />

</LinearLayout>
Loading