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

Commit bb9b1957 authored by Lucas Dupin's avatar Lucas Dupin Committed by Android (Google) Code Review
Browse files

Merge "Fix issue where media icon cannot be loaded"

parents b8d240fa 2955bf1e
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -208,10 +208,12 @@ public class KeyguardSliceView extends LinearLayout implements View.OnClickListe
                    android.app.slice.SliceItem.FORMAT_IMAGE);
            if (icon != null) {
                iconDrawable = icon.getIcon().loadDrawable(mContext);
                if (iconDrawable != null) {
                    final int width = (int) (iconDrawable.getIntrinsicWidth()
                            / (float) iconDrawable.getIntrinsicHeight() * mIconSize);
                    iconDrawable.setBounds(0, 0, Math.max(width, 1), mIconSize);
                }
            }
            button.setCompoundDrawables(iconDrawable, null, null, null);
            button.setOnClickListener(this);
            button.setClickable(pendingIntent != null);