Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4500d348 authored by Gitsaibot's avatar Gitsaibot Committed by Jochen Sprickerhof
Browse files

Only use setExactAndAllowWhileIdle for devices with API23+. Fix #155

parent 09ddb3a6
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -82,7 +82,11 @@ public class AlertUtils {
        return new AlarmManagerInterface() {
            @Override
            public void set(int type, long triggerAtMillis, PendingIntent operation) {
                if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
                    mgr.setExactAndAllowWhileIdle(type, triggerAtMillis, operation);
                } else {
                    mgr.setExact(type, triggerAtMillis, operation);
                }
            }
        };
    }