From 02fbee2f7ba4e0469de1e7e8098e001a3111d4ab Mon Sep 17 00:00:00 2001 From: Phillip Hsu Date: Sat, 10 Sep 2016 02:36:37 -0700 Subject: [PATCH] Added todo --- .../philliphsu/clock2/timers/TimerNotificationService.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/com/philliphsu/clock2/timers/TimerNotificationService.java b/app/src/main/java/com/philliphsu/clock2/timers/TimerNotificationService.java index 9d4c16e..1c200b0 100644 --- a/app/src/main/java/com/philliphsu/clock2/timers/TimerNotificationService.java +++ b/app/src/main/java/com/philliphsu/clock2/timers/TimerNotificationService.java @@ -66,6 +66,13 @@ public class TimerNotificationService extends Service { context.getSystemService(Context.NOTIFICATION_SERVICE); nm.cancel(TAG, (int) timerId); context.stopService(new Intent(context, TimerNotificationService.class)); + // After being cancelled due to time being up, sometimes the active timer notification posts again + // with a static 00:00 text, along with the Time's up notification. My theory is + // our thread has enough leeway to sneak in a final call to post the notification before it + // is actually quit(). + // TODO: Write an API in MyHandlerThread that removes its messages. Then, write and + // handle a service command that calls that API. Alternatively, we may not need the + // command because we could just call that API in your quitThread() helper method. } @Override