Skip to content

Commit

Permalink
Merge pull request #3333 from NightscoutFoundation/TzachiLibreSecurit…
Browse files Browse the repository at this point in the history
…yException

Add SecurityException to IOException (needed for android 14).
  • Loading branch information
jamorham committed Feb 15, 2024
2 parents 6115ee2 + 72f03af commit 3b76f96
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/main/java/com/eveningoutpost/dexdrip/NFCReaderX.java
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ protected Tag doInBackground(Tag... params) {
try {
replyBlock = nfcvTag.transceive(diag);
break;
} catch (IOException e) {
} catch (IOException | SecurityException e) {
if ((System.currentTimeMillis() > time + 2000)) {
Log.e(TAG, "tag diagnostic read timeout");
JoH.static_toast_short(gs(R.string.nfc_diag_timeout));
Expand Down Expand Up @@ -644,7 +644,7 @@ protected Tag doInBackground(Tag... params) {
patchInfo = Arrays.copyOfRange(patchInfo, 1, patchInfo.length);
}
break;
} catch (IOException e) {
} catch (IOException | SecurityException e) {
if ((System.currentTimeMillis() > time_patch + 2000)) {
Log.e(TAG, "patchInfo tag read timeout");
JoH.static_toast_short(gs(R.string.nfc_read_timeout));
Expand Down Expand Up @@ -699,7 +699,7 @@ protected Tag doInBackground(Tag... params) {
try {
replyBlock = nfcvTag.transceive(cmd);
break;
} catch (IOException e) {
} catch (IOException | SecurityException e) {
if ((System.currentTimeMillis() > time + 2000)) {
Log.e(TAG, "tag read timeout");
JoH.static_toast_short(gs(R.string.nfc_read_timeout));
Expand Down Expand Up @@ -760,7 +760,7 @@ protected Tag doInBackground(Tag... params) {
Log.e(TAG, "sending command " + HexDump.toHexString(cmd));
oneBlock = nfcvTag.transceive(cmd);
break;
} catch (IOException e) {
} catch (IOException | SecurityException e) {
if ((System.currentTimeMillis() > time + 2000)) {
Log.e(TAG, "tag read timeout");
JoH.static_toast_short(gs(R.string.nfc_read_timeout));
Expand Down Expand Up @@ -790,7 +790,7 @@ protected Tag doInBackground(Tag... params) {
JoH.static_toast_short(gs(R.string.scanned_ok));
PersistentStore.setLongZeroIfSet("nfc-address-failures");

} catch (IOException e) {
} catch (IOException | SecurityException e) {
JoH.static_toast_short(gs(R.string.nfc_io_error));
vibrate(context, 3);
} catch (Exception e) {
Expand Down

0 comments on commit 3b76f96

Please sign in to comment.