This commit is contained in:
jens 2022-03-05 20:59:16 +01:00
parent 4c9e61618b
commit 217f459833
4 changed files with 20 additions and 38 deletions

View File

@ -312,19 +312,12 @@ public class Rule implements Comparable<Rule>
switch(action.getAction()) switch(action.getAction())
{ {
case setAirplaneMode: case setAirplaneMode:
return true;
case setBluetooth: case setBluetooth:
return true;
case setDataConnection: case setDataConnection:
return true;
case setDisplayRotation: case setDisplayRotation:
return true;
case setUsbTethering: case setUsbTethering:
return true;
case setWifi: case setWifi:
return true;
case setWifiTethering: case setWifiTethering:
return true;
case setBluetoothTethering: case setBluetoothTethering:
return true; return true;
default: default:

View File

@ -309,19 +309,12 @@ public class Rule implements Comparable<Rule>
switch(action.getAction()) switch(action.getAction())
{ {
case setAirplaneMode: case setAirplaneMode:
return true;
case setBluetooth: case setBluetooth:
return true;
case setDataConnection: case setDataConnection:
return true;
case setDisplayRotation: case setDisplayRotation:
return true;
case setUsbTethering: case setUsbTethering:
return true;
case setWifi: case setWifi:
return true;
case setWifiTethering: case setWifiTethering:
return true;
case setBluetoothTethering: case setBluetoothTethering:
return true; return true;
default: default:

View File

@ -312,19 +312,12 @@ public class Rule implements Comparable<Rule>
switch(action.getAction()) switch(action.getAction())
{ {
case setAirplaneMode: case setAirplaneMode:
return true;
case setBluetooth: case setBluetooth:
return true;
case setDataConnection: case setDataConnection:
return true;
case setDisplayRotation: case setDisplayRotation:
return true;
case setUsbTethering: case setUsbTethering:
return true;
case setWifi: case setWifi:
return true;
case setWifiTethering: case setWifiTethering:
return true;
case setBluetoothTethering: case setBluetoothTethering:
return true; return true;
default: default:

View File

@ -216,23 +216,26 @@ public class NfcReceiver
} }
NdefMessage ndefMessage = ndef.getCachedNdefMessage(); NdefMessage ndefMessage = ndef.getCachedNdefMessage();
NdefRecord[] records = ndefMessage.getRecords(); if(ndefMessage != null)
for (NdefRecord ndefRecord : records) {
{ NdefRecord[] records = ndefMessage.getRecords();
if (ndefRecord.getTnf() == NdefRecord.TNF_WELL_KNOWN && Arrays.equals(ndefRecord.getType(), NdefRecord.RTD_TEXT)) for (NdefRecord ndefRecord : records)
{ {
try if (ndefRecord.getTnf() == NdefRecord.TNF_WELL_KNOWN && Arrays.equals(ndefRecord.getType(), NdefRecord.RTD_TEXT))
{ {
return readText(ndefRecord); try
} {
catch (UnsupportedEncodingException e) return readText(ndefRecord);
{ }
Miscellaneous.logEvent("w", "NFC", "Unsupported Encoding: " + Log.getStackTraceString(e), 3); catch (UnsupportedEncodingException e)
} {
} Miscellaneous.logEvent("w", "NFC", "Unsupported Encoding: " + Log.getStackTraceString(e), 3);
} }
}
}
}
return null; return null;
} }