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

Commit d0ed6e8b authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

Fix conversations not inflating with app icon flag on

Flag: android.app.notifications_use_app_icon_in_row
Test: post messaging notif with notify
Fix: 348665546
Change-Id: I43aeb83c29db0c3eb950f6c8bd7c204d6093e315
parent 73d5e7b8
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -35,8 +35,10 @@ import android.util.AttributeSet;
import android.view.RemotableViewMethod;
import android.widget.RemoteViews;

import com.android.internal.R;

/**
 * An image view that holds the icon displayed on the left side of a notification row.
 * An image view that holds the icon displayed at the start of a notification row.
 */
@RemoteViews.RemoteView
public class NotificationRowIconView extends CachingIconView {
@@ -98,9 +100,12 @@ public class NotificationRowIconView extends CachingIconView {
                setPadding(0, 0, 0, 0);

                // Make the background white in case the icon itself doesn't have one.
                int white = Color.rgb(255, 255, 255);
                ColorFilter colorFilter = new PorterDuffColorFilter(white,
                ColorFilter colorFilter = new PorterDuffColorFilter(Color.WHITE,
                        PorterDuff.Mode.SRC_ATOP);

                if (mOriginalBackground == null) {
                    setBackground(getContext().getDrawable(R.drawable.notification_icon_circle));
                }
                getBackground().mutate().setColorFilter(colorFilter);
            } else {
                // Restore original padding and background if needed
+1 −1
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@
                android:scaleType="center"
                />

            <com.android.internal.widget.CachingIconView
            <com.android.internal.widget.NotificationRowIconView
                android:id="@+id/icon"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
+1 −0
Original line number Diff line number Diff line
@@ -4055,6 +4055,7 @@
  <java-symbol type="id" name="snooze_button" />
  <java-symbol type="dimen" name="text_size_body_2_material" />
  <java-symbol type="dimen" name="notification_icon_circle_size" />
  <java-symbol type="drawable" name="notification_icon_circle" />
  <java-symbol type="dimen" name="messaging_avatar_size" />
  <java-symbol type="dimen" name="messaging_group_sending_progress_size" />
  <java-symbol type="dimen" name="messaging_image_rounding" />