Skip to content

Do not crash on app uninstall (fix #167)

Immediately after an app uninstall, the associated App will be updated by a call to reset() in the AppObserver.onChange().

But before receiving this event, the activity and the fragments resume, leading to a call to getInstalledStatus(…). At this stage, we don't know that the app has been removed yet, but the package manager already removed it. Therefore, PackageManager.getInstallerPackageName(…) throws an IllegalArgumentException.

In that case, consider that the application has been uninstalled.

Should fix issue #167 (closed) https://gitlab.com/fdroid/fdroidclient/issues/167

Merge request reports