mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Remove GNSS HAL v3.0 (hardware/interfaces)
Bug: 170506696 Test: on cuttlefish Change-Id: I4be1755e850ac53315a50f0659f57fe35279d7bf
This commit is contained in:
@@ -227,7 +227,6 @@
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hardware.gnss</name>
|
||||
<version>2.0-1</version>
|
||||
<version>3.0</version>
|
||||
<interface>
|
||||
<name>IGnss</name>
|
||||
<instance>default</instance>
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
@@ -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);
|
||||
};
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
@@ -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",
|
||||
],
|
||||
}
|
||||
@@ -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 <log/log.h>
|
||||
#include "GnssPsds.h"
|
||||
#include "Utils.h"
|
||||
|
||||
namespace android::hardware::gnss::V3_0::implementation {
|
||||
|
||||
// Methods from V3_0::IGnss follow.
|
||||
Return<sp<V3_0::IGnssPsds>> Gnss::getExtensionPsds() {
|
||||
ALOGD("Gnss::getExtensionPsds");
|
||||
return new GnssPsds();
|
||||
}
|
||||
|
||||
} // namespace android::hardware::gnss::V3_0::implementation
|
||||
@@ -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 <android/hardware/gnss/3.0/IGnss.h>
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#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<IGnss> {
|
||||
Gnss(){};
|
||||
~Gnss(){};
|
||||
|
||||
// Methods from V3_0::IGnss follow.
|
||||
Return<sp<V3_0::IGnssPsds>> getExtensionPsds() override;
|
||||
};
|
||||
|
||||
} // namespace android::hardware::gnss::V3_0::implementation
|
||||
@@ -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 <log/log.h>
|
||||
|
||||
namespace android::hardware::gnss::V3_0::implementation {
|
||||
|
||||
sp<V3_0::IGnssPsdsCallback> GnssPsds::sCallback_3_0 = nullptr;
|
||||
|
||||
// Methods from V1_0::IGnssXtra follow.
|
||||
Return<bool> GnssPsds::setCallback(const sp<V1_0::IGnssXtraCallback>&) {
|
||||
// TODO implement
|
||||
return bool{};
|
||||
}
|
||||
|
||||
Return<bool> GnssPsds::injectXtraData(const hidl_string&) {
|
||||
// TODO implement
|
||||
return bool{};
|
||||
}
|
||||
|
||||
// Methods from V3_0::IGnssPsds follow.
|
||||
Return<bool> GnssPsds::setCallback_3_0(const sp<V3_0::IGnssPsdsCallback>& callback) {
|
||||
ALOGD("setCallback_3_0");
|
||||
std::unique_lock<std::mutex> lock(mMutex);
|
||||
sCallback_3_0 = callback;
|
||||
return true;
|
||||
}
|
||||
|
||||
Return<bool> 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
|
||||
@@ -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 <android/hardware/gnss/3.0/IGnssPsds.h>
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
|
||||
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<bool> setCallback(const sp<V1_0::IGnssXtraCallback>& callback) override;
|
||||
Return<bool> injectXtraData(const hidl_string& xtraData) override;
|
||||
|
||||
// Methods from V3_0::IGnssPsds follow.
|
||||
Return<bool> setCallback_3_0(const sp<V3_0::IGnssPsdsCallback>& callback) override;
|
||||
Return<bool> injectPsdsData_3_0(int32_t psdsType, const hidl_string& psdsData) override;
|
||||
|
||||
private:
|
||||
// Guarded by mMutex
|
||||
static sp<V3_0::IGnssPsdsCallback> sCallback_3_0;
|
||||
|
||||
// Synchronization lock for sCallback_3_0
|
||||
mutable std::mutex mMutex;
|
||||
};
|
||||
|
||||
} // namespace android::hardware::gnss::V3_0::implementation
|
||||
@@ -1,4 +0,0 @@
|
||||
gomo@google.com
|
||||
smalkos@google.com
|
||||
wyattriley@google.com
|
||||
yuhany@google.com
|
||||
@@ -1,4 +0,0 @@
|
||||
service vendor.gnss-3-0 /vendor/bin/hw/android.hardware.gnss@3.0-service
|
||||
class hal
|
||||
user system
|
||||
group system
|
||||
@@ -1,13 +0,0 @@
|
||||
<manifest version="1.0" type="device">
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.gnss</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>3.0</version>
|
||||
<version>2.1</version>
|
||||
<version>1.1</version>
|
||||
<interface>
|
||||
<name>IGnss</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</manifest>
|
||||
@@ -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 <hidl/HidlSupport.h>
|
||||
#include <hidl/HidlTransportSupport.h>
|
||||
#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<IGnss> 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;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
gomo@google.com
|
||||
smalkos@google.com
|
||||
wyattriley@google.com
|
||||
yuhany@google.com
|
||||
@@ -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",
|
||||
],
|
||||
}
|
||||
@@ -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 <gtest/gtest.h>
|
||||
#include <hidl/GtestPrinter.h>
|
||||
#include <hidl/ServiceManagement.h>
|
||||
|
||||
#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);
|
||||
@@ -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 <android/hardware/gnss/3.0/IGnss.h>
|
||||
#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> {};
|
||||
@@ -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 <gnss_hal_test.h>
|
||||
#include <cmath>
|
||||
#include "Utils.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
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<IGnssPsds> iPsds = psds;
|
||||
ASSERT_TRUE(iPsds != nullptr);
|
||||
}
|
||||
Reference in New Issue
Block a user