From fa08a8cfa44bcc6293b3482e3ced97c21225548f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sat, 4 Jan 2014 01:04:40 +0100 Subject: [PATCH 1/8] Get rid of unused TargetApis --- src/org/fdroid/fdroid/DB.java | 1 - src/org/fdroid/fdroid/FDroid.java | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/org/fdroid/fdroid/DB.java b/src/org/fdroid/fdroid/DB.java index 158d5ea4f..b7d30699a 100644 --- a/src/org/fdroid/fdroid/DB.java +++ b/src/org/fdroid/fdroid/DB.java @@ -34,7 +34,6 @@ import java.util.List; import java.util.Map; import java.util.concurrent.Semaphore; -import android.annotation.TargetApi; import android.content.ContentValues; import android.content.Context; import android.content.SharedPreferences; diff --git a/src/org/fdroid/fdroid/FDroid.java b/src/org/fdroid/fdroid/FDroid.java index e9c2ae038..9168b43df 100644 --- a/src/org/fdroid/fdroid/FDroid.java +++ b/src/org/fdroid/fdroid/FDroid.java @@ -23,7 +23,6 @@ import android.content.*; import android.content.res.Configuration; import android.support.v4.view.MenuItemCompat; -import android.annotation.TargetApi; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.NotificationManager; @@ -228,7 +227,6 @@ public class FDroid extends FragmentActivity { return super.onOptionsItemSelected(item); } - @TargetApi(5) @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { From 3b5e8833974a793a0005a0d3076acc05e109b777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sat, 4 Jan 2014 01:09:33 +0100 Subject: [PATCH 2/8] Translation string format inconsistencies should not be caught in java They should not exist at all, i.e. our translatebot should not allow them in (they break things in other places, not just here) --- src/org/fdroid/fdroid/SearchResults.java | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/org/fdroid/fdroid/SearchResults.java b/src/org/fdroid/fdroid/SearchResults.java index 1a3ac216b..0ee545c98 100644 --- a/src/org/fdroid/fdroid/SearchResults.java +++ b/src/org/fdroid/fdroid/SearchResults.java @@ -118,18 +118,15 @@ public class SearchResults extends ListActivity { TextView tv = (TextView) findViewById(R.id.description); String headertext; - try { - if (apps.size() == 0) - headertext = String.format(getString(R.string.searchres_noapps), - mQuery); - else if (apps.size() == 1) - headertext = String.format(getString(R.string.searchres_oneapp), - mQuery); - else - headertext = String.format(getString(R.string.searchres_napps), - apps.size(), mQuery); - } catch(Exception ex) { - headertext = "TRANSLATION ERROR!"; + if (apps.size() == 0) { + headertext = String.format(getString(R.string.searchres_noapps), + mQuery); + } else if (apps.size() == 1) { + headertext = String.format(getString(R.string.searchres_oneapp), + mQuery); + } else { + headertext = String.format(getString(R.string.searchres_napps), + apps.size(), mQuery); } tv.setText(headertext); Log.d("FDroid", "Search for '" + mQuery + "' returned " + apps.size() From c6e9002f2c743c6533e18db43276d2c42c29cf98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sat, 4 Jan 2014 01:21:56 +0100 Subject: [PATCH 3/8] Use a literal string for versionName in AM.xml It's handier to have just the one resource version_name, but lint gets very angry at this (and there must be a reason for that). We must not forget to update the resource in res/values/no_trans.xml, since it's still used in the code. --- AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 455dc98d8..cb3f891f4 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -3,7 +3,7 @@ package="org.fdroid.fdroid" android:installLocation="auto" android:versionCode="560" - android:versionName="@string/version_name" > + android:versionName="0.56-test" > Date: Sat, 4 Jan 2014 01:25:45 +0100 Subject: [PATCH 4/8] Specify what version_name means in the index.jar address --- src/org/fdroid/fdroid/RepoXMLHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/fdroid/fdroid/RepoXMLHandler.java b/src/org/fdroid/fdroid/RepoXMLHandler.java index f12d004ea..e5320ced9 100644 --- a/src/org/fdroid/fdroid/RepoXMLHandler.java +++ b/src/org/fdroid/fdroid/RepoXMLHandler.java @@ -369,7 +369,7 @@ public class RepoXMLHandler extends DefaultHandler { // check the signature, and extract the index... Log.d("FDroid", "Getting signed index from " + repo.address + " at " + logDateFormat.format(new Date(System.currentTimeMillis()))); - String address = repo.address + "/index.jar?" + String address = repo.address + "/index.jar?client_version=" + ctx.getString(R.string.version_name); Bundle progressData = createProgressData(repo.address); ProgressListener.Event event = new ProgressListener.Event( From 9b88a14566f8863948f098b05158692d29a1d9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sat, 4 Jan 2014 01:48:21 +0100 Subject: [PATCH 5/8] Be more specific in .gitignore --- .gitignore | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 4b35a9282..4f54aeced 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,11 @@ /local.properties -.classpath +/.classpath /bin/ /gen/ -/build -/.gradle +/build/ +/.gradle/ /build.xml *~ -.idea -*.iml +/.idea/ +/*.iml out From c262a8dd5258384ce7cc0f1cdd4d9b2738275e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sat, 4 Jan 2014 01:48:42 +0100 Subject: [PATCH 6/8] Preliminar changelog entry for the next stable release --- CHANGELOG.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d52985672..760fe9829 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,36 @@ +### Upcoming release + +* Tweaked some layouts, especially the app lists and their compact layout + +* App lists now show more useful version information: current version names, + rather than number of versions available + +* Reduce scroll lag in app lists by caching views in a ViewHolder + +* Slightly increase performance in repo index XML handling by mapping apps + with a HashMap, as opposed to doing linear searches + +* More info on App Details: The category in which the app was found, all the + categories the app is in and the Android version required to run each one of + its versions available. + +* The preferences screen now uses descriptive summaries, which means that you + can see what the checkbox preferences actually mean and what the edit and + list preferences are set at. + +* Support for dogecoin donation method added (wow) + +* Don't keep app icons older than 30 days on disc cache + +* Always include incompatible apks in memory to avoid issues with apps + seemingly not having any apks available + +* Fixed a crash when trying to access a non-existing app + +* Other minor bug fixes + +* Lots of translation updates + ### 0.55 (2013-11-11) * Fixed problems with category selection and permission lists on Android 2.X devices. @@ -7,35 +40,57 @@ * New options on the App Details screen to ignore all future updates for that particular app, or ignore just the current update. + * Apps with Anti-features are no longer hidden, and the corresponding preferences to unhide them are removed. Instead they are clearly marked on the App Details screen. + * Apps with incompatible native code architecture requirements are now correctly filtered. + * A bug that prevented update notifications from appearing has been fixed. + * Theming support, with Light and Dark themes. + * New launcher and notification icons, and new default/loading app icon. Icons are now retrieved dynamically, drastically improving startup time on first installation. + * All app donation options have been grouped into a submenu, and Litecoin donation support has been added. + * App filter settings now take effect immediately. + * Apk native code ABIs are now shown in expert mode. + * Search uris for market://search and fdroid.search: are now handled. + * A problem with ActionBar Up navigation on some devices has been fixed. + * Other minor bug fixes, and adjustments to spacings and layouts. + * Lots of translation updates. ### 0.50 (2013-08-20) * New basic app sharing functionality + * Handle f-droid.org web repo as well as market:// app uris + * Search by just typing on main screen and search results screen + * Flattr and Bitcoin donation methods added + * Noticeable speedups when returning from installs and uninstalls + * Add back to home buttons to the ActionBar + * Don't recommend versions newer than the current or incompatible with the device + * Use standard Android cache locations rather than .fdroid on the SD card + * Fix for crash at boot time where the SD card was slow to initialise + * Lots of bug fixes + * Lots of translation updates From 1bed5ff87cddef51285bc5ae566964859e2ac777 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Mon, 6 Jan 2014 11:17:25 +1100 Subject: [PATCH 7/8] Removed update repo from AB. Fix for new installs with repo version. --- src/org/fdroid/fdroid/DB.java | 1 + src/org/fdroid/fdroid/FDroid.java | 5 +--- tests/client-test.iml | 45 +++++++++++++++++++++++++++++++ tests/client-tests.iml | 45 +++++++++++++++++++++++++++++++ tests/local.properties | 10 +++++++ tests/proguard-project.txt | 20 ++++++++++++++ tests/project.properties | 14 ++++++++++ 7 files changed, 136 insertions(+), 4 deletions(-) create mode 100644 tests/client-test.iml create mode 100644 tests/client-tests.iml create mode 100644 tests/local.properties create mode 100644 tests/proguard-project.txt create mode 100644 tests/project.properties diff --git a/src/org/fdroid/fdroid/DB.java b/src/org/fdroid/fdroid/DB.java index b7d30699a..4485ef21b 100644 --- a/src/org/fdroid/fdroid/DB.java +++ b/src/org/fdroid/fdroid/DB.java @@ -422,6 +422,7 @@ public class DB { + "name text, description text, inuse integer not null, " + "priority integer not null, pubkey text, fingerprint text, " + "maxage integer not null default 0, " + + "version integer not null default 0, " + "lastetag text);"; public static class Repo { diff --git a/src/org/fdroid/fdroid/FDroid.java b/src/org/fdroid/fdroid/FDroid.java index 9168b43df..b23f0408d 100644 --- a/src/org/fdroid/fdroid/FDroid.java +++ b/src/org/fdroid/fdroid/FDroid.java @@ -131,11 +131,8 @@ public class FDroid extends FragmentActivity { public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); - MenuItem update = menu.add(Menu.NONE, UPDATE_REPO, 1, R.string.menu_update_repo).setIcon( + menu.add(Menu.NONE, UPDATE_REPO, 1, R.string.menu_update_repo).setIcon( android.R.drawable.ic_menu_rotate); - MenuItemCompat.setShowAsAction(update, - MenuItemCompat.SHOW_AS_ACTION_ALWAYS | - MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT); menu.add(Menu.NONE, MANAGE_REPO, 2, R.string.menu_manage).setIcon( android.R.drawable.ic_menu_agenda); MenuItem search = menu.add(Menu.NONE, SEARCH, 3, R.string.menu_search).setIcon( diff --git a/tests/client-test.iml b/tests/client-test.iml new file mode 100644 index 000000000..6b1deb490 --- /dev/null +++ b/tests/client-test.iml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/tests/client-tests.iml b/tests/client-tests.iml new file mode 100644 index 000000000..a39a8b717 --- /dev/null +++ b/tests/client-tests.iml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/tests/local.properties b/tests/local.properties new file mode 100644 index 000000000..de3ec375b --- /dev/null +++ b/tests/local.properties @@ -0,0 +1,10 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. + +# location of the SDK. This is only used by Ant +# For customization when using a Version Control System, please read the +# header note. +sdk.dir=/home/pete/apps/android diff --git a/tests/proguard-project.txt b/tests/proguard-project.txt new file mode 100644 index 000000000..f2fe1559a --- /dev/null +++ b/tests/proguard-project.txt @@ -0,0 +1,20 @@ +# To enable ProGuard in your project, edit project.properties +# to define the proguard.config property as described in that file. +# +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${sdk.dir}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the ProGuard +# include property in project.properties. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} diff --git a/tests/project.properties b/tests/project.properties new file mode 100644 index 000000000..a3ee5ab64 --- /dev/null +++ b/tests/project.properties @@ -0,0 +1,14 @@ +# This file is automatically generated by Android Tools. +# Do not modify this file -- YOUR CHANGES WILL BE ERASED! +# +# This file must be checked in Version Control Systems. +# +# To customize properties used by the Ant build system edit +# "ant.properties", and override values to adapt the script to your +# project structure. +# +# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): +#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt + +# Project target. +target=android-17 From a6379a80063bcb3cb419d806ec09f0cf09d130d5 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Mon, 6 Jan 2014 11:45:16 +1100 Subject: [PATCH 8/8] Oops, removed files accidentally added with 'git add .' --- tests/client-test.iml | 45 -------------------------------------- tests/client-tests.iml | 45 -------------------------------------- tests/local.properties | 10 --------- tests/proguard-project.txt | 20 ----------------- tests/project.properties | 14 ------------ 5 files changed, 134 deletions(-) delete mode 100644 tests/client-test.iml delete mode 100644 tests/client-tests.iml delete mode 100644 tests/local.properties delete mode 100644 tests/proguard-project.txt delete mode 100644 tests/project.properties diff --git a/tests/client-test.iml b/tests/client-test.iml deleted file mode 100644 index 6b1deb490..000000000 --- a/tests/client-test.iml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/tests/client-tests.iml b/tests/client-tests.iml deleted file mode 100644 index a39a8b717..000000000 --- a/tests/client-tests.iml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/tests/local.properties b/tests/local.properties deleted file mode 100644 index de3ec375b..000000000 --- a/tests/local.properties +++ /dev/null @@ -1,10 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must *NOT* be checked into Version Control Systems, -# as it contains information specific to your local configuration. - -# location of the SDK. This is only used by Ant -# For customization when using a Version Control System, please read the -# header note. -sdk.dir=/home/pete/apps/android diff --git a/tests/proguard-project.txt b/tests/proguard-project.txt deleted file mode 100644 index f2fe1559a..000000000 --- a/tests/proguard-project.txt +++ /dev/null @@ -1,20 +0,0 @@ -# To enable ProGuard in your project, edit project.properties -# to define the proguard.config property as described in that file. -# -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the ProGuard -# include property in project.properties. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/tests/project.properties b/tests/project.properties deleted file mode 100644 index a3ee5ab64..000000000 --- a/tests/project.properties +++ /dev/null @@ -1,14 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-17