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

Commit b294b82c authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Update notification log

- Change notification presentation to better match notification shade
- Stop constantly removing and readding all of the preferences
- Update individual preferences in a kind of hacky way (to be improved
later)
- Link notification entries to notification preferences screen
- Hide notification summaries

Bug: 137396965
Test: manual
Change-Id: Icdd54488b8bf659f6fe42af93e42cd21912fa4fe
parent 5f10a9a9
Loading
Loading
Loading
Loading
+56 −25
Original line number Diff line number Diff line
@@ -26,8 +26,7 @@

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="@*android:dimen/status_bar_icon_size"
        android:layout_marginBottom="6dp"
        android:layout_height="wrap_content"
        >

        <ImageView
@@ -46,24 +45,38 @@
            android:scaleType="fitCenter" />

        <TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:id="@+id/pkgname"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_toStartOf="@+id/timestamp"
            android:layout_toEndOf="@id/icon"
            android:ellipsize="end"
            android:singleLine="true"
            android:textColor="?android:attr/textColorPrimary"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textStyle="bold"
            android:textAlignment="viewStart"
            android:labelFor="@android:id/button2" />
            android:textAlignment="viewStart" />

        <ImageView
            android:id="@+id/alerted_icon"
            android:layout_width="@*android:dimen/status_bar_icon_size"
            android:layout_height="@*android:dimen/status_bar_icon_size"
            android:layout_centerVertical="true"
            android:layout_marginStart="6dp"
            android:paddingTop="1dp"
            android:scaleType="fitCenter"
            android:visibility="gone"
            android:layout_toEndOf="@id/pkgname"
            android:tint="?android:attr/textColorSecondary"
            android:src="@drawable/ic_notifications_alert"
        />

        <DateTimeView
            android:id="@+id/timestamp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingTop="13dp"
            android:paddingBottom="13dp"
            android:layout_alignBottom="@android:id/widget_frame"
            android:layout_alignParentEnd="true"
            android:layout_alignTop="@android:id/widget_frame"
@@ -78,26 +91,25 @@

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="@*android:dimen/status_bar_icon_size"
        android:orientation="horizontal"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:layout_marginStart="30dp"
        android:layout_marginBottom="6dp"
        >

        <ImageView
            android:id="@+id/pkgicon"
            android:layout_width="@*android:dimen/status_bar_icon_size"
            android:layout_height="@*android:dimen/status_bar_icon_size"
            android:layout_marginStart="0dp"
            android:layout_marginEnd="6dp"
            android:contentDescription="@null"
            android:adjustViewBounds="true"
            android:maxHeight="@*android:dimen/status_bar_icon_size"
            android:maxWidth="@*android:dimen/status_bar_icon_size"
            android:scaleType="fitCenter" />
        <TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="left|center_vertical"
            android:ellipsize="end"
            android:singleLine="true"
            android:textColor="?android:attr/textColorPrimary"
            android:textAlignment="viewStart"
        />

        <TextView
            android:id="@+id/pkgname"
            android:id="@+id/text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="left|center_vertical"
@@ -110,10 +122,28 @@

    </LinearLayout>

    <TextView
    <LinearLayout
        android:id="@+id/extra"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
    >
        <TextView
                android:id="@+id/notification_extra"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_marginStart="30dp"
                android:singleLine="false"
                android:textColor="?android:attr/textColorPrimary"
                android:textSize="10sp"
                android:fontFamily="monospace"
                android:textAlignment="viewStart"
        />
        <TextView
            android:id="@+id/ranking_extra"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginStart="30dp"
            android:layout_marginBottom="6dp"
@@ -123,5 +153,6 @@
            android:fontFamily="monospace"
            android:textAlignment="viewStart"
        />
    </LinearLayout>

</LinearLayout>
+1 −8
Original line number Diff line number Diff line
@@ -9997,14 +9997,7 @@
    <string name="notification_log_details_ashmem">ashmem</string>
    <!-- Notification log debug tool: header: notification alert info -->
    <string name="notification_log_details_alerted">notification alerted</string>
    <!-- Notification log debug tool: header: notification sound info -->
    <string name="notification_log_details_sound">sound</string>
    <!-- Notification log debug tool: header: notification vibration info -->
    <string name="notification_log_details_vibrate">vibrate</string>
    <!-- Notification log debug tool: header: notification vibration info -->
    <string name="notification_log_details_vibrate_pattern">pattern</string>
    <!-- Notification log debug tool: the word 'default' -->
    <string name="notification_log_details_default">default</string>
    <string name="notification_log_channel">channel</string>
    <!-- Notification log debug tool: the word 'none' -->
    <string name="notification_log_details_none">none</string>
    <!-- Notification log debug tool: missing ranking information -->