|
|
@@ -250,6 +250,42 @@ public class Options {
|
|
|
return aRGB + 0xFF000000;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @return
|
|
|
+ * The time that the LED should be on (in milliseconds).
|
|
|
+ */
|
|
|
+ public int getLedOnTime() {
|
|
|
+ String timeOn = options.optString("ledOnTime", null);
|
|
|
+
|
|
|
+ if (timeOn == null) {
|
|
|
+ return 1000;
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ return Integer.parseInt(timeOn);
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
+ return 1000;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return
|
|
|
+ * The time that the LED should be off (in milliseconds).
|
|
|
+ */
|
|
|
+ public int getLedOffTime() {
|
|
|
+ String timeOff = options.optString("ledOffTime", null);
|
|
|
+
|
|
|
+ if (timeOff == null) {
|
|
|
+ return 1000;
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ return Integer.parseInt(timeOff);
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
+ return 1000;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @return
|
|
|
* The notification background color for the small icon
|