forked from jens/Automation
Merge remote-tracking branch 'origin/development-stable' into development
This commit is contained in:
commit
965bf55811
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -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:
|
||||||
|
@ -217,21 +217,24 @@ 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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user