From fad6050c7afa306eca0b82863a2dded9301adb8b Mon Sep 17 00:00:00 2001 From: Jens Date: Tue, 23 Aug 2022 22:43:44 +0200 Subject: [PATCH] tethering type --- app/src/main/java/com/jens/automation2/Trigger.java | 7 ++++++- .../com/jens/automation2/receivers/TetheringReceiver.java | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/jens/automation2/Trigger.java b/app/src/main/java/com/jens/automation2/Trigger.java index e26ac1c3..d386d4f3 100644 --- a/app/src/main/java/com/jens/automation2/Trigger.java +++ b/app/src/main/java/com/jens/automation2/Trigger.java @@ -985,7 +985,12 @@ public class Trigger for(String oneOfLastTypes : TetheringReceiver.getLastTetheringTypes()) { if(oneOfLastTypes.equals(getTriggerParameter2())) - return true; + { + if(triggerParameter) + return true; + else + return false; + } } } diff --git a/app/src/main/java/com/jens/automation2/receivers/TetheringReceiver.java b/app/src/main/java/com/jens/automation2/receivers/TetheringReceiver.java index 3e7e4166..3e7ab5a1 100644 --- a/app/src/main/java/com/jens/automation2/receivers/TetheringReceiver.java +++ b/app/src/main/java/com/jens/automation2/receivers/TetheringReceiver.java @@ -74,7 +74,7 @@ public class TetheringReceiver extends android.content.BroadcastReceiver impleme lastTetheringTypes.add(ActivityManageTriggerTethering.tetheringTypeWifi); else if(adapterName.contains("bluetooth")) lastTetheringTypes.add(ActivityManageTriggerTethering.tetheringTypeBluetooth); - else if(adapterName.contains("usb")) + else if(adapterName.contains("rndis")) lastTetheringTypes.add(ActivityManageTriggerTethering.tetheringTypeUsb); else if(adapterName.contains("ndis")) lastTetheringTypes.add(ActivityManageTriggerTethering.tetheringTypeCable);