mirror of https://github.com/M66B/FairEmail.git
Reschedule protocol disable
This commit is contained in:
parent
7505ed9125
commit
9e1bbd3697
|
@ -678,11 +678,15 @@ public class ServiceUI extends IntentService {
|
||||||
|
|
||||||
static void boot(Context context) {
|
static void boot(Context context) {
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||||
|
|
||||||
long banner_hidden = prefs.getLong("banner_hidden", 0);
|
long banner_hidden = prefs.getLong("banner_hidden", 0);
|
||||||
if (banner_hidden > 0) {
|
if (banner_hidden > 0) {
|
||||||
Log.i("Restore banner alarm at " + new Date(banner_hidden));
|
Log.i("Restore banner alarm at " + new Date(banner_hidden));
|
||||||
AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
|
AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
|
||||||
am.set(AlarmManager.RTC, banner_hidden, getBannerIntent(context));
|
am.set(AlarmManager.RTC, banner_hidden, getBannerIntent(context));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean protocol = prefs.getBoolean("protocol", false);
|
||||||
|
ServiceUI.scheduleProtocol(context, protocol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue