Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855

Bug: 172690556
Merged-In: If5afd00334e8b09250df1ae97dec9285e39ad930
Change-Id: Ic66bb1389f1bbecfdaa641e1fcdbf79044f55d23
This commit is contained in:
Xin Li
2020-12-02 00:32:27 -08:00
28 changed files with 263 additions and 33 deletions

View File

@@ -2,7 +2,7 @@ service vendor.audio-hal /vendor/bin/hw/android.hardware.audio.service
class hal
user audioserver
# media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct wakelock
group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct wakelock context_hub
capabilities BLOCK_SUSPEND
ioprio rt 4
task_profiles ProcessCapacityHigh HighPerformance

View File

@@ -78,6 +78,7 @@ Return<void> VehicleHalManager::getPropConfigs(const hidl_vec<int32_t> &properti
} else {
ALOGW("Requested config for undefined property: 0x%x", prop);
_hidl_cb(StatusCode::INVALID_ARG, hidl_vec<VehiclePropConfig>());
return Void();
}
}

View File

@@ -264,6 +264,20 @@ const ConfigDeclaration kVehicleProperties[]{
.changeMode = VehiclePropertyChangeMode::STATIC,
},
.initialValue = {.stringValue = "Toy Vehicle"}},
{.config =
{
.prop = toInt(VehicleProperty::INFO_MODEL),
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::STATIC,
},
.initialValue = {.stringValue = "Speedy Model"}},
{.config =
{
.prop = toInt(VehicleProperty::INFO_MODEL_YEAR),
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::STATIC,
},
.initialValue = {.int32Values = {2020}}},
{.config =
{
.prop = toInt(VehicleProperty::INFO_EXTERIOR_DIMENSIONS),
@@ -674,6 +688,12 @@ const ConfigDeclaration kVehicleProperties[]{
.prop = toInt(VehicleProperty::GEAR_SELECTION),
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
.configArray = {(int)VehicleGear::GEAR_PARK,
(int)VehicleGear::GEAR_NEUTRAL,
(int)VehicleGear::GEAR_REVERSE,
(int)VehicleGear::GEAR_DRIVE, (int)VehicleGear::GEAR_1,
(int)VehicleGear::GEAR_2, (int)VehicleGear::GEAR_3,
(int)VehicleGear::GEAR_4, (int)VehicleGear::GEAR_5},
},
.initialValue = {.int32Values = {toInt(VehicleGear::GEAR_PARK)}}},

View File

@@ -141,11 +141,6 @@ Result<void> parseUserAssociations(const hidl_vec<int32_t>& int32Values, size_t
template <typename T>
Result<T> verifyAndCast(int32_t value) {
T castValue = static_cast<T>(value);
const auto iter = hidl_enum_range<T>();
if (castValue < *iter.begin() || castValue > *std::prev(iter.end())) {
return Error() << "Value " << value << " not in range [" << toString(*iter.begin()) << ", "
<< toString(*std::prev(iter.end())) << "]";
}
for (const auto& v : hidl_enum_range<T>()) {
if (castValue == v) {
return castValue;

View File

@@ -16,6 +16,7 @@
<configuration description="Runs VtsHalDrmV1_0TargetTest.">
<option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-native" />
<option name="not-shardable" value="true" />
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>

View File

@@ -16,6 +16,7 @@
<configuration description="Runs VtsHalDrmV1_1TargetTest.">
<option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-native" />
<option name="not-shardable" value="true" />
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>

View File

@@ -16,6 +16,7 @@
<configuration description="Runs VtsHalDrmV1_2TargetTest.">
<option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-native" />
<option name="not-shardable" value="true" />
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>

View File

@@ -16,6 +16,7 @@
<configuration description="Runs VtsHalDrmV1_3TargetTest.">
<option name="test-suite-tag" value="apct" />
<option name="test-suite-tag" value="apct-native" />
<option name="not-shardable" value="true" />
<target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>

View File

@@ -372,6 +372,12 @@ IGnssConfiguration::BlacklistedSource FindStrongFrequentNonGpsSource(
* formerly strongest satellite
*/
TEST_P(GnssHalTest, BlacklistIndividualSatellites) {
if (!(gnss_cb_->last_capabilities_ & IGnssCallback_2_1::Capabilities::SATELLITE_BLACKLIST)) {
ALOGI("Test BlacklistIndividualSatellites skipped. SATELLITE_BLACKLIST capability not "
"supported.");
return;
}
const int kLocationsToAwait = 3;
const int kRetriesToUnBlacklist = 10;
@@ -513,6 +519,12 @@ TEST_P(GnssHalTest, BlacklistIndividualSatellites) {
* 4a & b) Clean up by turning off location, and send in empty blacklist.
*/
TEST_P(GnssHalTest, BlacklistConstellationLocationOff) {
if (!(gnss_cb_->last_capabilities_ & IGnssCallback_2_1::Capabilities::SATELLITE_BLACKLIST)) {
ALOGI("Test BlacklistConstellationLocationOff skipped. SATELLITE_BLACKLIST capability not "
"supported.");
return;
}
const int kLocationsToAwait = 3;
const int kGnssSvInfoListTimeout = 2;
@@ -589,6 +601,12 @@ TEST_P(GnssHalTest, BlacklistConstellationLocationOff) {
* 4a & b) Clean up by turning off location, and send in empty blacklist.
*/
TEST_P(GnssHalTest, BlacklistConstellationLocationOn) {
if (!(gnss_cb_->last_capabilities_ & IGnssCallback_2_1::Capabilities::SATELLITE_BLACKLIST)) {
ALOGI("Test BlacklistConstellationLocationOn skipped. SATELLITE_BLACKLIST capability not "
"supported.");
return;
}
const int kLocationsToAwait = 3;
const int kGnssSvInfoListTimeout = 2;

View File

@@ -111,19 +111,19 @@ TEST_P(VerificationTokenTest, TestCreation) {
EXPECT_GE(host_time_delta, time_to_sleep)
<< "We slept for " << time_to_sleep << " ms, the clock must have advanced by that much";
EXPECT_LE(host_time_delta, time_to_sleep + 20)
EXPECT_LE(host_time_delta, time_to_sleep + 100)
<< "The verifyAuthorization call took " << (host_time_delta - time_to_sleep)
<< " ms? That's awful!";
auto km_time_delta = result2.token.timestamp - result1.token.timestamp;
// If not too much else is going on on the system, the time delta should be quite close. Allow
// 2 ms of slop just to avoid test flakiness.
// 20 ms of slop just to avoid test flakiness.
//
// TODO(swillden): see if we can output values so they can be gathered across many runs and
// report if times aren't nearly always <1ms apart.
EXPECT_LE(host_time_delta, km_time_delta + 2);
EXPECT_LE(km_time_delta, host_time_delta + 2);
EXPECT_LE(host_time_delta, km_time_delta + 20);
EXPECT_LE(km_time_delta, host_time_delta + 20);
ASSERT_EQ(result1.token.mac.size(), result2.token.mac.size());
ASSERT_NE(0,
memcmp(result1.token.mac.data(), result2.token.mac.data(), result1.token.mac.size()));
@@ -172,14 +172,14 @@ TEST_P(VerificationTokenTest, MacChangesOnChangingTimestamp) {
EXPECT_GE(host_time_delta, time_to_sleep)
<< "We slept for " << time_to_sleep << " ms, the clock must have advanced by that much";
EXPECT_LE(host_time_delta, time_to_sleep + 20)
EXPECT_LE(host_time_delta, time_to_sleep + 100)
<< "The verifyAuthorization call took " << (host_time_delta - time_to_sleep)
<< " ms? That's awful!";
auto km_time_delta = result2.token.timestamp - result1.token.timestamp;
EXPECT_LE(host_time_delta, km_time_delta + 2);
EXPECT_LE(km_time_delta, host_time_delta + 2);
EXPECT_LE(host_time_delta, km_time_delta + 20);
EXPECT_LE(km_time_delta, host_time_delta + 20);
ASSERT_EQ(result1.token.mac.size(), result2.token.mac.size());
ASSERT_NE(0,
memcmp(result1.token.mac.data(), result2.token.mac.data(), result1.token.mac.size()));

View File

@@ -695,6 +695,10 @@ void HalProxy::decrementRefCountAndMaybeReleaseWakelock(size_t delta,
int64_t timeoutStart /* = -1 */) {
if (!mThreadsRun.load()) return;
std::lock_guard<std::recursive_mutex> lockGuard(mWakelockMutex);
if (delta > mWakelockRefCount) {
ALOGE("Decrementing wakelock ref count by %zu when count is %zu",
delta, mWakelockRefCount);
}
if (timeoutStart == -1) timeoutStart = mWakelockTimeoutResetTime;
if (mWakelockRefCount == 0 || timeoutStart < mWakelockTimeoutResetTime) return;
mWakelockRefCount -= std::min(mWakelockRefCount, delta);

View File

@@ -28,6 +28,21 @@ int64_t getTimeNow() {
.count();
}
ScopedWakelock::ScopedWakelock(ScopedWakelock&& other) {
*this = std::move(other);
}
ScopedWakelock& ScopedWakelock::operator=(ScopedWakelock&& other) {
mRefCounter = other.mRefCounter;
mCreatedAtTimeNs = other.mCreatedAtTimeNs;
mLocked = other.mLocked;
other.mRefCounter = nullptr;
other.mCreatedAtTimeNs = 0;
other.mLocked = false;
return *this;
}
ScopedWakelock::ScopedWakelock(IScopedWakelockRefCounter* refCounter, bool locked)
: mRefCounter(refCounter), mLocked(locked) {
if (mLocked) {

View File

@@ -81,14 +81,15 @@ class IScopedWakelockRefCounter : public RefBase {
*/
class ScopedWakelock {
public:
ScopedWakelock(ScopedWakelock&&) = default;
ScopedWakelock& operator=(ScopedWakelock&&) = default;
ScopedWakelock(ScopedWakelock&& other);
ScopedWakelock& operator=(ScopedWakelock&& other);
virtual ~ScopedWakelock();
bool isLocked() const { return mLocked; }
private:
friend class HalProxyCallbackBase;
friend class ScopedWakelockTest;
IScopedWakelockRefCounter* mRefCounter;
int64_t mCreatedAtTimeNs;
bool mLocked;

View File

@@ -90,7 +90,10 @@ cc_test_library {
cc_test {
name: "android.hardware.sensors@2.X-halproxy-unit-tests",
srcs: ["HalProxy_test.cpp"],
srcs: [
"HalProxy_test.cpp",
"ScopedWakelock_test.cpp",
],
vendor: true,
header_libs: [
"android.hardware.sensors@2.X-shared-utils",

View File

@@ -0,0 +1,110 @@
//
// 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.
#include <gtest/gtest.h>
#include "V2_0/ScopedWakelock.h"
namespace android {
namespace hardware {
namespace sensors {
namespace V2_0 {
namespace implementation {
class RefCounter : public IScopedWakelockRefCounter {
public:
size_t incCount = 0;
size_t decCount = 0;
bool incrementRefCountAndMaybeAcquireWakelock(size_t /* delta */,
int64_t* /* timeoutStart */) override {
incCount++;
return true;
}
void decrementRefCountAndMaybeReleaseWakelock(size_t /* delta */,
int64_t /* timeoutStart */) override {
decCount++;
}
};
class ScopedWakelockTest : public testing::Test {
public:
ScopedWakelock createScopedWakelock(bool locked) {
return ScopedWakelock(&mRefCounter, locked);
}
RefCounter mRefCounter;
};
TEST_F(ScopedWakelockTest, UnlockedAfterMoved) {
ScopedWakelock wakelock = createScopedWakelock(false /* locked */);
ScopedWakelock movedWakelock(std::move(wakelock));
EXPECT_FALSE(wakelock.isLocked());
EXPECT_FALSE(movedWakelock.isLocked());
}
TEST_F(ScopedWakelockTest, LockedAfterMoved) {
ScopedWakelock wakelock = createScopedWakelock(true /* locked */);
ScopedWakelock movedWakelock(std::move(wakelock));
EXPECT_FALSE(wakelock.isLocked());
EXPECT_TRUE(movedWakelock.isLocked());
}
TEST_F(ScopedWakelockTest, Locked) {
ScopedWakelock wakelock = createScopedWakelock(true /* locked */);
EXPECT_TRUE(wakelock.isLocked());
}
TEST_F(ScopedWakelockTest, Unlocked) {
ScopedWakelock wakelock = createScopedWakelock(false /* locked */);
EXPECT_FALSE(wakelock.isLocked());
}
TEST_F(ScopedWakelockTest, ScopedLocked) {
{ createScopedWakelock(true /* locked */); }
EXPECT_EQ(mRefCounter.incCount, 1);
EXPECT_EQ(mRefCounter.decCount, 1);
}
TEST_F(ScopedWakelockTest, ScopedUnlockIsNoop) {
{ createScopedWakelock(false /* locked */); }
EXPECT_EQ(mRefCounter.incCount, 0);
EXPECT_EQ(mRefCounter.decCount, 0);
}
TEST_F(ScopedWakelockTest, ScopedLockedMove) {
{
ScopedWakelock wakelock = createScopedWakelock(true /* locked */);
ScopedWakelock movedWakelock(std::move(wakelock));
}
EXPECT_EQ(mRefCounter.incCount, 1);
EXPECT_EQ(mRefCounter.decCount, 1);
}
} // namespace implementation
} // namespace V2_0
} // namespace sensors
} // namespace hardware
} // namespace android

View File

@@ -1,5 +1,9 @@
service vendor.wifi_hal_legacy /vendor/bin/hw/android.hardware.wifi@1.0-service-lazy
interface android.hardware.wifi@1.0::IWifi default
interface android.hardware.wifi@1.1::IWifi default
interface android.hardware.wifi@1.2::IWifi default
interface android.hardware.wifi@1.3::IWifi default
interface android.hardware.wifi@1.4::IWifi default
oneshot
disabled
class hal

View File

@@ -624,6 +624,15 @@ Return<void> WifiChip::getCapabilities_1_3(getCapabilities_cb hidl_status_cb) {
Return<void> WifiChip::debug(const hidl_handle& handle,
const hidl_vec<hidl_string>&) {
if (handle != nullptr && handle->numFds >= 1) {
{
std::unique_lock<std::mutex> lk(lock_t);
for (const auto& item : ringbuffer_map_) {
forceDumpToDebugRingBufferInternal(item.first);
}
// unique_lock unlocked here
}
usleep(100 * 1000); // sleep for 100 milliseconds to wait for
// ringbuffer updates.
int fd = handle->data[0];
if (!writeRingbufferFilesInternal()) {
LOG(ERROR) << "Error writing files to flash";
@@ -1120,6 +1129,9 @@ WifiStatus WifiChip::stopLoggingToDebugRingBufferInternal() {
legacy_hal::wifi_error legacy_status =
legacy_hal_.lock()->deregisterRingBufferCallbackHandler(
getFirstActiveWlanIfaceName());
if (legacy_status == legacy_hal::WIFI_SUCCESS) {
debug_ring_buffer_cb_registered_ = false;
}
return createWifiStatusFromLegacyError(legacy_status);
}
@@ -1335,7 +1347,7 @@ WifiStatus WifiChip::registerDebugRingBufferCallback() {
LOG(ERROR) << "Ringname " << name << " not found";
return;
}
// unlock
// unique_lock unlocked here
}
};
legacy_hal::wifi_error legacy_status =
@@ -1637,7 +1649,7 @@ bool WifiChip::writeRingbufferFilesInternal() {
}
}
}
// unlock
// unique_lock unlocked here
}
return true;
}

View File

@@ -367,8 +367,8 @@ wifi_error WifiLegacyHal::start() {
}
LOG(DEBUG) << "Waiting for the driver ready";
wifi_error status = global_func_table_.wifi_wait_for_driver_ready();
if (status == WIFI_ERROR_TIMED_OUT) {
LOG(ERROR) << "Timed out awaiting driver ready";
if (status == WIFI_ERROR_TIMED_OUT || status == WIFI_ERROR_UNKNOWN) {
LOG(ERROR) << "Failed or timed out awaiting driver ready";
return status;
}
property_set(kDriverPropName, "ok");

View File

@@ -534,6 +534,9 @@ WifiNanIface::WifiNanIface(
}
void WifiNanIface::invalidate() {
if (!isValid()) {
return;
}
// send commands to HAL to actually disable and destroy interfaces
legacy_hal_.lock()->nanDisableRequest(ifname_, 0xFFFF);
legacy_hal_.lock()->nanDataInterfaceDelete(ifname_, 0xFFFE, "aware_data0");

View File

@@ -40,16 +40,22 @@ class SupplicantHidlTest
virtual void SetUp() override {
wifi_instance_name_ = std::get<0>(GetParam());
supplicant_instance_name_ = std::get<1>(GetParam());
isP2pOn_ =
testing::deviceSupportsFeature("android.hardware.wifi.direct");
// Stop Framework
std::system("/system/bin/stop");
stopSupplicant(wifi_instance_name_);
startSupplicantAndWaitForHidlService(wifi_instance_name_,
supplicant_instance_name_);
isP2pOn_ =
testing::deviceSupportsFeature("android.hardware.wifi.direct");
supplicant_ = getSupplicant(supplicant_instance_name_, isP2pOn_);
ASSERT_NE(supplicant_.get(), nullptr);
}
virtual void TearDown() override { stopSupplicant(wifi_instance_name_); }
virtual void TearDown() override {
stopSupplicant(wifi_instance_name_);
// Start Framework
std::system("/system/bin/start");
}
protected:
// ISupplicant object used for all tests in this fixture.

View File

@@ -77,11 +77,13 @@ class SupplicantP2pIfaceHidlTest
virtual void SetUp() override {
wifi_instance_name_ = std::get<0>(GetParam());
supplicant_instance_name_ = std::get<1>(GetParam());
isP2pOn_ =
testing::deviceSupportsFeature("android.hardware.wifi.direct");
// Stop Framework
std::system("/system/bin/stop");
stopSupplicant(wifi_instance_name_);
startSupplicantAndWaitForHidlService(wifi_instance_name_,
supplicant_instance_name_);
isP2pOn_ =
testing::deviceSupportsFeature("android.hardware.wifi.direct");
supplicant_ = getSupplicant(supplicant_instance_name_, isP2pOn_);
EXPECT_TRUE(turnOnExcessiveLogging(supplicant_));
p2p_iface_ = getSupplicantP2pIface(supplicant_);
@@ -91,7 +93,11 @@ class SupplicantP2pIfaceHidlTest
memcpy(peer_mac_addr_.data(), kTestPeerMacAddr, peer_mac_addr_.size());
}
virtual void TearDown() override { stopSupplicant(wifi_instance_name_); }
virtual void TearDown() override {
stopSupplicant(wifi_instance_name_);
// Start Framework
std::system("/system/bin/start");
}
protected:
bool isP2pOn_ = false;

View File

@@ -72,11 +72,13 @@ class SupplicantStaIfaceHidlTest
virtual void SetUp() override {
wifi_instance_name_ = std::get<0>(GetParam());
supplicant_instance_name_ = std::get<1>(GetParam());
isP2pOn_ =
testing::deviceSupportsFeature("android.hardware.wifi.direct");
// Stop Framework
std::system("/system/bin/stop");
stopSupplicant(wifi_instance_name_);
startSupplicantAndWaitForHidlService(wifi_instance_name_,
supplicant_instance_name_);
isP2pOn_ =
testing::deviceSupportsFeature("android.hardware.wifi.direct");
supplicant_ = getSupplicant(supplicant_instance_name_, isP2pOn_);
EXPECT_TRUE(turnOnExcessiveLogging(supplicant_));
sta_iface_ = getSupplicantStaIface(supplicant_);
@@ -85,7 +87,11 @@ class SupplicantStaIfaceHidlTest
memcpy(mac_addr_.data(), kTestMacAddr, mac_addr_.size());
}
virtual void TearDown() override { stopSupplicant(wifi_instance_name_); }
virtual void TearDown() override {
stopSupplicant(wifi_instance_name_);
// Start Framework
std::system("/system/bin/start");
}
protected:
bool isP2pOn_ = false;

View File

@@ -85,11 +85,13 @@ class SupplicantStaNetworkHidlTest
virtual void SetUp() override {
wifi_instance_name_ = std::get<0>(GetParam());
supplicant_instance_name_ = std::get<1>(GetParam());
isP2pOn_ =
testing::deviceSupportsFeature("android.hardware.wifi.direct");
// Stop Framework
std::system("/system/bin/stop");
stopSupplicant(wifi_instance_name_);
startSupplicantAndWaitForHidlService(wifi_instance_name_,
supplicant_instance_name_);
isP2pOn_ =
testing::deviceSupportsFeature("android.hardware.wifi.direct");
supplicant_ = getSupplicant(supplicant_instance_name_, isP2pOn_);
EXPECT_TRUE(turnOnExcessiveLogging(supplicant_));
sta_network_ = createSupplicantStaNetwork(supplicant_);
@@ -103,7 +105,11 @@ class SupplicantStaNetworkHidlTest
ssid_.assign(kTestSsidStr, kTestSsidStr + strlen(kTestSsidStr));
}
virtual void TearDown() override { stopSupplicant(wifi_instance_name_); }
virtual void TearDown() override {
stopSupplicant(wifi_instance_name_);
// Start Framework
std::system("/system/bin/start");
}
protected:
void removeNetwork() {

View File

@@ -44,6 +44,8 @@ class SupplicantHidlTestBase
supplicant_v1_1_instance_name_ = std::get<1>(GetParam());
isP2pOn_ =
testing::deviceSupportsFeature("android.hardware.wifi.direct");
// Stop Framework
std::system("/system/bin/stop");
stopSupplicant(wifi_v1_0_instance_name_);
startSupplicantAndWaitForHidlService(wifi_v1_0_instance_name_,
supplicant_v1_1_instance_name_);
@@ -54,6 +56,8 @@ class SupplicantHidlTestBase
virtual void TearDown() override {
stopSupplicant(wifi_v1_0_instance_name_);
// Start Framework
std::system("/system/bin/start");
}
protected:

View File

@@ -50,6 +50,8 @@ class SupplicantHidlTestBase
supplicant_v1_2_instance_name_ = std::get<1>(GetParam());
isP2pOn_ =
testing::deviceSupportsFeature("android.hardware.wifi.direct");
// Stop Framework
std::system("/system/bin/stop");
stopSupplicant(wifi_v1_0_instance_name_);
startSupplicantAndWaitForHidlService(wifi_v1_0_instance_name_,
supplicant_v1_2_instance_name_);
@@ -61,6 +63,8 @@ class SupplicantHidlTestBase
virtual void TearDown() override {
stopSupplicant(wifi_v1_0_instance_name_);
// Start Framework
std::system("/system/bin/start");
}
protected:

View File

@@ -43,7 +43,7 @@ class SupplicantP2pIfaceHidlTest : public SupplicantHidlTestBase {
virtual void SetUp() override {
SupplicantHidlTestBase::SetUp();
EXPECT_TRUE(turnOnExcessiveLogging(supplicant_));
if (!::testing::deviceSupportsFeature("android.hardware.wifi.direct")) {
if (!isP2pOn_) {
GTEST_SKIP() << "Wi-Fi Direct is not supported, skip this test.";
}
p2p_iface_ = getSupplicantP2pIface_1_2(supplicant_);

View File

@@ -63,6 +63,8 @@ class SupplicantStaIfaceHidlTest
supplicant_v1_3_instance_name_ = std::get<1>(GetParam());
isP2pOn_ =
testing::deviceSupportsFeature("android.hardware.wifi.direct");
// Stop Framework
std::system("/system/bin/stop");
stopSupplicant(wifi_v1_0_instance_name_);
startSupplicantAndWaitForHidlService(wifi_v1_0_instance_name_,
@@ -76,6 +78,8 @@ class SupplicantStaIfaceHidlTest
virtual void TearDown() override {
stopSupplicant(wifi_v1_0_instance_name_);
// Start Framework
std::system("/system/bin/start");
}
int64_t pmkCacheExpirationTimeInSec;

View File

@@ -51,6 +51,8 @@ class SupplicantStaNetworkHidlTest
supplicant_v1_3_instance_name_ = std::get<1>(GetParam());
isP2pOn_ =
testing::deviceSupportsFeature("android.hardware.wifi.direct");
// Stop Framework
std::system("/system/bin/stop");
stopSupplicant(wifi_v1_0_instance_name_);
startSupplicantAndWaitForHidlService(wifi_v1_0_instance_name_,
@@ -66,6 +68,8 @@ class SupplicantStaNetworkHidlTest
virtual void TearDown() override {
stopSupplicant(wifi_v1_0_instance_name_);
// Start Framework
std::system("/system/bin/start");
}
protected: