Snap for 9586404 from c42b38bdee to udc-release

Change-Id: I739b5dd8140eca62ca613b4375807caa7f3cf215
This commit is contained in:
Android Build Coastguard Worker 2023-02-10 02:02:49 +00:00
commit 13d26cae2b
3 changed files with 12 additions and 2 deletions

View file

@ -917,6 +917,8 @@ SUPPORT_MULTI_SIM := true
SUPPORT_NR := true
# Using IRadio 1.6
USE_RADIO_HAL_1_6 := true
# Support SecureElement HAL for HIDL
USE_SE_HIDL := true
#$(call inherit-product, vendor/google_devices/telephony/common/device-vendor.mk)
#$(call inherit-product, vendor/google_devices/gs101/proprietary/device-vendor.mk)

View file

@ -336,11 +336,14 @@ static Status validateAndSetVidPid(int64_t functions) {
return ret;
}
ScopedAStatus UsbGadget::reset() {
ScopedAStatus UsbGadget::reset(const shared_ptr<IUsbGadgetCallback> &callback,
int64_t in_transactionId) {
ALOGI("USB Gadget reset");
if (!WriteStringToFile("none", PULLUP_PATH)) {
ALOGI("Gadget cannot be pulled down");
if (callback)
callback->resetCb(Status::ERROR, in_transactionId);
return ScopedAStatus::fromServiceSpecificErrorWithMessage(
-1, "Gadget cannot be pulled down");
}
@ -349,9 +352,13 @@ ScopedAStatus UsbGadget::reset() {
if (!WriteStringToFile(kGadgetName, PULLUP_PATH)) {
ALOGI("Gadget cannot be pulled up");
if (callback)
callback->resetCb(Status::ERROR, in_transactionId);
return ScopedAStatus::fromServiceSpecificErrorWithMessage(
-1, "Gadget cannot be pulled up");
}
if (callback)
callback->resetCb(Status::SUCCESS, in_transactionId);
return ScopedAStatus::ok();
}

View file

@ -107,7 +107,8 @@ struct UsbGadget : public BnUsbGadget {
ScopedAStatus getCurrentUsbFunctions(const shared_ptr<IUsbGadgetCallback> &callback,
int64_t in_transactionId) override;
ScopedAStatus reset() override;
ScopedAStatus reset(const shared_ptr<IUsbGadgetCallback> &callback,
int64_t in_transactionId) override;
ScopedAStatus getUsbSpeed(const shared_ptr<IUsbGadgetCallback> &callback,
int64_t in_transactionId) override;