Fixed bug in broadcast receiver trigger

This commit is contained in:
Jens 2023-12-06 23:44:40 +01:00
parent 9ead47bdf7
commit 3c8c0f14f2
2 changed files with 8 additions and 3 deletions

View File

@ -52,10 +52,14 @@ public class BroadcastListener extends android.content.BroadcastReceiver impleme
{ {
broadcastsCollection.add(new EventOccurrence(Calendar.getInstance(), intent.getAction())); broadcastsCollection.add(new EventOccurrence(Calendar.getInstance(), intent.getAction()));
Miscellaneous.logEvent("i", "Broadcast received", "Broadcast " + intent.getAction() + " received.", 4);
if(intent.getExtras() != null && intent.getExtras().size() > 0)
{
for (String key : intent.getExtras().keySet()) for (String key : intent.getExtras().keySet())
{ {
Miscellaneous.logEvent("i", "Broadcast extra", "Broadcast " + intent.getAction() + " has extra " + key + " and type " + intent.getExtras().get(key).getClass().getName(), 4); Miscellaneous.logEvent("i", "Broadcast extra", "Broadcast " + intent.getAction() + " has extra " + key + " and type " + intent.getExtras().get(key).getClass().getName(), 4);
} }
}
ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.broadcastReceived); ArrayList<Rule> ruleCandidates = Rule.findRuleCandidates(Trigger.Trigger_Enum.broadcastReceived);
for(int i=0; i<ruleCandidates.size(); i++) for(int i=0; i<ruleCandidates.size(); i++)

View File

@ -1 +1,2 @@
* Fixed: Overlay permission for start other program action only required if startByActivity() is selected * Fixed: Overlay permission for start other program action only required if startByActivity() is selected
* Fixed: Broadcast receiver trigger would not trigger anything, but crash