mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-03 21:55:13 +00:00
Simplification
This commit is contained in:
parent
a29402895d
commit
6aaac2b5b8
1 changed files with 2 additions and 5 deletions
|
@ -24,10 +24,10 @@ import android.app.PendingIntent;
|
|||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.app.AlarmManagerCompat;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.room.ColumnInfo;
|
||||
import androidx.room.Entity;
|
||||
|
@ -462,10 +462,7 @@ public class EntityMessage implements Serializable {
|
|||
am.cancel(pi);
|
||||
} else {
|
||||
Log.i("Set snooze id=" + id + " wakeup=" + new Date(wakeup));
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M)
|
||||
am.set(AlarmManager.RTC_WAKEUP, wakeup, pi);
|
||||
else
|
||||
am.setAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, wakeup, pi);
|
||||
AlarmManagerCompat.setAndAllowWhileIdle(am, AlarmManager.RTC_WAKEUP, wakeup, pi);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue