diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml index cdf72aed15..d83609512b 100644 --- a/compatibility_matrices/compatibility_matrix.current.xml +++ b/compatibility_matrices/compatibility_matrix.current.xml @@ -227,7 +227,6 @@ android.hardware.gnss 2.0-1 - 3.0 IGnss default diff --git a/gnss/3.0/Android.bp b/gnss/3.0/Android.bp deleted file mode 100644 index dada17ced7..0000000000 --- a/gnss/3.0/Android.bp +++ /dev/null @@ -1,22 +0,0 @@ -// This file is autogenerated by hidl-gen -Landroidbp. - -hidl_interface { - name: "android.hardware.gnss@3.0", - root: "android.hardware", - srcs: [ - "IGnss.hal", - "IGnssPsds.hal", - "IGnssPsdsCallback.hal", - ], - interfaces: [ - "android.hardware.gnss.measurement_corrections@1.0", - "android.hardware.gnss.measurement_corrections@1.1", - "android.hardware.gnss.visibility_control@1.0", - "android.hardware.gnss@1.0", - "android.hardware.gnss@1.1", - "android.hardware.gnss@2.0", - "android.hardware.gnss@2.1", - "android.hidl.base@1.0", - ], - gen_java: true, -} diff --git a/gnss/3.0/IGnss.hal b/gnss/3.0/IGnss.hal deleted file mode 100644 index 18e5a9dee3..0000000000 --- a/gnss/3.0/IGnss.hal +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.hardware.gnss@3.0; - -import @2.1::IGnss; -import IGnssPsds; - -/** - * Represents the standard GNSS (Global Navigation Satellite System) interface. - */ -interface IGnss extends @2.1::IGnss { - /** - * This method returns the IGnssPsds interface. - * - * @return psdsIface Handle to the IGnssPsds interface. - */ - getExtensionPsds() generates (IGnssPsds psdsIface); -}; diff --git a/gnss/3.0/IGnssPsds.hal b/gnss/3.0/IGnssPsds.hal deleted file mode 100644 index 5004570574..0000000000 --- a/gnss/3.0/IGnssPsds.hal +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.hardware.gnss@3.0; - -import @1.0::IGnssXtra; -import IGnssPsdsCallback; - -/** - * This interface is used by the GNSS HAL to request the framework to download Predicted Satellite - * Data Service data. - */ -interface IGnssPsds extends @1.0::IGnssXtra { - /** - * Opens the PSDS interface and provides the callback routines to the implementation of this - * interface. - * - * @param callback Handle to the IGnssPsdsCallback interface. - * - * @return success True if the operation is successful. - */ - setCallback_3_0(IGnssPsdsCallback callback) generates (bool success); - - /** - * Inject the downloaded PSDS data into the GNSS receiver. - * - * @param psdsType Type of PSDS as defined in IGnssPsdsCallback.hal - * @param psdsData GNSS PSDS data. Framework must not parse the data since the data format is - * opaque to framework. - * - * @return success True if the operation is successful. - */ - injectPsdsData_3_0(int32_t psdsType, string psdsData) generates (bool success); -}; - diff --git a/gnss/3.0/IGnssPsdsCallback.hal b/gnss/3.0/IGnssPsdsCallback.hal deleted file mode 100644 index d91385f814..0000000000 --- a/gnss/3.0/IGnssPsdsCallback.hal +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package android.hardware.gnss@3.0; - -import @1.0::IGnssXtraCallback; - -/** - * This interface is used by the GNSS HAL to request download data from Predicted Satellite Data - * Service (PSDS). - */ -interface IGnssPsdsCallback extends @1.0::IGnssXtraCallback { - /** - * Callback to request the client to download PSDS data. The client should - * download PSDS data and inject it by calling injectPsdsData(). - * - * psdsType represents the type of PSDS data requested. - * - Value 1 represents the Long-Term type PSDS data, which lasts for many hours to several days - * and often provides satellite orbit and clock accuracy of 2 - 20 meters. - * - Value 2 represents the Normal type PSDS data, which is similar to broadcast ephemeris in - * longevity - lasting for hours and providings satellite orbit and clock accuracy of 1 - 2 - * meters. - * - Value 3 represents the Real-Time type PSDS data, which lasts for minutes and provides brief - * satellite status information such as temporary malfunction, but does not include satellite - * orbit or clock information. - */ - downloadRequestCb_3_0(int32_t psdsType); -}; diff --git a/gnss/3.0/default/Android.bp b/gnss/3.0/default/Android.bp deleted file mode 100644 index bb3c467923..0000000000 --- a/gnss/3.0/default/Android.bp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -cc_binary { - name: "android.hardware.gnss@3.0-service", - init_rc: ["android.hardware.gnss@3.0-service.rc"], - relative_install_path: "hw", - vendor: true, - vintf_fragments: ["android.hardware.gnss@3.0-service.xml"], - srcs: [ - "Gnss.cpp", - "GnssPsds.cpp", - "service.cpp", - ], - shared_libs: [ - "libhidlbase", - "libutils", - "liblog", - "android.hardware.gnss@1.0", - "android.hardware.gnss@1.1", - "android.hardware.gnss@2.0", - "android.hardware.gnss@2.1", - "android.hardware.gnss@3.0", - "android.hardware.gnss.measurement_corrections@1.1", - "android.hardware.gnss.measurement_corrections@1.0", - "android.hardware.gnss-ndk_platform", - ], - static_libs: [ - "android.hardware.gnss@common-default-lib", - ], -} diff --git a/gnss/3.0/default/Gnss.cpp b/gnss/3.0/default/Gnss.cpp deleted file mode 100644 index 5f2ca4f522..0000000000 --- a/gnss/3.0/default/Gnss.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG "Gnss" - -#include "Gnss.h" -#include -#include "GnssPsds.h" -#include "Utils.h" - -namespace android::hardware::gnss::V3_0::implementation { - -// Methods from V3_0::IGnss follow. -Return> Gnss::getExtensionPsds() { - ALOGD("Gnss::getExtensionPsds"); - return new GnssPsds(); -} - -} // namespace android::hardware::gnss::V3_0::implementation diff --git a/gnss/3.0/default/Gnss.h b/gnss/3.0/default/Gnss.h deleted file mode 100644 index 7ae562ade3..0000000000 --- a/gnss/3.0/default/Gnss.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include -#include -#include -#include -#include -#include "v2_1/GnssTemplate.h" - -namespace android::hardware::gnss::V3_0::implementation { - -using ::android::sp; -using ::android::hardware::Return; -using ::android::hardware::Void; -using ::android::hardware::gnss::common::implementation::GnssTemplate; - -struct Gnss : public GnssTemplate { - Gnss(){}; - ~Gnss(){}; - - // Methods from V3_0::IGnss follow. - Return> getExtensionPsds() override; -}; - -} // namespace android::hardware::gnss::V3_0::implementation diff --git a/gnss/3.0/default/GnssPsds.cpp b/gnss/3.0/default/GnssPsds.cpp deleted file mode 100644 index 44e096ebd3..0000000000 --- a/gnss/3.0/default/GnssPsds.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG "GnssPsds" - -#include "GnssPsds.h" - -#include - -namespace android::hardware::gnss::V3_0::implementation { - -sp GnssPsds::sCallback_3_0 = nullptr; - -// Methods from V1_0::IGnssXtra follow. -Return GnssPsds::setCallback(const sp&) { - // TODO implement - return bool{}; -} - -Return GnssPsds::injectXtraData(const hidl_string&) { - // TODO implement - return bool{}; -} - -// Methods from V3_0::IGnssPsds follow. -Return GnssPsds::setCallback_3_0(const sp& callback) { - ALOGD("setCallback_3_0"); - std::unique_lock lock(mMutex); - sCallback_3_0 = callback; - return true; -} - -Return GnssPsds::injectPsdsData_3_0(int32_t psdsType, const hidl_string& psdsData) { - ALOGD("injectPsdsData_3_0. psdsType: %d, psdsData: %s", psdsType, psdsData.c_str()); - return true; -} -} // namespace android::hardware::gnss::V3_0::implementation diff --git a/gnss/3.0/default/GnssPsds.h b/gnss/3.0/default/GnssPsds.h deleted file mode 100644 index 4053bf17c8..0000000000 --- a/gnss/3.0/default/GnssPsds.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include -#include - -namespace android::hardware::gnss::V3_0::implementation { - -using ::android::sp; -using ::android::hardware::hidl_array; -using ::android::hardware::hidl_memory; -using ::android::hardware::hidl_string; -using ::android::hardware::hidl_vec; -using ::android::hardware::Return; -using ::android::hardware::Void; - -struct GnssPsds : public V3_0::IGnssPsds { - // Methods from V1_0::IGnssXtra follow. - Return setCallback(const sp& callback) override; - Return injectXtraData(const hidl_string& xtraData) override; - - // Methods from V3_0::IGnssPsds follow. - Return setCallback_3_0(const sp& callback) override; - Return injectPsdsData_3_0(int32_t psdsType, const hidl_string& psdsData) override; - - private: - // Guarded by mMutex - static sp sCallback_3_0; - - // Synchronization lock for sCallback_3_0 - mutable std::mutex mMutex; -}; - -} // namespace android::hardware::gnss::V3_0::implementation diff --git a/gnss/3.0/default/OWNERS b/gnss/3.0/default/OWNERS deleted file mode 100644 index b7b4a2e902..0000000000 --- a/gnss/3.0/default/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -gomo@google.com -smalkos@google.com -wyattriley@google.com -yuhany@google.com diff --git a/gnss/3.0/default/android.hardware.gnss@3.0-service.rc b/gnss/3.0/default/android.hardware.gnss@3.0-service.rc deleted file mode 100644 index c2bfb91e22..0000000000 --- a/gnss/3.0/default/android.hardware.gnss@3.0-service.rc +++ /dev/null @@ -1,4 +0,0 @@ -service vendor.gnss-3-0 /vendor/bin/hw/android.hardware.gnss@3.0-service - class hal - user system - group system diff --git a/gnss/3.0/default/android.hardware.gnss@3.0-service.xml b/gnss/3.0/default/android.hardware.gnss@3.0-service.xml deleted file mode 100644 index 6709e0c3b5..0000000000 --- a/gnss/3.0/default/android.hardware.gnss@3.0-service.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - android.hardware.gnss - hwbinder - 3.0 - 2.1 - 1.1 - - IGnss - default - - - diff --git a/gnss/3.0/default/service.cpp b/gnss/3.0/default/service.cpp deleted file mode 100644 index 87b458070b..0000000000 --- a/gnss/3.0/default/service.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG "android.hardware.gnss@3.0-service" - -#include -#include -#include "Gnss.h" - -using ::android::OK; -using ::android::sp; -using ::android::hardware::configureRpcThreadpool; -using ::android::hardware::joinRpcThreadpool; -using ::android::hardware::gnss::V3_0::IGnss; -using ::android::hardware::gnss::V3_0::implementation::Gnss; - -int main(int /* argc */, char* /* argv */[]) { - sp gnss = new Gnss(); - configureRpcThreadpool(1, true /* will join */); - if (gnss->registerAsService() != OK) { - ALOGE("Could not register gnss 3.0 service."); - return 1; - } - joinRpcThreadpool(); - - ALOGE("Service exited!"); - return 1; -} \ No newline at end of file diff --git a/gnss/3.0/vts/OWNERS b/gnss/3.0/vts/OWNERS deleted file mode 100644 index b7b4a2e902..0000000000 --- a/gnss/3.0/vts/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -gomo@google.com -smalkos@google.com -wyattriley@google.com -yuhany@google.com diff --git a/gnss/3.0/vts/functional/Android.bp b/gnss/3.0/vts/functional/Android.bp deleted file mode 100644 index 584424ccc4..0000000000 --- a/gnss/3.0/vts/functional/Android.bp +++ /dev/null @@ -1,39 +0,0 @@ -// -// Copyright (C) 2020 The Android Open Source Project -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -cc_test { - name: "VtsHalGnssV3_0TargetTest", - defaults: ["VtsHalTargetTestDefaults"], - srcs: [ - "gnss_hal_test_cases.cpp", - "VtsHalGnssV3_0TargetTest.cpp", - ], - static_libs: [ - "android.hardware.gnss.measurement_corrections@1.0", - "android.hardware.gnss.measurement_corrections@1.1", - "android.hardware.gnss.visibility_control@1.0", - "android.hardware.gnss@1.0", - "android.hardware.gnss@1.1", - "android.hardware.gnss@2.0", - "android.hardware.gnss@2.1", - "android.hardware.gnss@3.0", - "android.hardware.gnss@common-vts-lib", - ], - test_suites: [ - "general-tests", - "vts", - ], -} diff --git a/gnss/3.0/vts/functional/VtsHalGnssV3_0TargetTest.cpp b/gnss/3.0/vts/functional/VtsHalGnssV3_0TargetTest.cpp deleted file mode 100644 index 31e6164f9e..0000000000 --- a/gnss/3.0/vts/functional/VtsHalGnssV3_0TargetTest.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#define LOG_TAG "VtsHalGnssV3_0TargetTest" - -#include -#include -#include - -#include "gnss_hal_test.h" - -using android::hardware::gnss::V3_0::IGnss; - -GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GnssHalTest); -INSTANTIATE_TEST_SUITE_P( - PerInstance, GnssHalTest, - testing::ValuesIn(android::hardware::getAllHalInstanceNames(IGnss::descriptor)), - android::hardware::PrintInstanceNameToString); \ No newline at end of file diff --git a/gnss/3.0/vts/functional/gnss_hal_test.h b/gnss/3.0/vts/functional/gnss_hal_test.h deleted file mode 100644 index be6d38cfac..0000000000 --- a/gnss/3.0/vts/functional/gnss_hal_test.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include "v2_1/gnss_hal_test_template.h" - -// The main test class for GNSS HAL. -class GnssHalTest : public android::hardware::gnss::common::GnssHalTestTemplate< - android::hardware::gnss::V3_0::IGnss> {}; \ No newline at end of file diff --git a/gnss/3.0/vts/functional/gnss_hal_test_cases.cpp b/gnss/3.0/vts/functional/gnss_hal_test_cases.cpp deleted file mode 100644 index cc5341c181..0000000000 --- a/gnss/3.0/vts/functional/gnss_hal_test_cases.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2020 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#define LOG_TAG "GnssHalTestCases" - -#include -#include -#include "Utils.h" - -#include - -using android::hardware::hidl_string; -using android::hardware::hidl_vec; - -using android::hardware::gnss::common::Utils; - -using android::hardware::gnss::V3_0::IGnssPsds; - -/* - * SetupTeardownCreateCleanup: - * Requests the gnss HAL then calls cleanup - * - * Empty test fixture to verify basic Setup & Teardown - */ -TEST_P(GnssHalTest, SetupTeardownCreateCleanup) {} - -/* - * TestPsdsExtension: - * Gets the PsdsExtension and verifies that it returns a non-null extension. - */ -TEST_P(GnssHalTest, TestPsdsExtension) { - auto psds = gnss_hal_->getExtensionPsds(); - ASSERT_TRUE(psds.isOk()); - sp iPsds = psds; - ASSERT_TRUE(iPsds != nullptr); -}