diff --git a/app/src/main/java/org/fdroid/fdroid/NotificationHelper.java b/app/src/main/java/org/fdroid/fdroid/NotificationHelper.java index ca6b08bee..dd14a2e1a 100644 --- a/app/src/main/java/org/fdroid/fdroid/NotificationHelper.java +++ b/app/src/main/java/org/fdroid/fdroid/NotificationHelper.java @@ -548,7 +548,7 @@ public class NotificationHelper { } }); } else { - App.loadBitmapWithGlide(context, entry.app.repoId, entry.app.getIconPath()) + App.loadBitmapWithGlide(context, entry.app.repoId, entry.app.iconFile) .into(new CustomTarget() { @Override public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition transition) { diff --git a/app/src/main/java/org/fdroid/fdroid/Utils.java b/app/src/main/java/org/fdroid/fdroid/Utils.java index 7ebed45db..bf422dffe 100644 --- a/app/src/main/java/org/fdroid/fdroid/Utils.java +++ b/app/src/main/java/org/fdroid/fdroid/Utils.java @@ -529,15 +529,6 @@ public final class Utils { return new DownloadRequest(file, mirrors, proxy, repo.getUsername(), repo.getPassword()); } - @Nullable - @Deprecated - public static DownloadRequest getDownloadRequest(@NonNull Repository repo, @Nullable String path) { - if (path == null) return null; - List mirrors = repo.getMirrors(); - Proxy proxy = NetCipher.getProxy(); - return new DownloadRequest(path, mirrors, proxy, repo.getUsername(), repo.getPassword()); - } - /** * Get the checksum hash of the file {@code file} using the algorithm in {@code hashAlgo}. * {@code file} must exist on the filesystem and {@code hashAlgo} must be supported diff --git a/app/src/main/java/org/fdroid/fdroid/data/App.java b/app/src/main/java/org/fdroid/fdroid/data/App.java index 69031ccf4..53705c572 100644 --- a/app/src/main/java/org/fdroid/fdroid/data/App.java +++ b/app/src/main/java/org/fdroid/fdroid/data/App.java @@ -374,7 +374,7 @@ public class App implements Comparable, Parcelable { } public static RequestBuilder loadBitmapWithGlide(Context context, long repoId, - String path) { + IndexFile file) { Repository repo = FDroidApp.getRepo(repoId); if (repo == null) { Log.e(TAG, "Repo not found: " + repoId); @@ -382,13 +382,13 @@ public class App implements Comparable, Parcelable { } String address = Utils.getRepoAddress(repo); if (address.startsWith("content://")) { - String sb = path == null ? - null : Utils.getUri(address, path.split("/")).toString(); + String sb = file == null ? + null : Utils.getUri(address, file.getName().split("/")).toString(); return Glide.with(context).asBitmap().load(sb); } else if (address.startsWith("file://")) { - return Glide.with(context).asBitmap().load(path); + return Glide.with(context).asBitmap().load(file.getName()); } else { - return Glide.with(context).asBitmap().load(Utils.getDownloadRequest(repo, path)); + return Glide.with(context).asBitmap().load(Utils.getDownloadRequest(repo, file)); } }