Do not call alarmManager.cancel with null intent
This commit is contained in:
parent
e925180201
commit
44e34dd946
1 changed files with 7 additions and 3 deletions
|
@ -196,9 +196,13 @@ public class NavigationService extends Service implements LocationListener {
|
|||
lock.release();
|
||||
}
|
||||
}
|
||||
// remove alarm
|
||||
AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
|
||||
alarmManager.cancel(pendingIntent);
|
||||
|
||||
if (pendingIntent != null) {
|
||||
// remove alarm
|
||||
AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
|
||||
alarmManager.cancel(pendingIntent);
|
||||
}
|
||||
|
||||
// remove notification
|
||||
stopForeground(Boolean.TRUE);
|
||||
app.runInUIThread(new Runnable() {
|
||||
|
|
Loading…
Reference in a new issue