diff --git a/CHANGELOG.md b/CHANGELOG.md index edbbf8abe..790b0b3b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,10 +9,12 @@ beam the FDroid.apk from FDroid's main screen (Android 4.1+) * 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 +* Various fixes to layout issues introduced in 0.58 + ### 0.58 (2014-01-11) * Download icons with a resolution that matches the device's screen density, diff --git a/TODO-before-release.md b/TODO-before-release.md new file mode 100644 index 000000000..1a0d72a39 --- /dev/null +++ b/TODO-before-release.md @@ -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 diff --git a/extern/MemorizingTrustManager b/extern/MemorizingTrustManager index 49452f67a..a705441ac 160000 --- a/extern/MemorizingTrustManager +++ b/extern/MemorizingTrustManager @@ -1 +1 @@ -Subproject commit 49452f67a760dfef77ddaa7e0b7d88c713c4a195 +Subproject commit a705441ac53b9e1aba9f00f3f59aab81da6fbc9e diff --git a/src/org/fdroid/fdroid/UpdateService.java b/src/org/fdroid/fdroid/UpdateService.java index 4741aa51a..915da5e82 100644 --- a/src/org/fdroid/fdroid/UpdateService.java +++ b/src/org/fdroid/fdroid/UpdateService.java @@ -55,6 +55,20 @@ public class UpdateService extends IntentService implements ProgressListener { 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 // update in response to a user request. public static class UpdateReceiver extends ResultReceiver { @@ -304,8 +318,8 @@ public class UpdateService extends IntentService implements ProgressListener { if (success && changes && prefs.getBoolean(Preferences.PREF_UPD_NOTIFY, false)) { int updateCount = 0; for (App app : appsToUpdate.values()) { - if (app.hasUpdates(this)) { - updateCount ++; + if (app.canAndWantToUpdate(this)) { + updateCount++; } } @@ -644,6 +658,11 @@ public class UpdateService extends IntentService implements ProgressListener { private ContentProviderOperation updateExistingApp(App app) { Uri uri = AppProvider.getContentUri(app); 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(); } diff --git a/test/src/mock/MockContextSwappableComponents.java b/test/src/mock/MockContextSwappableComponents.java index 750adbed6..9cb09f466 100644 --- a/test/src/mock/MockContextSwappableComponents.java +++ b/test/src/mock/MockContextSwappableComponents.java @@ -38,6 +38,6 @@ public class MockContextSwappableComponents extends MockContext { @Override public MockContentResolver getContentResolver() { - return contentResolver; + return contentResolver; } } diff --git a/test/src/org/fdroid/fdroid/AppProviderTest.java b/test/src/org/fdroid/fdroid/AppProviderTest.java index ae10ffc34..9c1c696a0 100644 --- a/test/src/org/fdroid/fdroid/AppProviderTest.java +++ b/test/src/org/fdroid/fdroid/AppProviderTest.java @@ -126,13 +126,13 @@ public class AppProviderTest extends FDroidProviderTest { List categories = AppProvider.Helper.categories(getMockContext()); String[] expected = new String[] { - getMockContext().getResources().getString(R.string.category_whatsnew), - getMockContext().getResources().getString(R.string.category_recentlyupdated), - getMockContext().getResources().getString(R.string.category_all), - "Animal", - "Mineral", - "Vegetable" - }; + getMockContext().getResources().getString(R.string.category_whatsnew), + getMockContext().getResources().getString(R.string.category_recentlyupdated), + getMockContext().getResources().getString(R.string.category_all), + "Animal", + "Mineral", + "Vegetable" + }; TestUtils.assertContainsOnly(categories, expected); } diff --git a/test/src/org/fdroid/fdroid/FDroidProviderTest.java b/test/src/org/fdroid/fdroid/FDroidProviderTest.java index 1fe2e3c48..30f4f52e9 100644 --- a/test/src/org/fdroid/fdroid/FDroidProviderTest.java +++ b/test/src/org/fdroid/fdroid/FDroidProviderTest.java @@ -70,10 +70,10 @@ public abstract class FDroidProviderTest extends Provi protected void assertInvalidUri(Uri uri) { try { - // Use getProvdider instead of getContentResolver, because the mock - // content resolver wont result in the provider we are testing, and - // hence we don't get to see how our provider responds to invalid - // uris. + // Use getProvdider instead of getContentResolver, because the mock + // content resolver wont result in the provider we are testing, and + // hence we don't get to see how our provider responds to invalid + // uris. getProvider().query(uri, getMinimalProjection(), null, null, null); fail(); } catch (UnsupportedOperationException e) {}