Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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();
Add Comment
Please, Sign In to add comment