mirror of
https://github.com/CatimaLoyalty/Android.git
synced 2026-09-16 00:08:59 -04:00
Fix crash risk on pkpass encoding
This commit is contained in:
1 parent
442c7c28d4
commit
d5b3796ae9
1 file changed
+5
-1
@@ -354,7 +354,11 @@ class PkpassParser(context: Context, uri: Uri?) {
|
||||
barcodeId = null
|
||||
}
|
||||
|
||||
barcodeEncoding = Charset.forName(barcodeInfo.getString("messageEncoding"))
|
||||
try {
|
||||
barcodeEncoding = Charset.forName(barcodeInfo.getString("messageEncoding"))
|
||||
} catch (ignored: Exception) {
|
||||
// If encoding is not defined, null or otherwise invalid, stick to the default
|
||||
}
|
||||
|
||||
// Don't set barcodeId if it's the same as cardId
|
||||
if (cardId == barcodeId) {
|
||||
|
||||
Reference in new issue
Block a user