Guest User

Untitled

a guest
Jun 18th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. if (isChecked) {
  2. try {
  3. Runtime.getRuntime().exec("su -c echo 1 > /sys/bus/i2c/devices/3-0038/wakeup_mode");
  4. editor.putBoolean("dt2w_toggle", true).apply();
  5. } catch (IOException e) {
  6. e.printStackTrace();
  7. }
  8. } else {
  9. try {
  10. Runtime.getRuntime().exec("su -c echo 0 > /sys/bus/i2c/devices/3-0038/wakeup_mode");
  11. editor.putBoolean("dt2w_toggle", false).apply();
  12. } catch (IOException e) {
  13. e.printStackTrace();
  14. }
  15. }
  16. editor.commit();
Add Comment
Please, Sign In to add comment