Don't crash on unsupported barcode

This commit is contained in:
Sylvia van Os
2019-12-09 19:49:04 +01:00
parent 05d38a0184
commit e1f25ed092

View File

@@ -77,6 +77,12 @@ public class PkpassImporter {
if (barcodeType.equals("QR")) {
barcodeType = "QR_CODE";
}
if(!BarcodeSelectorActivity.SUPPORTED_BARCODE_TYPES.contains(barcodeType))
{
return null;
}
return new LoyaltyCard(-1, store, note, cardId, barcodeType, null, null);
}
}