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

Commit 3c4076a2 authored by John Spurlock's avatar John Spurlock
Browse files

DND: Add a hidden DND tile to quick settings.

Invisible by default, not activatable when the platform
volume controller is active.

However, when the platform volume controller is not active,
it can be enabled via a broadcast intent.

When enabled, the status bar icon also changes to a single
dnd icon.

Very little more than embedding the existing zen mode panel
into the detail pane of a new QS tile.

Change-Id: I1e0ff6fbb99b00f67b53bceda8cbf121f3ef6b52
parent cff41ae3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5073,7 +5073,7 @@
    <string name="zen_mode_until">Until <xliff:g id="formattedTime" example="10:00 PM">%1$s</xliff:g></string>

    <!-- Zen mode condition: no exit criteria. [CHAR LIMIT=NONE] -->
    <string name="zen_mode_forever">Indefinitely</string>
    <string name="zen_mode_forever">Until you turn this off</string>

    <!-- Content description for the Toolbar icon used to collapse an expanded action mode. [CHAR LIMIT=NONE] -->
    <string name="toolbar_collapse_description">Collapse</string>
+41 −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:height="64dp"
    android:viewportHeight="24.0"
    android:viewportWidth="24.0"
    android:alpha=".3"
    android:width="64dp" >

    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M13.8,11.1L17.0,11.1l0.0,2.0l-1.2,0.0l4.5,4.5c1.1,-1.6 1.7,-3.5 1.7,-5.5c0.0,-5.5 -4.5,-10.0 -10.0,-10.0c-2.0,0.0 -3.9,0.6 -5.5,1.7L13.8,11.1z" />
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M13.0,13.1L7.0,13.1l0.0,-2.0l4.0,0.0L4.9,5.0C3.1,6.8 2.0,9.3 2.0,12.1c0.0,5.5 4.5,10.0 10.0,10.0c2.8,0.0 5.3,-1.1 7.1,-2.9L13.0,13.1z" />

    <group
        android:pivotX="12.0"
        android:pivotY="12.0"
        android:rotation="45.0"
        android:translateX="0.5"
        android:translateY="0.5" >
        <path
            android:fillColor="#FFFFFFFF"
            android:pathData="M-2.8,11.8l28.3,0.0l0.0,2.0l-28.3,0.0z" />
    </group>

</vector>
 No newline at end of file
+24 −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="64dp"
        android:height="64dp"
        android:viewportWidth="48.0"
        android:viewportHeight="48.0">
    <path
        android:fillColor="#FFFFFFFF"
        android:pathData="M24.0,4.0C12.95,4.0 4.0,12.95 4.0,24.0s8.95,20.0 20.0,20.0 20.0,-8.95 20.0,-20.0S35.05,4.0 24.0,4.0zm10.0,22.0L14.0,26.0l0.0,-4.0l20.0,0.0l0.0,4.0z"/>
</vector>
+28 −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.
-->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
    android:insetLeft="2.5dp"
    android:insetRight="2.5dp">
    <vector
            android:width="17dp"
            android:height="17dp"
            android:viewportWidth="48.0"
            android:viewportHeight="48.0">
        <path
            android:fillColor="#FFFFFFFF"
            android:pathData="M24.0,4.0C12.95,4.0 4.0,12.95 4.0,24.0s8.95,20.0 20.0,20.0 20.0,-8.95 20.0,-20.0S35.05,4.0 24.0,4.0zm10.0,22.0L14.0,26.0l0.0,-4.0l20.0,0.0l0.0,4.0z"/>
    </vector>
</inset>
+10 −0
Original line number Diff line number Diff line
@@ -40,6 +40,16 @@
            android:clipChildren="false" />
    </FrameLayout>

    <View
        android:id="@+id/zen_embedded_divider"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:visibility="gone"
        android:layout_marginStart="@dimen/qs_panel_padding"
        android:layout_marginEnd="@dimen/qs_panel_padding"
        android:layout_marginBottom="@dimen/qs_panel_padding"
        android:background="#4dffffff" />

    <RelativeLayout
        android:id="@+id/zen_subhead"
        android:layout_width="match_parent"
Loading