Merge "Check the fd handle before attempting to use it in GNSS HAL"
This commit is contained in:
commit
8b1ac7ada3
1 changed files with 4 additions and 0 deletions
|
@ -689,6 +689,10 @@ Return<void> GnssTemplate<T_IGnss>::help(const hidl_handle& fd) {
|
|||
template <class T_IGnss>
|
||||
Return<void> GnssTemplate<T_IGnss>::debug(const hidl_handle& fd,
|
||||
const hidl_vec<hidl_string>& options) {
|
||||
if (fd == nullptr || fd->numFds == 0) {
|
||||
return Void();
|
||||
}
|
||||
|
||||
if (options.size() == 0) {
|
||||
return help(fd);
|
||||
} else if (options[0] == "location") {
|
||||
|
|
Loading…
Reference in a new issue