Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
fix(mqtt): update disable Usb ptp topic
Browse files Browse the repository at this point in the history
Signed-off-by: Rafa Hernandez <rhernandez@teclib.com>
  • Loading branch information
rafaelje authored and Hector Rondon committed Feb 2, 2018
1 parent 5975a2f commit 05657c9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions app/src/main/java/org/flyve/mdm/agent/services/MQTTService.java
Expand Up @@ -924,6 +924,24 @@ public void messageArrived(String topic, MqttMessage message) throws Exception {
}
}

// Policy/disableUsbPtp
// ROOT
String DISABLE_USB_PTP = "disableUsbPtp";
if(topic.toLowerCase().contains(DISABLE_USB_PTP.toLowerCase())) {
try {
JSONObject jsonObj = new JSONObject(messageBody);

if(jsonObj.has(DISABLE_USB_PTP)) {
Boolean disable = jsonObj.getBoolean(DISABLE_USB_PTP);
String taskId = jsonObj.getString("taskId");

mqttHelper.disablePTPUsbFileTransferProtocols(disable);
}
} catch (Exception ex) {
FlyveLog.e(ex.getMessage());
}
}

}


Expand Down

0 comments on commit 05657c9

Please sign in to comment.