Minor fixes
This commit is contained in:
+5
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user