1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-14 14:48:53 +00:00

Add method to check wifi access on device

Method to ascertain if wifi connectivity is enabled on the device. Uses
grep and dumpsys. Returns exit code.
This commit is contained in:
John Richardson 2016-05-04 16:47:14 +01:00
parent 4dce709cd1
commit f3d7d6167a

View File

@ -649,6 +649,10 @@ class AndroidDevice(BaseLinuxDevice): # pylint: disable=W0223
except KeyError:
return None
def is_wifi_connected(self):
self.logger.debug('Checking for wi-fi connectivity.')
return self.execute('dumpsys wifi| grep curState=ConnectedState')
# Internal methods: do not use outside of the class.
def _update_build_properties(self, filepath, props):