Skip to content

Commit

Permalink
Merge pull request #669 from vishaljak/fix/out-of-date-tag
Browse files Browse the repository at this point in the history
catch security exception on out of date tags
  • Loading branch information
whitedogg13 authored Nov 15, 2023
2 parents 323ef47 + 65f9909 commit 34780ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion android/src/main/java/community/revteltech/nfc/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ static JSONObject ndefToJSON(Ndef ndef) {
json.put("canMakeReadOnly", ndef.canMakeReadOnly());
} catch (NullPointerException e) {
json.put("canMakeReadOnly", JSONObject.NULL);
}
} catch (SecurityException e) {
Log.e(TAG, "Failed due to out of date tag", e);
json.put("canMakeReadOnly", JSONObject.NULL)
}
} catch (JSONException e) {
Log.e(TAG, "Failed to convert ndef into json: " + ndef, e);
}
Expand Down

0 comments on commit 34780ea

Please sign in to comment.