1#!/usr/bin/env python3 2# 3# Copyright (C) 2016 The Android Open Source Project 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); you may not 6# use this file except in compliance with the License. You may obtain a copy of 7# the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14# License for the specific language governing permissions and limitations under 15# the License. 16 17from acts import base_test 18from acts.controllers import native_android_device 19 20class WifiNativeTest(base_test.BaseTestClass): 21 22 def setup_class(self): 23 self.native_devices = self.register_controller(native_android_device) 24 self.dut = self.native_devices[0] 25 26 def setup_test(self): 27# TODO: uncomment once wifi_toggle_state (or alternative) 28# work with sl4n 29# assert wutils.wifi_toggle_state(self.device, True) 30 return self.dut.droid.WifiInit() 31 32# TODO: uncomment once wifi_toggle_state (or alternative) 33# work with sl4n 34# def teardown_test(self): 35# assert wutils.wifi_toggle_state(self.device, False) 36 37 def test_hal_get_features(self): 38 result = self.dut.droid.WifiGetSupportedFeatureSet() 39 self.log.info("Wi-Fi feature set: %d", result) 40