mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-22 16:01:37 -04:00
This means that we no longer need to receive an APK_URL and then directly ask the status manager for the relevant status object. This causes problems when consecutive updates happen in the same event loop, e.g. download started + download complete. In this case, the receiver will receive two events for the same app. When it asks for the associated status object for the first (download started) event, it will receive a status that says "download complete ready to install". This is because the status object has already been updated by the second event. Furthermore, the broadcast manager must receive a copy of the status object, not the original object. This is because the broadcast manager doesn't parcel the relevant extras until the end of the event loop. This means that if the status is changed twice in one frame, then both parcels will end up looking the same. By sending through a copy instead, this ensures that any listener receives the statuses in the correct order, rather than two parceled versions of the same status notification.