mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-06-18 12:49:59 -04:00
InstalledAppProviderService to replace InstalledAppCacheUpdater
InstalledAppCacheUpdater was a custom Service-like thing with some threading issues. InstalledAppProviderService is an IntentService that relies on the built-in queue and threading of the IntentService to make sure that things are processed nicely in the background and one at a time. This changes the announcing so that each app added/changed/deleted triggers a new annoucement. This keeps the UI more updated, and makes the Installed tab show something as soon as possible, rather than waiting for the all of the install apps to be processed. This becomes more important as more stuff is added to InstalledAppProvider, like the hash of the APK. This also strips down and simplifies the related BroadcastReceivers. BroadcastReceivers work on the UI thread, so they should do as little work as possible. PackageManagerReceiver just rebadges the incoming Intent and sends it off to InstalledAppProviderService for processing.
This commit is contained in:
@@ -98,6 +98,11 @@ public abstract class ProviderTestCase2MockContext<T extends ContentProvider> ex
|
||||
public Context getApplicationContext() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPackageName() {
|
||||
return "org.fdroid.fdroid";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user