Integrate QR Code library instead of requiring the app to be installed, also due to security reasons

This commit is contained in:
Dominik Schürmann committed 2015-01-14 19:14:30 +01:00
1 parent 9b093c6d73
commit 85b6669625
5 files changed
+17 -6

No files matched your search

@@ -78,7 +78,11 @@ public class QrCodeScanActivity extends FragmentActivity {
// scan using xzing's Barcode Scanner and return result parcel in OpenKeychain
returnResult = true;
new IntentIntegrator(this).initiateScan();
IntentIntegrator integrator = new IntentIntegrator(this);
integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE_TYPES)
.setPrompt(getString(R.string.import_qr_code_text))
.setResultDisplayDuration(0)
.initiateScan();
} else if (ACTION_QR_CODE_API.equals(action)) {
// scan using xzing's Barcode Scanner from outside OpenKeychain
@@ -168,7 +172,7 @@ public class QrCodeScanActivity extends FragmentActivity {
return;
}
if ( ! result.success()) {
if (!result.success()) {
// only return if no success...
Intent data = new Intent();
data.putExtras(returnData);