Replace getNoteTag() with getNoteId(). Replace some stray hardcoded IDs with getNoteId()
This commit is contained in:
@@ -88,6 +88,11 @@ public class TimerNotificationService extends ChronometerNotificationService {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getNoteId() {
|
||||
return R.id.timer_notification_service;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
@@ -96,7 +101,7 @@ public class TimerNotificationService extends ChronometerNotificationService {
|
||||
// our thread has enough leeway to sneak in a final call to post the notification before it
|
||||
// is actually quit().
|
||||
// As such, try cancelling the notification with this (tag, id) pair again.
|
||||
cancelNotification(mTimer.getIntId());
|
||||
cancelNotification();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -158,7 +163,7 @@ public class TimerNotificationService extends ChronometerNotificationService {
|
||||
|
||||
quitCurrentThread();
|
||||
if (running) {
|
||||
startNewThread(timerId, SystemClock.elapsedRealtime() + mTimer.timeRemaining());
|
||||
startNewThread(SystemClock.elapsedRealtime() + mTimer.timeRemaining());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user