Merge branch 'fix-721--qrcode-generation' into 'master'
Don't upper case QR code that has a URL. See comment in #721 or this commit for explanation. Fixes #721. See merge request !358
This commit is contained in:
commit
dd9b1fc613
@ -38,8 +38,6 @@ import org.fdroid.fdroid.data.Repo;
|
||||
import org.fdroid.fdroid.data.RepoProvider;
|
||||
import org.fdroid.fdroid.data.Schema.RepoTable;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class RepoDetailsActivity extends ActionBarActivity {
|
||||
private static final String TAG = "RepoDetailsActivity";
|
||||
|
||||
@ -112,7 +110,7 @@ public class RepoDetailsActivity extends ActionBarActivity {
|
||||
|
||||
Uri uri = Uri.parse(repo.address);
|
||||
uri = uri.buildUpon().appendQueryParameter("fingerprint", repo.fingerprint).build();
|
||||
String qrUriString = uri.toString().toUpperCase(Locale.ENGLISH);
|
||||
String qrUriString = uri.toString();
|
||||
new QrGenAsyncTask(this, R.id.qr_code).execute(qrUriString);
|
||||
}
|
||||
|
||||
|
@ -132,19 +132,12 @@ public class WifiQrView extends ScrollView implements SwapWorkflowActivity.Inner
|
||||
TextView ipAddressView = (TextView) findViewById(R.id.device_ip_address);
|
||||
ipAddressView.setText(buttonLabel);
|
||||
|
||||
/*
|
||||
* Set URL to UPPER for compact QR Code, FDroid will translate it back.
|
||||
* Remove the SSID from the query string since SSIDs are case-sensitive.
|
||||
* Instead the receiver will have to rely on the BSSID to find the right
|
||||
* wifi AP to join. Lots of QR Scanners are buggy and do not respect
|
||||
* custom URI schemes, so we have to use http:// or https:// :-(
|
||||
*/
|
||||
Uri sharingUri = Utils.getSharingUri(FDroidApp.repo);
|
||||
String qrUriString = (scheme + sharingUri.getHost()).toUpperCase(Locale.ENGLISH);
|
||||
String qrUriString = scheme + sharingUri.getHost();
|
||||
if (sharingUri.getPort() != 80) {
|
||||
qrUriString += ":" + sharingUri.getPort();
|
||||
}
|
||||
qrUriString += sharingUri.getPath().toUpperCase(Locale.ENGLISH);
|
||||
qrUriString += sharingUri.getPath();
|
||||
boolean first = true;
|
||||
|
||||
// Andorid provides an API for getting the query parameters and iterating over them:
|
||||
|
Loading…
x
Reference in New Issue
Block a user