Merge branch 'installed-apps' into 'master'
Refresh installed apps on a forced update See merge request fdroid/fdroidclient!751
This commit is contained in:
commit
71e87043a2
@ -48,6 +48,7 @@ import org.fdroid.fdroid.data.ApkProvider;
|
||||
import org.fdroid.fdroid.data.App;
|
||||
import org.fdroid.fdroid.data.AppProvider;
|
||||
import org.fdroid.fdroid.data.DBHelper;
|
||||
import org.fdroid.fdroid.data.InstalledAppProviderService;
|
||||
import org.fdroid.fdroid.data.Repo;
|
||||
import org.fdroid.fdroid.data.RepoProvider;
|
||||
import org.fdroid.fdroid.data.Schema;
|
||||
@ -430,6 +431,7 @@ public class UpdateService extends JobIntentService {
|
||||
Utils.debugLog(TAG, "manually requested or forced update");
|
||||
if (forcedUpdate) {
|
||||
DBHelper.resetTransient(this);
|
||||
InstalledAppProviderService.compareToPackageManager(this);
|
||||
}
|
||||
} else if (!fdroidPrefs.isBackgroundDownloadAllowed() && !fdroidPrefs.isOnDemandDownloadAllowed()) {
|
||||
Utils.debugLog(TAG, "don't run update");
|
||||
|
@ -1127,6 +1127,10 @@ public class DBHelper extends SQLiteOpenHelper {
|
||||
db.execSQL("DROP TABLE " + ApkAntiFeatureJoinTable.NAME);
|
||||
}
|
||||
|
||||
if (tableExists(db, InstalledAppTable.NAME)) {
|
||||
db.execSQL("DROP TABLE " + InstalledAppTable.NAME);
|
||||
}
|
||||
|
||||
db.execSQL("DROP TABLE " + AppMetadataTable.NAME);
|
||||
db.execSQL("DROP TABLE " + ApkTable.NAME);
|
||||
|
||||
@ -1137,6 +1141,7 @@ public class DBHelper extends SQLiteOpenHelper {
|
||||
db.execSQL(CREATE_TABLE_CAT_JOIN);
|
||||
db.execSQL(CREATE_TABLE_ANTI_FEATURE);
|
||||
db.execSQL(CREATE_TABLE_APK_ANTI_FEATURE_JOIN);
|
||||
db.execSQL(CREATE_TABLE_INSTALLED_APP);
|
||||
clearRepoEtags(db);
|
||||
ensureIndexes(db);
|
||||
db.setTransactionSuccessful();
|
||||
|
Loading…
x
Reference in New Issue
Block a user