Integrate QR Code library instead of requiring the app to be installed, also due to security reasons
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user