davinci: parts: Adjust for new led labels in kernel

Change-Id: I8ce322f58d2af6fee20f1a9eda91e68b0ec59b05
This commit is contained in:
Arian 2020-08-30 23:54:04 +02:00
parent f18e17322f
commit 5c58f2e504
No known key found for this signature in database
GPG Key ID: 48029380598CE3B9
2 changed files with 6 additions and 6 deletions

View File

@ -32,7 +32,7 @@ public class Constants {
public static final String OPEN_CAMERA_STATE = "1";
public static final String FRONT_CAMERA_ID = "1";
public static final String BLUE_LED_PATH = "/sys/class/leds/blue/brightness";
public static final String GREEN_LED_PATH = "/sys/class/leds/green/brightness";
public static final String LEFT_LED_PATH = "/sys/class/leds/left/brightness";
public static final String RIGHT_LED_PATH = "/sys/class/leds/right/brightness";
public static final String POPUP_SOUND_PATH = "/system/media/audio/ui/";
}

View File

@ -210,12 +210,12 @@ public class PopupCameraService extends Service implements Handler.Callback {
private void lightUp() {
if (mPopupCameraPreferences.isLedAllowed()) {
FileUtils.writeLine(Constants.GREEN_LED_PATH, "255");
FileUtils.writeLine(Constants.BLUE_LED_PATH, "255");
FileUtils.writeLine(Constants.LEFT_LED_PATH, "255");
FileUtils.writeLine(Constants.RIGHT_LED_PATH, "255");
mHandler.postDelayed(() -> {
FileUtils.writeLine(Constants.GREEN_LED_PATH, "0");
FileUtils.writeLine(Constants.BLUE_LED_PATH, "0");
FileUtils.writeLine(Constants.LEFT_LED_PATH, "0");
FileUtils.writeLine(Constants.RIGHT_LED_PATH, "0");
}, 1200);
}
}