Replace getNoteTag() with getNoteId(). Replace some stray hardcoded IDs with getNoteId()

This commit is contained in:
Phillip Hsu
2016-09-16 18:28:08 -07:00
parent e586c58c6b
commit ce1c56e979
4 changed files with 17 additions and 41 deletions
@@ -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());
}
}
}