Battery charging type differentiation and other fixes
This commit is contained in:
@ -192,6 +192,7 @@
|
||||
<activity android:name=".ActivityManageTriggerCheckVariable" />
|
||||
<activity android:name=".ActivityManageActionCopyToClipboard" />
|
||||
<activity android:name=".ActivityManageActionLocationService" />
|
||||
<activity android:name=".ActivityManageTriggerCharging" />
|
||||
|
||||
<activity
|
||||
android:name=".ActivityMainTabLayout"
|
||||
@ -233,6 +234,7 @@
|
||||
<activity android:name=".ActivityManageActionStartActivity" />
|
||||
<activity android:name=".ActivityManageTriggerNfc" />
|
||||
<activity android:name=".ActivityManageActionSpeakText" />
|
||||
<activity android:name=".ActivityManageActionPlaySound" />
|
||||
<activity android:name=".ActivityManageTriggerBluetooth" />
|
||||
<activity android:name=".ActivityMainProfiles" />
|
||||
<activity android:name=".ActivityManageProfile" />
|
||||
@ -241,7 +243,6 @@
|
||||
<activity android:name=".ActivityPermissions"></activity>
|
||||
<activity android:name=".ActivityManageTriggerNotification" />
|
||||
<activity android:name=".ActivityManageTriggerCalendar" />
|
||||
<activity android:name=".ActivityManageTriggerCharging" />
|
||||
|
||||
<service
|
||||
android:name=".receivers.NotificationListener"
|
||||
|
@ -16,7 +16,6 @@ import com.google.android.gms.location.DetectedActivity;
|
||||
import com.jens.automation2.receivers.ActivityDetectionReceiver;
|
||||
import com.jens.automation2.receivers.BroadcastListener;
|
||||
import com.jens.automation2.receivers.CalendarReceiver;
|
||||
import com.jens.automation2.receivers.NotificationListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
@ -380,11 +379,6 @@ public class Rule implements Comparable<Rule>
|
||||
Miscellaneous.logEvent("i", "getsGreenLight()", "Rule \"" + getName() + "\" applies and has flipped since its last execution.", 4);
|
||||
return true;
|
||||
}
|
||||
// else if(hasTriggerOfType(Trigger.Trigger_Enum.notification) && NotificationListener.mayRuleStillBeActivatedForPendingNotifications(this))
|
||||
// {
|
||||
// Miscellaneous.logEvent("i", "getsGreenLight()", "Rule \"" + getName() + "\" applies, has not flipped since its last execution, but may still be executed for other notifications.", 4);
|
||||
// return true;
|
||||
// }
|
||||
else if(hasTriggerOfType(Trigger.Trigger_Enum.calendarEvent) && CalendarReceiver.mayRuleStillBeActivatedForPendingCalendarEvents(this))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "getsGreenLight()", "Rule \"" + getName() + "\" applies, has not flipped since its last execution, but may still be executed for other calendar events.", 4);
|
||||
@ -871,4 +865,17 @@ public class Rule implements Comparable<Rule>
|
||||
|
||||
return amount;
|
||||
}
|
||||
|
||||
public static int getAmountOfActivatedRules()
|
||||
{
|
||||
int amount = 0;
|
||||
|
||||
for(Rule r : Rule.getRuleCollection())
|
||||
{
|
||||
if(r.isRuleActive())
|
||||
amount++;
|
||||
}
|
||||
|
||||
return amount;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user