OmniGears: notification lights - support for devices without multi-color led
See also http://jira.omnirom.org/browse/UIREVIEW-4
For devices that dont have a multi-color led the color picker
dialog in notification lights makes not much sense
This creates an adapted dialog which supports a list of colors
that can be provided in the device overlay
To enable:
<bool name="config_has_multi_color_led" translatable="false">false</bool>
Default color list:
<string-array name="entries_led_colors" translatable="false">
<item>@string/led_color_green</item>
<item>@string/led_color_red</item>
</string-array>
<string-array name="values_led_colors" translatable="false">
<item>#FF00FF00</item>
<item>#FFFF0000</item>
</string-array>
PS2:
whitespace cleanup
PS3:
remove unneded separator line
Change-Id: I783cfcc42b1753148da31d521e09c134fab4311a
diff --git a/res/values/config.xml b/res/values/config.xml
new file mode 100644
index 0000000..33fef4f
--- /dev/null
+++ b/res/values/config.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The OmniROM Project
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- does the device have multi color led support or only
+ a fixed set of led colors -->
+ <bool name="config_has_multi_color_led" translatable="false">true</bool>
+</resources>
diff --git a/res/values/custom_arrays.xml b/res/values/custom_arrays.xml
index 18eafe1..5e28804 100644
--- a/res/values/custom_arrays.xml
+++ b/res/values/custom_arrays.xml
@@ -137,4 +137,15 @@
<item>50</item>
<item>25</item>
</string-array>
+
+ <!-- led color list -->
+ <string-array name="entries_led_colors" translatable="false">
+ <item>@string/led_color_green</item>
+ <item>@string/led_color_red</item>
+ </string-array>
+
+ <string-array name="values_led_colors" translatable="false">
+ <item>#FF00FF00</item>
+ <item>#FFFF0000</item>
+ </string-array>
</resources>
diff --git a/res/values/custom_strings.xml b/res/values/custom_strings.xml
index f49bc2e..0c2f4d5 100644
--- a/res/values/custom_strings.xml
+++ b/res/values/custom_strings.xml
@@ -96,6 +96,7 @@
<!-- Notification light dialogs -->
<string name="edit_light_settings">Edit light settings</string>
<string name="pulse_speed_title">Pulse length and speed</string>
+ <string name="color_list_title">Color</string>
<string name="default_time">Normal</string>
<string name="custom_time">Custom</string>
<string name="dialog_test">Test</string>
@@ -131,6 +132,9 @@
<string name="pulse_speed_slow">Slow</string>
<string name="pulse_speed_very_slow">Very slow</string>
+ <string name="led_color_green">Green</string>
+ <string name="led_color_red">Red</string>
+
<!-- Battery light settings -->
<string name="battery_light_title">Battery light</string>
<string name="battery_low_pulse_title">Pulse if battery low</string>