diff options
author | Ricky Niu <rickyniu@google.com> | 2022-12-01 15:24:44 +0800 |
---|---|---|
committer | Ricky Niu <rickyniu@google.com> | 2022-12-01 16:23:08 +0800 |
commit | 2bbf8ee86db5be185acc8a5fe0093471578e2c1a (patch) | |
tree | 295340259f08d9c6a67e1e77a64bbfa2d96c49f4 /usb | |
parent | 5d13ab6d79ae9aa9d007dfdffec5b0ddcb611075 (diff) | |
download | interfaces-2bbf8ee86db5be185acc8a5fe0093471578e2c1a.tar.gz |
Fixed the build break in cf_x86_tv-userdebug
Change the long to int64_t in function setCurrentUsbFunctions
Bug: 260947383
Change-Id: I4832e2890ea561c8ad377e5a62bfa22dae35bf0f
Signed-off-by: Ricky Niu <rickyniu@google.com>
Diffstat (limited to 'usb')
-rw-r--r-- | usb/gadget/aidl/default/UsbGadget.cpp | 11 | ||||
-rw-r--r-- | usb/gadget/aidl/default/UsbGadget.h | 4 | ||||
-rw-r--r-- | usb/gadget/aidl/default/service_gadget.cpp | 5 |
3 files changed, 8 insertions, 12 deletions
diff --git a/usb/gadget/aidl/default/UsbGadget.cpp b/usb/gadget/aidl/default/UsbGadget.cpp index 1f1dc742b6..c4986e8e18 100644 --- a/usb/gadget/aidl/default/UsbGadget.cpp +++ b/usb/gadget/aidl/default/UsbGadget.cpp @@ -149,7 +149,9 @@ Status UsbGadget::setupFunctions(long functions, const shared_ptr<IUsbGadgetCallback> &callback, uint64_t timeout, int64_t in_transactionId) { bool ffsEnabled = false; - ALOGI("functions: %ld, timeout: %ld", functions, timeout); + if (timeout == 0) { + ALOGI("timeout not setup"); + } if ((functions & GadgetFunction::ADB) != 0) { ffsEnabled = true; @@ -193,9 +195,9 @@ Status getI2cBusHelper(string *name) { return Status::ERROR; } -ScopedAStatus UsbGadget::setCurrentUsbFunctions(long functions, +ScopedAStatus UsbGadget::setCurrentUsbFunctions(int64_t functions, const shared_ptr<IUsbGadgetCallback> &callback, - int64_t timeout, + int64_t timeoutMs, int64_t in_transactionId) { std::unique_lock<std::mutex> lk(mLockSetCurrentFunction); std::string current_usb_power_operation_mode, current_usb_type; @@ -203,7 +205,6 @@ ScopedAStatus UsbGadget::setCurrentUsbFunctions(long functions, string accessoryCurrentLimitEnablePath, accessoryCurrentLimitPath, path; - ALOGI("enter setCurrentUsbFunctions, in_transactionId=%ld , %ld", in_transactionId , timeout); mCurrentUsbFunctions = functions; mCurrentUsbFunctionsApplied = false; @@ -237,7 +238,7 @@ ScopedAStatus UsbGadget::setCurrentUsbFunctions(long functions, -1, "Error while calling setCurrentUsbFunctionsCb"); } - status = setupFunctions(functions, callback, timeout, in_transactionId); + status = setupFunctions(functions, callback, timeoutMs, in_transactionId); if (status != Status::SUCCESS) { goto error; } diff --git a/usb/gadget/aidl/default/UsbGadget.h b/usb/gadget/aidl/default/UsbGadget.h index e1194198eb..adcfcfa7ca 100644 --- a/usb/gadget/aidl/default/UsbGadget.h +++ b/usb/gadget/aidl/default/UsbGadget.h @@ -89,9 +89,9 @@ struct UsbGadget : public BnUsbGadget { bool mCurrentUsbFunctionsApplied; UsbSpeed mUsbSpeed; - ScopedAStatus setCurrentUsbFunctions(long functions, + ScopedAStatus setCurrentUsbFunctions(int64_t functions, const shared_ptr<IUsbGadgetCallback> &callback, - int64_t timeout, int64_t in_transactionId) override; + int64_t timeoutMs, int64_t in_transactionId) override; ScopedAStatus getCurrentUsbFunctions(const shared_ptr<IUsbGadgetCallback> &callback, int64_t in_transactionId) override; diff --git a/usb/gadget/aidl/default/service_gadget.cpp b/usb/gadget/aidl/default/service_gadget.cpp index 3cc5718a8f..7efbadd516 100644 --- a/usb/gadget/aidl/default/service_gadget.cpp +++ b/usb/gadget/aidl/default/service_gadget.cpp @@ -17,11 +17,6 @@ #include <android/binder_manager.h> #include <android/binder_process.h> #include "UsbGadget.h" -/*using android::OK; -using android::hardware::configureRpcThreadpool; -using android::hardware::joinRpcThreadpool; -using android::sp; -using android::status_t;*/ using ::aidl::android::hardware::usb::gadget::UsbGadget; int main() { ABinderProcess_setThreadPoolMaxThreadCount(0); |