Skip to content
Snippets Groups Projects

Cache installed signature

Merged username-removed-22388 requested to merge mvdan/fdroidclient:installed-sig into master

This will later be useful for #122 and others. Also a few more fixes related to signatures and package information.

CC @pserwylo

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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)) {
  • Unless there is a specific reason for changing to a null check, could you please change this back to TextUtils.isEmpty?

  • I just don't see any situation where the string would be "" instead of null. There really isn't any benefit to this change though, so I am happy to revert if you prefer it that way.

  • Other than the comment above, looks good, thanks.

  • @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.

  • Added 45 commits:

    • ee2f69f1...bb942676 - 44 commits from branch fdroid:master
    • 39b4703f - Store installed app signature in cache
  • Added 1 commit:

    • eefbee96 - Store installed app signature in cache
  • 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.

  • username-removed-22388 Status changed to merged

    Status changed to merged

  • Please register or sign in to reply
    Loading