Commit 810ff015 by Sebastián Katzer

Use system default LED color in case of

parent acece5de
......@@ -128,11 +128,7 @@ public class Builder {
.setAutoCancel(options.isAutoClear())
.setOngoing(options.isOngoing())
.setColor(options.getColor())
.setLights(options.getLedColor(), 500, 500);
if (sound != null) {
builder.setSound(sound);
}
.setLights(options.getLedColor(), 100, 100);
if (sound != null) {
builder.setSound(sound);
......
......@@ -242,12 +242,15 @@ public class Options {
* The notification color for LED
*/
public int getLedColor() {
String hex = options.optString("led", "000000");
int aRGB = Integer.parseInt(hex,16);
String hex = options.optString("led", null);
aRGB += 0xFF000000;
if (hex == null) {
return NotificationCompat.DEFAULT_LIGHTS;
}
return aRGB;
int aRGB = Integer.parseInt(hex, 16);
return aRGB + 0xFF000000;
}
/**
......@@ -255,7 +258,7 @@ public class Options {
* The notification background color for the small icon
* Returns null, if no color is given.
*/
public Integer getColor() {
public int getColor() {
String hex = options.optString("color", null);
if (hex == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment