summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiogo Ferreira <diogo@underdev.org>2015-03-25 15:31:08 +0000
committerDiogo Ferreira <diogo@underdev.org>2015-03-26 15:24:57 +0000
commitba1a197833a1cd35897aa823f610f66754060a6d (patch)
tree64e4e6e9fec97667c899fb1388238751dd084b17
parentdb3a5328f665bf675904e24ff0b4d60c638c2cf6 (diff)
downloadandroid_packages_apps_DeskClock-ba1a197833a1cd35897aa823f610f66754060a6d.tar.gz
android_packages_apps_DeskClock-ba1a197833a1cd35897aa823f610f66754060a6d.tar.bz2
android_packages_apps_DeskClock-ba1a197833a1cd35897aa823f610f66754060a6d.zip
TimerReceiver: Correctly show the remaining time for 100 hours
If you open the Clock countdown time and input 99h99m99s it will actually translate to 100 hours, 40 minutes and 39 seconds as expected. When leaving the app it will show a notification with the remaining time and if there are more than 100 hours it will fail to show that part and only show "40 minutes remaining". This patch fixes allows for 100 as a valid input. Change-Id: Ib3621691aaa3a449262cb9e3601d39283bb808f8
-rw-r--r--src/com/android/deskclock/timer/TimerReceiver.java3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/com/android/deskclock/timer/TimerReceiver.java b/src/com/android/deskclock/timer/TimerReceiver.java
index 5bf2bbb8f..52c874ca8 100644
--- a/src/com/android/deskclock/timer/TimerReceiver.java
+++ b/src/com/android/deskclock/timer/TimerReceiver.java
@@ -361,9 +361,6 @@ public class TimerReceiver extends BroadcastReceiver {
seconds = seconds - minutes * 60;
hours = minutes / 60;
minutes = minutes - hours * 60;
- if (hours > 99) {
- hours = 0;
- }
String hourSeq = (hours == 0) ? "" :
( (hours == 1) ? context.getString(R.string.hour) :