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