Skip to content

Commit

Permalink
update LED color option
Browse files Browse the repository at this point in the history
- add description so people know the color isn't for all apps,
	but just the default value
- stop setting the summary as the hex after it's been udpated to keep
	description

Signed-off-by: Roman Birg <romanbirg@gmail.com>

Change-Id: I964aaf824027f23d62538c7d3932db18bb5380f5
  • Loading branch information
romanbb committed Apr 27, 2012
1 parent 03e818c commit 07a4447
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions res/values/strings.xml
Expand Up @@ -229,6 +229,7 @@
<string name="title_led_off">LED pulse OFF duration</string>
<string name="summary_led_off">@null</string>
<string name="led_color_title">LED color</string>
<string name="led_color_summary">This will change the default LED color. Apps can easily override this setting with their own color.</string>
<string name="title_led_screen_on">LED flash while screen ON</string>
<string name="summary_led_screen_on">@null</string>

Expand Down
3 changes: 2 additions & 1 deletion res/xml/prefs_led.xml
Expand Up @@ -18,7 +18,8 @@
<net.margaritov.preference.colorpicker.ColorPickerPreference
android:key="led_color"
android:title="@string/led_color_title"
android:defaultValue="#000000" />
android:summary="@string/led_color_summary"
android:defaultValue="#FFFFFF" />

<CheckBoxPreference
android:key="led_screen_on"
Expand Down
3 changes: 0 additions & 3 deletions src/com/aokp/romcontrol/fragments/Led.java
Expand Up @@ -106,12 +106,9 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
} else if (preference == mColorPicker) {
String hex = ColorPickerPreference.convertToARGB(Integer.valueOf(String
.valueOf(newValue)));
preference.setSummary(hex);

int intHex = ColorPickerPreference.convertToColorInt(hex);
Settings.System.putInt(getActivity().getContentResolver(),
Settings.System.NOTIFICATION_LIGHT_COLOR, intHex);
Log.e("ROMAN", intHex + "");
}

return result;
Expand Down

0 comments on commit 07a4447

Please sign in to comment.