summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiogo Ferreira <diogo@underdev.org>2015-03-25 15:31:08 +0000
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-04-20 21:25:48 +0000
commit8ff1508c8245d3b74d0dbd6af68c1ea60228fc95 (patch)
tree818cd3effc3b944cff2838d7246ddb2afc5c3e83
parentafee1d050b0a445e681ec16064b59989440927b8 (diff)
downloadandroid_packages_apps_DeskClock-8ff1508c8245d3b74d0dbd6af68c1ea60228fc95.tar.gz
android_packages_apps_DeskClock-8ff1508c8245d3b74d0dbd6af68c1ea60228fc95.tar.bz2
android_packages_apps_DeskClock-8ff1508c8245d3b74d0dbd6af68c1ea60228fc95.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 4c291481e..e139fa25a 100644
--- a/src/com/android/deskclock/timer/TimerReceiver.java
+++ b/src/com/android/deskclock/timer/TimerReceiver.java
@@ -365,9 +365,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) :