Ver código fonte

Fix bug in repeating intervals (see #43)

Sebastián Katzer 12 anos atrás
pai
commit
c424fbc796
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      src/android/Options.java

+ 4 - 2
src/android/Options.java

@@ -68,7 +68,9 @@ public class Options {
         } else if (repeat.equalsIgnoreCase("yearly")) {
             interval = AlarmManager.INTERVAL_DAY*365;
         } else {
-            interval = Integer.getInteger(repeat, 0) * 60000;
+        	try {
+        		interval = Integer.parseInt(repeat) * 60000;
+        	} catch (Exception e) {};
         }
 
         return this;
@@ -211,4 +213,4 @@ public class Options {
 
         return icon;
     }
-}
+}