fix: limits image size to prevent widget crash #172

This commit is contained in:
eddyizm 2025-10-15 21:57:24 -07:00
parent 18cd84f820
commit 9d01d2057a
No known key found for this signature in database
GPG key ID: CF5F671829E8158A

View file

@ -27,6 +27,8 @@ import java.util.concurrent.ExecutionException;
public final class WidgetUpdateManager {
private static final int WIDGET_SAFE_ART_SIZE = 512;
public static void updateFromState(Context ctx,
String title,
String artist,
@ -95,7 +97,7 @@ public final class WidgetUpdateManager {
CustomGlideRequest.loadAlbumArtBitmap(
appCtx,
coverArtId,
com.cappielloantonio.tempo.util.Preferences.getImageSize(),
WIDGET_SAFE_ART_SIZE,
new CustomTarget<Bitmap>() {
@Override
public void onResourceReady(Bitmap resource, Transition<? super Bitmap> transition) {