コード例 #1
0
 /**
  * This method allows to setup high touch sensitivity status.
  *
  * @param status The new high touch sensitivity status
  * @return boolean Must be false if high touch sensitivity is not supported or the operation
  *     failed; true in any other case.
  */
 public static boolean setEnabled(boolean status) {
   return FileUtils.writeLine(COMMAND_PATH, status ? GLOVE_MODE_ENABLE : GLOVE_MODE_DISABLE);
 }
コード例 #2
0
 /**
  * This method returns the current activation status of high touch sensitivity
  *
  * @return boolean Must be false if high touch sensitivity is not supported or not activated, or
  *     the operation failed while reading the status; true in any other case.
  */
 public static boolean isEnabled() {
   return FileUtils.readOneLine(COMMAND_RESULT_PATH).equals(GLOVE_MODE_ENABLE + STATUS_OK);
 }