Skip to content

Commit

Permalink
Display & Led: update LED brightness to work with more devices
Browse files Browse the repository at this point in the history
and also rename (cosmetically) LED blink/fade title

Signed-off-by: sunilpaulmathew <sunil.kde@gmail.com>
  • Loading branch information
sunilpaulmathew committed Nov 13, 2018
1 parent c23537b commit c2e6d65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ public void setcharginglight(int value, Context context) {
}

public int getcharginglight() {
return Utils.strToInt(Utils.readFile(ENABLE_FILE));
String value = Utils.readFile(ENABLE_FILE);
if (value.matches("\\d.+.(-)*")) {
value = value.split("-")[0].trim();
}
return Utils.strToInt(value);
}

public boolean hascharginglight() {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@
<string name="charging_mode_summary">Wake controls will only be active when device is charging.</string>

<!-- LED -->
<string name="fade">LED Blink/Fade</string>
<string name="fade">LED Notification (Blink/Fade)</string>
<string name="fade_summary">Enable for fading, disable for blinking.</string>
<string name="led_intensity">LED Notification (Intensity)</string>
<string name="led_speed">LED Notification (Speed)</string>
Expand Down

0 comments on commit c2e6d65

Please sign in to comment.