mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-17 12:28:24 +00:00
Give user the opportunity to chose no LED-notification.
This commit is contained in:
parent
574f33c92d
commit
339193af12
@ -82,6 +82,7 @@
|
||||
<item>@string/preferences__cyan</item>
|
||||
<item>@string/preferences__magenta</item>
|
||||
<item>@string/preferences__white</item>
|
||||
<item>@string/preferences__none</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
@ -93,6 +94,7 @@
|
||||
<item>cyan</item>
|
||||
<item>magenta</item>
|
||||
<item>white</item>
|
||||
<item>none</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_led_blink_pattern_entries">
|
||||
|
@ -693,6 +693,7 @@
|
||||
<string name="preferences__cyan">Cyan</string>
|
||||
<string name="preferences__magenta">Magenta</string>
|
||||
<string name="preferences__white">White</string>
|
||||
<string name="preferences__none">None</string>
|
||||
<string name="preferences__fast">Fast</string>
|
||||
<string name="preferences__normal">Normal</string>
|
||||
<string name="preferences__slow">Slow</string>
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user