The structure of the JSON (FeatureV2) and of our internal class AppManifest is different. The latter uses a list of strings instead of objects. The ReflectionDiffer didn't handle this different and was throwing an exception when diffing changing features.
However, the impact of this bug should be small as normally one version has an ID which is its SHA256 hash and thus its features shouldn't change over repo updates. Imaginable is erratic repo creation software though.
we've seen serialized FileV2 objects becoming an empty string after parcelizing them,
so we need to account for null *and* empty string here.
Fixes acra-crash-reports#617
I can't really figure out this specific issue, but seems like it
should skip apps after NameNotFoundException regardless of why. This
is used elsewhere, like `DbUpdateChecker.getSuggestedVersion()`.
Here's the error that I saw on CalyxOS:
```
android.content.pm.PackageManager$NameNotFoundException: org.calyxos.customization
at android.app.ApplicationPackageManager.getPackageInfoAsUser(ApplicationPackageManager.java:253)
at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:213)
at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:207)
at org.fdroid.index.v1.IndexV1Creator.addApp(IndexV1Creator.kt:67)
at org.fdroid.index.v1.IndexV1Creator.createIndex(IndexV1Creator.kt:49)
at org.fdroid.index.v1.IndexV1Creator.createRepo(IndexV1Creator.kt:37)
at org.fdroid.fdroid.nearby.LocalRepoManager.generateIndex(LocalRepoManager.java:259)
at org.fdroid.fdroid.nearby.LocalRepoService.runProcess(LocalRepoService.java:107)
at org.fdroid.fdroid.nearby.LocalRepoService$GenerateLocalRepoThread.run(LocalRepoService.java:96)
```
With index-v2, "signer" will be the only field used, since "sig" is
deprecated and should be removed. "sig" needs to be kept only for
generating the index-v1.jar in nearby/swap repos so that it remains
compatible with older clients. This code base should no longer use
"sig" for anything besides writing it out to index-v1.json.
Roboletric apparently does not support Os.symlink, and some devices might
have wonky implementations. Copying is slower and takes more disk space,
but is much more reliable. So it is a workable fallback.
This affects anti-features and categories. Reflection diffing has been made more robust in the process with the earlier FileV2 hack removed and better error messages.