Cache installed signature
Merge request reports
Activity
mentioned in issue #122
1409 1377 } 1410 1378 1411 1379 TextView signatureView = (TextView) view.findViewById(R.id.signature); 1412 String sig = getInstalledSigHash(); 1413 if (prefs.expertMode() && !TextUtils.isEmpty(sig)) { @pserwylo there is only one problem with using this cache instead of manually fetching the info as needed. And it's that the cache might not have been filled yet, since it is filled asynchronously.
If you enter AppDetails really fast on a slow device, for example, we might think there is no installed sig for it. Not sure if this is a real problem or if it can be solved without making the user wait for the cache to be filled on startup.
Right now, that will result in the app details being out of date until the cache is updated. At that point, it notifies the Apk and App content providers that they have been changed. This is because even though they technically haven't been changed, they do return data from the installed app cache and so the java value objects that we pulled out of them need to be udpated.
This should result in an update to the app details screen.
Might look a bit odd to see "No updates" ... wait ... "Click here to update", but not sure if that is of big enough concern to stress about.
Rebased and reverted the null check change, self-merging.
@pserwylo I noticed that when testing this merge, I had an installed tab with only one app (f-droid) for about four seconds. Then it changed to the complete list of apps I have installed.
I guess this is because the install of f-droid triggered the listener, and the rest got added as per the asynchronous setup of the installed app cache. Still, it's kinda ugly.