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

Commit 5b2c4984 authored by Julia Tuttle's avatar Julia Tuttle Committed by Android (Google) Code Review
Browse files

Merge "BigPictureNotificationImageView: log when Icon.loadDrawable fails" into main

parents 582b66b9 e0dfa654
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.graphics.drawable.Drawable;
import android.graphics.drawable.Icon;
import android.net.Uri;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.ImageView;
import android.widget.RemoteViews;

@@ -126,11 +127,19 @@ public class BigPictureNotificationImageView extends ImageView implements

    private Drawable loadImage(Icon icon) {
        if (icon == null) return null;

        Drawable drawable = LocalImageResolver.resolveImage(icon, mContext, mMaximumDrawableWidth,
                mMaximumDrawableHeight);
        if (drawable == null) {
            return icon.loadDrawable(mContext);
        if (drawable != null) {
            return drawable;
        }

        drawable = icon.loadDrawable(mContext);
        if (drawable != null) {
            return drawable;
        }

        Log.e(TAG, "Couldn't load drawable for icon: " + icon);
        return null;
    }
}