diff --git a/app/src/main/java/org/fdroid/fdroid/data/InstalledAppProviderService.java b/app/src/main/java/org/fdroid/fdroid/data/InstalledAppProviderService.java index 34616230a..6f0dee7fb 100644 --- a/app/src/main/java/org/fdroid/fdroid/data/InstalledAppProviderService.java +++ b/app/src/main/java/org/fdroid/fdroid/data/InstalledAppProviderService.java @@ -124,13 +124,21 @@ public class InstalledAppProviderService extends IntentService { * is in sync with what the {@link PackageManager} tells us is installed. Once * completed, the relevant {@link android.content.ContentProvider}s will be * notified of any changes to installed statuses. - *

+ *

* The installed app cache could get out of sync, e.g. if F-Droid crashed/ or * ran out of battery half way through responding to {@link Intent#ACTION_PACKAGE_ADDED}. * This method returns immediately, and will continue to work in an * {@link IntentService}. It doesn't really matter where we put this in the * bootstrap process, because it runs in its own thread, at the lowest priority: * {@link Process#THREAD_PRIORITY_LOWEST}. + *

+ * APKs installed in {@code /system} will often have zeroed out timestamps, like + * 2008-01-01 (ziptime) or 2009-01-01. So instead anything older than 2010 every + * time since we have no way to know whether an APK wasn't changed as part of an + * OTA update. An OTA update could change the APK without changing the + * {@link PackageInfo#versionCode} or {@link PackageInfo#lastUpdateTime}. + * + * @see