Created
June 17, 2018 10:45
-
-
Save iscle/a9f58c75f4cd25f86ec1218b19a0c59b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (isChecked) { | |
try { | |
Runtime.getRuntime().exec("su -c echo 1 > /sys/bus/i2c/devices/3-0038/wakeup_mode"); | |
editor.putBoolean("dt2w_toggle", true).apply(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
} else { | |
try { | |
Runtime.getRuntime().exec("su -c echo 0 > /sys/bus/i2c/devices/3-0038/wakeup_mode"); | |
editor.putBoolean("dt2w_toggle", false).apply(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
} | |
editor.commit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment