Give user the opportunity to chose no LED-notification.

This commit is contained in:
3xo
2014-03-04 11:05:56 +01:00
committed by Moxie Marlinspike
parent 574f33c92d
commit 339193af12
3 changed files with 10 additions and 3 deletions

View File

@@ -361,11 +361,15 @@ public class MessageNotifier {
builder.setSound(TextUtils.isEmpty(ringtone) || !signal ? null : Uri.parse(ringtone));
if (signal && vibrate)
if (signal && vibrate) {
builder.setDefaults(Notification.DEFAULT_VIBRATE);
}
builder.setLights(Color.parseColor(ledColor), Integer.parseInt(blinkPatternArray[0]),
Integer.parseInt(blinkPatternArray[1]));
if (!ledColor.equals("none")) {
builder.setLights(Color.parseColor(ledColor),
Integer.parseInt(blinkPatternArray[0]),
Integer.parseInt(blinkPatternArray[1]));
}
}
private static String[] parseBlinkPattern(String blinkPattern, String blinkPatternCustom) {