summaryrefslogtreecommitdiff
path: root/usb/aidl/default/Usb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'usb/aidl/default/Usb.cpp')
-rw-r--r--usb/aidl/default/Usb.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/usb/aidl/default/Usb.cpp b/usb/aidl/default/Usb.cpp
index 92b09a2b44..7e738c477f 100644
--- a/usb/aidl/default/Usb.cpp
+++ b/usb/aidl/default/Usb.cpp
@@ -90,6 +90,22 @@ ScopedAStatus Usb::enableUsbDataWhileDocked(const string& in_portName, int64_t i
return ScopedAStatus::ok();
}
+ScopedAStatus Usb::resetUsbPort(const string& in_portName, int64_t in_transactionId) {
+
+ pthread_mutex_lock(&mLock);
+ if (mCallback != NULL) {
+ ScopedAStatus ret = mCallback->notifyResetUsbPortStatus(
+ in_portName, Status::NOT_SUPPORTED, in_transactionId);
+ if (!ret.isOk())
+ ALOGE("notifyResetUsbPortStatus error %s", ret.getDescription().c_str());
+ } else {
+ ALOGE("Not notifying the userspace. Callback is not set");
+ }
+ pthread_mutex_unlock(&mLock);
+
+ return ScopedAStatus::ok();
+}
+
Status queryMoistureDetectionStatus(std::vector<PortStatus> *currentPortStatus) {
string enabled, status, path, DetectedPath;