From b8f18a47555c318341cf7bc6e9547ce02d1b68b5 Mon Sep 17 00:00:00 2001 From: Federico Iosue Date: Sun, 12 Jan 2020 17:27:49 +0100 Subject: [PATCH] Avoid crash on boot for android < 8 Pull request https://github.com/federicoiosue/Omni-Notes/pull/722/commits/28a9015b101e3eaa939bbe8e001237450c574a33 --- omniNotes/src/main/AndroidManifest.xml | 1 + .../omninotes/async/AlarmRestoreOnRebootService.java | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/omniNotes/src/main/AndroidManifest.xml b/omniNotes/src/main/AndroidManifest.xml index b7ee0999a2..4978fc0c30 100644 --- a/omniNotes/src/main/AndroidManifest.xml +++ b/omniNotes/src/main/AndroidManifest.xml @@ -35,6 +35,7 @@ + = Build.VERSION_CODES.O) { + enqueueWork(context, AlarmRestoreOnRebootService.class, JOB_ID, work); + } else { + Intent jobIntent = new Intent(context, AlarmRestoreOnRebootService.class); + context.startService(jobIntent); + } } @Override