|
|
|
@ -37,9 +37,7 @@ public class AlarmManager {
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressLint("NewApi")
|
|
|
|
@SuppressLint("NewApi")
|
|
|
|
public void noWakeup(long time, PendingIntent pendingIntent) {
|
|
|
|
public void noWakeup(long time, PendingIntent pendingIntent) {
|
|
|
|
if (atLeastMarshmallow()) {
|
|
|
|
if (atLeastKitKat()) {
|
|
|
|
alarmManager.setExactAndAllowWhileIdle(android.app.AlarmManager.RTC, time, pendingIntent);
|
|
|
|
|
|
|
|
} else if (atLeastKitKat()) {
|
|
|
|
|
|
|
|
alarmManager.setExact(android.app.AlarmManager.RTC, time, pendingIntent);
|
|
|
|
alarmManager.setExact(android.app.AlarmManager.RTC, time, pendingIntent);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
alarmManager.set(android.app.AlarmManager.RTC, time, pendingIntent);
|
|
|
|
alarmManager.set(android.app.AlarmManager.RTC, time, pendingIntent);
|
|
|
|
|