Minor fixes

This commit is contained in:
2026-08-26 16:38:38 +02:00
parent 3f28e7b2bc
commit 4673bc2289
5 changed files with 184 additions and 148 deletions
@@ -403,7 +403,11 @@ public class ActivityDetectionReceiver extends IntentService implements Automati
private PendingIntent getActivityDetectionPendingIntent()
{
Intent intent = new Intent(AutomationService.getInstance(), ActivityDetectionReceiver.class);
PendingIntent returnValue = PendingIntent.getService(AutomationService.getInstance(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
PendingIntent returnValue;
if(Miscellaneous.getTargetSDK(AutomationService.getInstance()) >= 31)
returnValue = PendingIntent.getService(AutomationService.getInstance(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT|PendingIntent.FLAG_IMMUTABLE);
else
returnValue = PendingIntent.getService(AutomationService.getInstance(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
return returnValue;
}
}