From 1c90b6eca3c62b5b24a5971efdbf1e125da19d4e Mon Sep 17 00:00:00 2001 From: Viktor De Pasquale Date: Sat, 25 May 2019 16:33:55 +0200 Subject: [PATCH] Fixed notification popping up every time update is scheduled --- app/src/main/java/com/topjohnwu/magisk/utils/Utils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/topjohnwu/magisk/utils/Utils.java b/app/src/main/java/com/topjohnwu/magisk/utils/Utils.java index cc7d9f068..ffb730240 100644 --- a/app/src/main/java/com/topjohnwu/magisk/utils/Utils.java +++ b/app/src/main/java/com/topjohnwu/magisk/utils/Utils.java @@ -116,6 +116,8 @@ public class Utils { if (Config.get(Config.Key.CHECK_UPDATES)) { Constraints constraints = new Constraints.Builder() .setRequiredNetworkType(NetworkType.CONNECTED) + //ensures that notification doesn't pop up every time user starts the app + .setRequiresDeviceIdle(true) .build(); Class service = (Class) ClassMap.get(UpdateCheckService.class); PeriodicWorkRequest request = new PeriodicWorkRequest