Merge branch 'master' into 'master'
fix two bugs First bug is with lots of QR Code readers, they don't respect custom URI schemes like `fdroidrepo://` and just force all URIs to be `http://`. A slight tweak makes it possible to use a QRCode to configure a repo using all of the major ones I could find (I tested with 8 different apps). The second bug is a simple crasher bug.
This commit is contained in:
commit
d54dc0b7bb
@ -129,6 +129,12 @@
|
||||
<data android:pathPattern="/.*/.*/fdroid/archive/*" />
|
||||
<data android:pathPattern="/.*/.*/.*/fdroid/archive" />
|
||||
<data android:pathPattern="/.*/.*/.*/fdroid/archive/*" />
|
||||
<!--
|
||||
Some QR Code scanners don't respect custom schemes like fdroidrepo://,
|
||||
so this is a workaround, since the local repo URL is all uppercase in
|
||||
the QR Code for sending the local repo to another device.
|
||||
-->
|
||||
<data android:path="/FDROID/REPO" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
15
custom_rules.xml
Normal file
15
custom_rules.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="custom_rules" default="fetch-test-report">
|
||||
|
||||
<target name="fetch-test-report">
|
||||
<echo>Downloading XML test report…</echo>
|
||||
<mkdir dir="junitreports"/>
|
||||
<exec executable="${adb}" failonerror="true">
|
||||
<arg line="${adb.device.arg}"/>
|
||||
<arg value="pull" />
|
||||
<arg value="/data/data/${tested.manifest.package}/files/junit-report.xml" />
|
||||
<arg value="junitreports/junit-report.xml" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
</project>
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user