diff --git a/app/src/main/java/org/fdroid/fdroid/installer/ApkFileProvider.java b/app/src/main/java/org/fdroid/fdroid/installer/ApkFileProvider.java index e84cd52eb..b0dd65514 100644 --- a/app/src/main/java/org/fdroid/fdroid/installer/ApkFileProvider.java +++ b/app/src/main/java/org/fdroid/fdroid/installer/ApkFileProvider.java @@ -42,13 +42,16 @@ import java.io.IOException; * "/Android/data/[app_package_name]/cache/apks" (if card is mounted and app has * appropriate permission) or on device's file system depending incoming parameters *
+ * The installation process downloads APKs to the cache, then when an APK is being + * installed, it is copied into files for running the install. Installs can happen + * fully in the background, so the user might clear the cache at any time, so the + * APK cannot be installed from the cache. Also, F-Droid is not guaranteed to get + * an event after the APK is installed, so that can't be used to delete the APK + * from files when it is no longer needed. That's where CleanCacheWorker comes in, + * it runs regularly to ensure things are cleaned up. If something blocks it from + * running, then APKs can remain in {@link org.fdroid.fdroid.installer.ApkFileProvider} + */ public class CleanCacheWorker extends Worker { public static final String TAG = "CleanCacheWorker";