From 407e7662e959f736c992f921b7fd98fadbf10d6b Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 7 Apr 2014 21:07:01 -0400 Subject: [PATCH 1/3] support QR scanners that do not respect custom URI schemes Some QR Code scanners don't respect custom schemes like fdroidrepo://, so this is a workaround, since the local repo URI is all uppercase in the QR Code for sending the local repo to another device. This way, the QR Code can still be all uppercase and use HTTP:// and Android will still route it to FDroid, but via the Just Once/Always chooser (fdroidrepo:// goes directly to FDroid with no prompt, when it works) --- AndroidManifest.xml | 6 ++++++ .../fdroid/fdroid/views/fragments/RepoListFragment.java | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 4d3db9f80..cafacbd19 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -129,6 +129,12 @@ + + diff --git a/src/org/fdroid/fdroid/views/fragments/RepoListFragment.java b/src/org/fdroid/fdroid/views/fragments/RepoListFragment.java index c30f23397..fa43cb82b 100644 --- a/src/org/fdroid/fdroid/views/fragments/RepoListFragment.java +++ b/src/org/fdroid/fdroid/views/fragments/RepoListFragment.java @@ -208,6 +208,14 @@ public class RepoListFragment extends ListFragment * case means it should be downcased. */ uri = Uri.parse(uri.toString().toLowerCase(Locale.ENGLISH)); + } else if (uri.getPath().startsWith("/FDROID/REPO")) { + /* + * some QR scanners chop off the fdroidrepo:// and just try + * http://, then the incoming URI does not get downcased + * properly, and the query string is stripped off. So just + * downcase the path, and carry on to get something working. + */ + uri = Uri.parse(uri.toString().toLowerCase(Locale.ENGLISH)); } // make scheme and host lowercase so they're readable in dialogs scheme = scheme.toLowerCase(Locale.ENGLISH); From c1d0ec43c3e66a32cf71d95bcdfda79ee7ed585f Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 7 Apr 2014 21:39:50 -0400 Subject: [PATCH 2/3] fix crasher when hopping around apps and adding repos I triggered this a few times while trying various QR Code scanning apps with FDroid. fixes #3222 https://dev.guardianproject.info/issues/3222 --- src/org/fdroid/fdroid/FDroid.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/fdroid/fdroid/FDroid.java b/src/org/fdroid/fdroid/FDroid.java index 6576b8582..08b6e3609 100644 --- a/src/org/fdroid/fdroid/FDroid.java +++ b/src/org/fdroid/fdroid/FDroid.java @@ -257,7 +257,7 @@ public class FDroid extends FragmentActivity { case REQUEST_APPDETAILS: break; case REQUEST_MANAGEREPOS: - if (data.hasExtra(ManageRepo.REQUEST_UPDATE)) { + if (data != null && data.hasExtra(ManageRepo.REQUEST_UPDATE)) { AlertDialog.Builder ask_alrt = new AlertDialog.Builder(this); ask_alrt.setTitle(getString(R.string.repo_update_title)); ask_alrt.setIcon(android.R.drawable.ic_menu_rotate); From da329089fb563df146a409b1850bd89e1f772f0e Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 8 Apr 2014 00:16:03 -0400 Subject: [PATCH 3/3] add custom ant rules for downloading JUnit results --- custom_rules.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 custom_rules.xml diff --git a/custom_rules.xml b/custom_rules.xml new file mode 100644 index 000000000..8306b3fb5 --- /dev/null +++ b/custom_rules.xml @@ -0,0 +1,15 @@ + + + + + Downloading XML test report… + + + + + + + + + +