Merge "Check the fd handle before attempting to use it in GNSS HAL"

This commit is contained in:
TreeHugger Robot 2020-11-02 20:57:23 +00:00 committed by Android (Google) Code Review
commit 8b1ac7ada3

View file

@ -689,6 +689,10 @@ Return<void> GnssTemplate<T_IGnss>::help(const hidl_handle& fd) {
template <class T_IGnss> template <class T_IGnss>
Return<void> GnssTemplate<T_IGnss>::debug(const hidl_handle& fd, Return<void> GnssTemplate<T_IGnss>::debug(const hidl_handle& fd,
const hidl_vec<hidl_string>& options) { const hidl_vec<hidl_string>& options) {
if (fd == nullptr || fd->numFds == 0) {
return Void();
}
if (options.size() == 0) { if (options.size() == 0) {
return help(fd); return help(fd);
} else if (options[0] == "location") { } else if (options[0] == "location") {