diff --git a/Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Common.java b/Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Common.java index 6f4c63fd..14de3425 100644 --- a/Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Common.java +++ b/Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Common.java @@ -673,7 +673,7 @@ public static void enableNfcForegroundDispatch(Activity targetActivity) { mNfcAdapter.enableForegroundDispatch( targetActivity, pendingIntent, null, new String[][]{ new String[]{NfcA.class.getName()}}); - } catch (IllegalStateException ex) { + } catch (IllegalStateException | SecurityException ex) { Log.d(LOG_TAG, "Error: Could not enable the NFC foreground" + "dispatch system. The activity was not in foreground."); } @@ -864,7 +864,6 @@ public static boolean hasMifareClassicSupport() { } } - mHasMifareClassicSupport = 1; return true; }