Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,13 @@ private static void scheduleAlarm(
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && !manager.canScheduleExactAlarms()) {
Log.e(TAG, "Can`t schedule exact alarm due to revoked SCHEDULE_EXACT_ALARM permission");
} else {
PendingIntent showPendingIntent = createShowPendingIntent(context, requestCode, params);
PendingIntent showPendingIntent;
try {
showPendingIntent = createShowPendingIntent(context, requestCode, params);
} catch (NullPointerException ex) {
Log.e(TAG, "Can`t schedule exact alarm because pending intent could not be created.", ex);
return;
}
AlarmManagerCompat.setAlarmClock(
manager, startMillis,
showPendingIntent, pendingIntent);
Expand Down
Loading