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

Commit 45fa140b authored by John Spurlock's avatar John Spurlock
Browse files

Settings: An update on Downtime.

 - Migrate settings to the new zen mode state model.
 - Remove downtime settings.
 - Add automatic rule management page (add/remove)
 - Bind new automatic schedule rules to detail editor.
 - Clean up a few found miscapitalized string captions.
 - Migrate zen switch to report the shared summary string.

Bug: 20064962
Change-Id: Ia561e7f77c90c962729240b4d51ba1915297f64a
parent 342d0853
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -709,6 +709,26 @@
                android:value="true" />
        </activity>

        <activity android:name="Settings$ZenModeScheduleRuleSettingsActivity"
                android:exported="true"
                android:taskAffinity="">
            <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" />
                <category android:name="com.android.settings.SHORTCUT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.notification.ZenModeScheduleRuleSettings" />
            <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="">
+25 −0
Original line number Diff line number Diff line
<!--
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>
+32 −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.
-->
<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>
+1 −1
Original line number Diff line number Diff line
@@ -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" />
+24 −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.
-->

<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>
Loading