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

Commit 10f23c1e authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Update the notif expand button so it can be shared

.. with notification history

Test: manual
Bug: 184695652
Change-Id: Iaa61d2442539ee42ec776530b84bf98c76e038a9
parent aaeacb80
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -165,17 +165,25 @@ public class NotificationExpandButton extends FrameLayout {

    private void updateColors() {
        if (shouldShowNumber() && !mDisallowColor) {
            if (mHighlightPillColor != 0) {
                mPillView.setBackgroundTintList(ColorStateList.valueOf(mHighlightPillColor));
            }
            mPillView.setBackgroundTintMode(PorterDuff.Mode.SRC_IN);
            mIconView.setColorFilter(mHighlightTextColor, PorterDuff.Mode.SRC_IN);
            if (mHighlightTextColor != 0) {
                mNumberView.setTextColor(mHighlightTextColor);
            }
        } else {
            if (mDefaultPillColor != 0) {
                mPillView.setBackgroundTintList(ColorStateList.valueOf(mDefaultPillColor));
            }
            mPillView.setBackgroundTintMode(PorterDuff.Mode.SRC_IN);
            mIconView.setColorFilter(mDefaultTextColor, PorterDuff.Mode.SRC_IN);
            if (mDefaultTextColor != 0) {
                mNumberView.setTextColor(mDefaultTextColor);
            }
        }
    }

    private boolean shouldShowNumber() {
        return !mExpanded && mNumber > 1;
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
    android:layout_gravity="top|end"
    android:contentDescription="@string/expand_button_content_description_collapsed"
    android:padding="16dp"
    android:visibility="gone"
    >

    <LinearLayout
@@ -40,6 +39,7 @@
            android:textAppearance="@style/TextAppearance.DeviceDefault.Notification.Info"
            android:gravity="center_vertical"
            android:paddingStart="8dp"
            android:visibility="gone"
            />

        <ImageView
+2 −0
Original line number Diff line number Diff line
@@ -4339,4 +4339,6 @@
  <java-symbol type="drawable" name="ic_accessibility_24dp" />
  <java-symbol type="string" name="view_and_control_notification_title" />
  <java-symbol type="string" name="view_and_control_notification_content" />

  <java-symbol type="layout" name="notification_expand_button"/>
</resources>