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

Commit e7f3c30e authored by eray orçunus's avatar eray orçunus Committed by Bruno Martins
Browse files

SystemUI: Enable and fix QS detail view, adapt layout to 10



* Re-enabling dual-target(detail view) was easy as pie, but layout was from Oreo
  and DND tile was broken.

* I've applied QS Customize layout to details view to match it with Pie look.

* DND showDetail function was overriden to show new EnableZenModeDialog.
  New dialog's implementation were taken from old detail view, so I've disabled
  the new one, added the only new thing (priority-but-alarm-disabled warning text)
  to old one and enabled it.

* DND tile will still respect "Ask duration every time" setting and ask duration to
  the user, but this time with detail view.

* Squashes in the follow commits:

Author: Chengzhi.Hou <hcz017@gmail.com>
Date:   Fri May 11 12:26:56 2018 +0800

    SystemUI: Enable dualTarget on CellularTile

    * To show DataUsageDetailView

    Change-Id: If09b4ac51bb6df01b8ea9f59bccf123de65da8cf

Author: LuK1337 <priv.luk@gmail.com>
Date:   Sat Jun 23 13:18:27 2018 +0200

    SystemUI: CellularTile: Don't call showDetail() when device is locked

    * We recently enabled dualTarget for CellularTile which allowed us
      to toggle mobile data without unlocking device. Moving showDetail
      call to postQSRunnableDismissingKeyguard when the device is locked
      fixes this issue.

    Change-Id: I16dc766166a33a309a2fc945e81fa15b5d194196

Author: Paul Keith <javelinanddart@gmail.com>
Date:   Wed Jun 27 18:28:22 2018 +0200

    SystemUI: Fix Data Usage tile to match Settings

    Change-Id: Ieff3504baf3d13c77d06fcde87d5ac56d2586194

Author: eray orçunus <erayorcunus@gmail.com>
Date:   Fri Apr 26 00:15:30 2019 +0300

    SystemUI: Fix several layout bugs

    * QSDetail and QSCustomize panels' clippers starts after the black
      header, but the ripple animation coords were wrong.

    * QSDetail and QSCustomize use a transparent view to let QS header
      be seen. Header's height changes with orientation, but QSDetail
      and QSCustomize do nothing about it.
      As a result, there were gaps or blocked views.

    Change-Id: I5cefad14b519be99adcf5c913e96385d45b8fb17
    Signed-off-by: default avatareray orçunus <erayorcunus@gmail.com>

Author: Dan Pasanen <dan.pasanen@gmail.com>
Date:   Wed Nov 6 15:01:32 2019 -0600

    SystemUI: Convert tiles to use UnlockMethodCache#canSkipBouncer

     * This updates the API following commit aaba8ef2.

    Change-Id: I4932a3e023a40e362e81fd74f2921e9cb472ebf3

Change-Id: I5ecb419fbf699be33494d0a9cc215914d90004bd
parent 8718f0e0
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 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">
    <shape>
        <solid android:color="?android:attr/colorSecondary"/>
        <corners
            android:topLeftRadius="?android:attr/dialogCornerRadius"
            android:topRightRadius="?android:attr/dialogCornerRadius" />
    </shape>
</inset>
+37 −23
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/qs_detail_background"
    android:clickable="true"
    android:orientation="vertical"
    android:paddingBottom="8dp"
@@ -27,6 +26,20 @@
    android:elevation="4dp"
    android:importantForAccessibility="no" >

    <View
        android:id="@+id/qs_detail_top_space"
        android:layout_width="match_parent"
        android:layout_height="@*android:dimen/quick_qs_offset_height"
        android:background="@android:color/transparent" />

    <com.android.keyguard.AlphaOptimizedLinearLayout
        android:id="@+id/detail_container"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="vertical"
        android:background="@drawable/qs_detail_background">

        <include
            android:id="@+id/qs_detail_header"
            layout="@layout/qs_detail_header"
@@ -57,5 +70,6 @@
        </com.android.systemui.qs.NonInterceptingScrollView>

        <include layout="@layout/qs_detail_buttons" />
    </com.android.keyguard.AlphaOptimizedLinearLayout>

</com.android.systemui.qs.QSDetail>
+4 −5
Original line number Diff line number Diff line
@@ -17,17 +17,16 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingEnd="8dp"
    android:gravity="end">
    android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
    android:gravity="end"
    android:orientation="horizontal">

    <TextView
        android:id="@android:id/button2"
        style="@style/QSBorderlessButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:minHeight="48dp"
        android:minWidth="132dp"
        android:textAppearance="@style/TextAppearance.QS.DetailButton"
        android:focusable="true" />

@@ -37,7 +36,7 @@
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:minHeight="48dp"
        android:minWidth="88dp"
        android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
        android:textAppearance="@style/TextAppearance.QS.DetailButton"
        android:focusable="true"/>

+2 −6
Original line number Diff line number Diff line
@@ -19,17 +19,13 @@
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingLeft="@dimen/qs_detail_header_padding"
    android:paddingTop="@dimen/qs_detail_header_padding"
    android:paddingTop="@dimen/qs_detail_items_padding_top"
    android:paddingBottom="@dimen/qs_detail_items_padding_top"
    android:paddingEnd="@dimen/qs_panel_padding"
    android:background="@drawable/btn_borderless_rect"
    android:background="@drawable/qs_detail_toolbar"
    android:orientation="vertical"
    android:gravity="center">

    <com.android.systemui.ResizingSpace
        android:layout_width="match_parent"
        android:layout_height="@dimen/qs_detail_margin_top" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
        android:layout_height="@dimen/qs_detail_item_icon_size"
        android:layout_marginStart="@dimen/qs_detail_item_icon_marginStart"
        android:layout_marginEnd="@dimen/qs_detail_item_icon_marginEnd"
        android:tint="?android:attr/textColorPrimary"/>
        android:tint="?android:attr/textColorSecondary"/>

    <LinearLayout
        android:layout_width="0dp"
@@ -65,6 +65,6 @@
        android:focusable="true"
        android:scaleType="center"
        android:contentDescription="@*android:string/media_route_controller_disconnect"
        android:tint="?android:attr/textColorPrimary" />
        android:tint="?android:attr/textColorSecondary" />

</LinearLayout>
Loading