Call close() in TearDown() am: 25cd9d67d5
am: 9fbde6a00d
am: 84f98c0762
am: a63ea8b37a
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2254818 Change-Id: I98c20caa02acca1b9f374b9a920a21afa1ab4824 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
d2c39621e8
3 changed files with 13 additions and 1 deletions
|
@ -104,7 +104,7 @@ interface IGnss {
|
|||
*
|
||||
* The framework calls this method to instruct the GPS engine to prepare for serving requests
|
||||
* from the framework. The GNSS HAL implementation must respond to all GNSS requests from the
|
||||
* framework upon successful return from this method until cleanup() method is called to
|
||||
* framework upon successful return from this method until close() method is called to
|
||||
* close this interface.
|
||||
*
|
||||
* @param callback Callback interface for IGnss.
|
||||
|
|
|
@ -107,6 +107,17 @@ void GnssHalTest::SetUpGnssCallback() {
|
|||
}
|
||||
}
|
||||
|
||||
void GnssHalTest::TearDown() {
|
||||
GnssHalTestTemplate<IGnss_V2_1>::TearDown();
|
||||
if (aidl_gnss_hal_ != nullptr) {
|
||||
aidl_gnss_hal_->close();
|
||||
aidl_gnss_hal_ = nullptr;
|
||||
}
|
||||
|
||||
// Set to nullptr to destruct the callback event queues and warn of any unprocessed events.
|
||||
aidl_gnss_cb_ = nullptr;
|
||||
}
|
||||
|
||||
void GnssHalTest::CheckLocation(const GnssLocation& location, bool check_speed) {
|
||||
Utils::checkLocation(location, check_speed, /* check_more_accuracies= */ true);
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ class GnssHalTest : public android::hardware::gnss::common::GnssHalTestTemplate<
|
|||
|
||||
virtual void SetUp() override;
|
||||
virtual void SetUpGnssCallback() override;
|
||||
virtual void TearDown() override;
|
||||
|
||||
void CheckLocation(const android::hardware::gnss::GnssLocation& location,
|
||||
const bool check_speed);
|
||||
|
|
Loading…
Reference in a new issue