Merge branch 'master' into improvements/apk-tests

Conflicts:
	test/src/org/fdroid/fdroid/AppProviderTest.java
This commit is contained in:
Peter Serwylo 2014-02-19 09:38:40 +11:00
commit 5877af55ae
7 changed files with 48 additions and 16 deletions

View File

@ -9,10 +9,12 @@
beam the FDroid.apk from FDroid's main screen (Android 4.1+) beam the FDroid.apk from FDroid's main screen (Android 4.1+)
* Support for repositories using self-signed HTTPS certificates through * Support for repositories using self-signed HTTPS certificates through
Trust-on-first-use popup a Trust-on-first-use popup
* Support for TLS Subject-Public-Key-Identifier pinning * Support for TLS Subject-Public-Key-Identifier pinning
* Various fixes to layout issues introduced in 0.58
### 0.58 (2014-01-11) ### 0.58 (2014-01-11)
* Download icons with a resolution that matches the device's screen density, * Download icons with a resolution that matches the device's screen density,

11
TODO-before-release.md Normal file
View File

@ -0,0 +1,11 @@
These issues are a must-fix before the next stable release:
* Right after updating a repo, "Recently Updated" shows the apps correctly but
the new apks don't show up on App Details until the whole app is restarted
(or until the repos are wiped and re-downloaded)
Other minor issues:
* Make the bluetooth option prettier. Options:
- Move it into submenu (like "Share F-Droid" -> "Bluetooth/Mail/NFC/...")
- Remove ellipsis from menu option string

@ -1 +1 @@
Subproject commit 49452f67a760dfef77ddaa7e0b7d88c713c4a195 Subproject commit a705441ac53b9e1aba9f00f3f59aab81da6fbc9e

View File

@ -55,6 +55,20 @@ public class UpdateService extends IntentService implements ProgressListener {
super("UpdateService"); super("UpdateService");
} }
/**
* When an app already exists in the db, and we are updating it on the off chance that some
* values changed in the index, some fields should not be updated. Rather, they should be
* ignored, because they were explicitly set by the user, and hence can't be automatically
* overridden by the index.
*
* NOTE: In the future, these attributes will be moved to a join table, so that the app table
* is essentially completely transient, and can be nuked at any time.
*/
private static final String[] APP_FIELDS_TO_IGNORE = {
AppProvider.DataColumns.IGNORE_ALLUPDATES,
AppProvider.DataColumns.IGNORE_THISUPDATE
};
// For receiving results from the UpdateService when we've told it to // For receiving results from the UpdateService when we've told it to
// update in response to a user request. // update in response to a user request.
public static class UpdateReceiver extends ResultReceiver { public static class UpdateReceiver extends ResultReceiver {
@ -304,7 +318,7 @@ public class UpdateService extends IntentService implements ProgressListener {
if (success && changes && prefs.getBoolean(Preferences.PREF_UPD_NOTIFY, false)) { if (success && changes && prefs.getBoolean(Preferences.PREF_UPD_NOTIFY, false)) {
int updateCount = 0; int updateCount = 0;
for (App app : appsToUpdate.values()) { for (App app : appsToUpdate.values()) {
if (app.hasUpdates(this)) { if (app.canAndWantToUpdate(this)) {
updateCount++; updateCount++;
} }
} }
@ -644,6 +658,11 @@ public class UpdateService extends IntentService implements ProgressListener {
private ContentProviderOperation updateExistingApp(App app) { private ContentProviderOperation updateExistingApp(App app) {
Uri uri = AppProvider.getContentUri(app); Uri uri = AppProvider.getContentUri(app);
ContentValues values = app.toContentValues(); ContentValues values = app.toContentValues();
for (String toIgnore : APP_FIELDS_TO_IGNORE) {
if (values.containsKey(toIgnore)) {
values.remove(toIgnore);
}
}
return ContentProviderOperation.newUpdate(uri).withValues(values).build(); return ContentProviderOperation.newUpdate(uri).withValues(values).build();
} }