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

Commit 3cb3ad99 authored by Anthony Chen's avatar Anthony Chen
Browse files

Refactor notification to allow for overlay by Android Auto.

Android Auto requires different styling for notifications. In
particular:

- Background of scrim to be a different color
- Notification shade should always be full width
- No quick settings
- User switcher always visible
- Card styling, such as rounded corners and more spacing between items.
- Notification shade to be triggered from a button on the navigation
  bar.

Refactored different areas of the framework to allow for this. This
mostly means extending notification code and overriding methods where
appropriate.

Test: manually tested
Bug: 33487455
Change-Id: Ifcea70e121c1cbbeb057bb6ce8d351336ae41554
parent ab3070fd
Loading
Loading
Loading
Loading
+11 −15
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
<!-- Extends RelativeLayout -->
<com.android.systemui.statusbar.phone.QuickStatusBarHeader
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:systemui="http://schemas.android.com/apk/res-auto"
    android:id="@+id/header"
    android:layout_width="match_parent"
    android:layout_height="@dimen/status_bar_header_height"
@@ -29,8 +28,7 @@
    android:clipToPadding="false"
    android:paddingTop="0dp"
    android:paddingEnd="0dp"
    android:paddingStart="0dp"
    >
    android:paddingStart="0dp">

    <LinearLayout
        android:layout_width="wrap_content"
@@ -190,8 +188,7 @@
        android:layout_alignParentBottom="true"
        android:alpha="0"
        android:background="@color/qs_detail_progress_track"
        android:src="@drawable/indeterminate_anim"
        />
        android:src="@drawable/indeterminate_anim"/>

    <TextView
        android:id="@+id/header_debug_info"
@@ -203,7 +200,6 @@
        android:textColor="#00A040"
        android:textSize="11dp"
        android:textStyle="bold"
        android:visibility="invisible"
        />
        android:visibility="invisible"/>

</com.android.systemui.statusbar.phone.QuickStatusBarHeader>
+13 −14
Original line number Diff line number Diff line
@@ -23,8 +23,7 @@
    android:id="@+id/notification_panel"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@android:color/transparent"
    >
    android:background="@android:color/transparent" >

    <include
        layout="@layout/keyguard_status_view"
@@ -88,4 +87,4 @@
        android:visibility="invisible"
        android:background="@drawable/qs_navbar_scrim" />

</com.android.systemui.statusbar.phone.NotificationPanelView><!-- end of sliding panel -->
</com.android.systemui.statusbar.phone.NotificationPanelView>
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
        android:layout_height="match_parent"
        android:importantForAccessibility="no"
        sysui:ignoreRightInset="true"
        sysui:scrimColor="@color/scrim_behind_color"
        />

    <com.android.systemui.statusbar.AlphaOptimizedView
+4 −0
Original line number Diff line number Diff line
@@ -115,5 +115,9 @@
    <declare-styleable name="PluginInflateContainer">
        <attr name="viewType" format="string" />
    </declare-styleable>
    <declare-styleable name="ScrimView">
        <!-- The initial color for the scrim. -->
        <attr name="scrimColor" format="color" />
    </declare-styleable>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
    <color name="qs_detail_button">@*android:color/quaternary_device_default_settings</color>
    <color name="qs_detail_button_white">#B3FFFFFF</color><!-- 70% white -->
    <color name="qs_detail_transition">#66FFFFFF</color>
    <color name="scrim_behind_color">@android:color/black</color>
    <color name="status_bar_clock_color">#FFFFFFFF</color>
    <color name="qs_user_detail_icon_muted">#FFFFFFFF</color> <!-- not so muted after all -->
    <color name="qs_tile_disabled_color">#9E9E9E</color> <!-- 38% black -->
Loading