Skip TestGnssPowerIndication if capability is not supported am: 5da610c660

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2397741

Change-Id: I435aef2d1ef9c28a998563ee6a0630a913c30eef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Yu-Han Yang 2023-01-25 18:51:56 +00:00 committed by Automerger Merge Worker
commit ea19540d02

View file

@ -526,6 +526,11 @@ TEST_P(GnssHalTest, TestGnssPowerIndication) {
EXPECT_EQ(gnssPowerIndicationCallback->capabilities_cbq_.calledCount(), 1);
if (gnssPowerIndicationCallback->last_capabilities_ == 0) {
// Skipping the test since GnssPowerIndication is not supported.
return;
}
// Request and verify a GnssPowerStats is received
gnssPowerIndicationCallback->gnss_power_stats_cbq_.reset();
iGnssPowerIndication->requestGnssPowerStats();