diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2023-03-07 09:14:24 -0800 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2023-03-07 09:14:24 -0800 |
commit | 8b512e583f760373db8176137ebe0e6b725185ee (patch) | |
tree | af683c1adfbb6fd411e92c8fddb89c40c94fe94a | |
parent | 1e5c95d5e63b141d339e386c8d28c61c9dc392b0 (diff) | |
parent | 1e28f6e696943d2967f7a1960151446eb3d48dc9 (diff) |
Merge 1e28f6e696943d2967f7a1960151446eb3d48dc9 on remote branch
Change-Id: Ic7237b3bac636a7798656c46c00dc6f0bef069ab
-rw-r--r-- | usb/gadget/1.1/default/UsbGadget.cpp | 2 | ||||
-rw-r--r-- | usb/gadget/1.2/default/UsbGadget.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/usb/gadget/1.1/default/UsbGadget.cpp b/usb/gadget/1.1/default/UsbGadget.cpp index 36d865dc2e..0d0b4032d4 100644 --- a/usb/gadget/1.1/default/UsbGadget.cpp +++ b/usb/gadget/1.1/default/UsbGadget.cpp @@ -46,6 +46,8 @@ void currentFunctionsAppliedCallback(bool functionsApplied, void* payload) { } Return<void> UsbGadget::getCurrentUsbFunctions(const sp<V1_0::IUsbGadgetCallback>& callback) { + if (!callback) return Void(); + Return<void> ret = callback->getCurrentUsbFunctionsCb( mCurrentUsbFunctions, mCurrentUsbFunctionsApplied ? Status::FUNCTIONS_APPLIED : Status::FUNCTIONS_NOT_APPLIED); diff --git a/usb/gadget/1.2/default/UsbGadget.cpp b/usb/gadget/1.2/default/UsbGadget.cpp index 8dd229e0fd..a59e983f69 100644 --- a/usb/gadget/1.2/default/UsbGadget.cpp +++ b/usb/gadget/1.2/default/UsbGadget.cpp @@ -46,6 +46,8 @@ void currentFunctionsAppliedCallback(bool functionsApplied, void* payload) { } Return<void> UsbGadget::getCurrentUsbFunctions(const sp<V1_0::IUsbGadgetCallback>& callback) { + if (!callback) return Void(); + Return<void> ret = callback->getCurrentUsbFunctionsCb( mCurrentUsbFunctions, mCurrentUsbFunctionsApplied ? Status::FUNCTIONS_APPLIED : Status::FUNCTIONS_NOT_APPLIED); |