code: def getWifiState(self):
          '''
          Gets the Wi-Fi enabled state.
  
          @return: One of WIFI_STATE_DISABLED, WIFI_STATE_DISABLING, WIFI_STATE_ENABLED, WIFI_STATE_ENABLING, WIFI_STATE_UNKNOWN
          '''
  
          result = self.device.shell('dumpsys wifi')
          if result:
              state = result.splitlines()[0]
              if self.WIFI_IS_ENABLED_RE.match(state):
                  return self.WIFI_STATE_ENABLED
              elif self.WIFI_IS_DISABLED_RE.match(state):
                  return self.WIFI_STATE_DISABLED
          print >> sys.stderr, "UNKNOWN WIFI STATE:", state
          return self.WIFI_STATE_UNKNOWf getWifiState(self):
          '''
          Gets the Wi-Fi enabled state.
  
          @return: One of WIFI_STATE_DISABLED, WIFI_STATE_DISABLING, WIFI_STATE_ENABLED, WIFI_STATE_ENABLING, WIFI_STATE_UNKNOWN
          '''
  
          result = self.device.shell('dumpsys wifi')
          if result:
              state = result.splitlines()[0]
              if self.WIFI_IS_ENABLED_RE.match(state):
                  return self.WIFI_STATE_ENABLED
              elif self.WIFI_IS_DISABLED_RE.match(state):
                  return self.WIFI_STATE_DISABLED
          print >> sys.stderr, "UNKNOWN WIFI STATE:", state
          return self.WIFI_STATE_UNKNOWN
docs: Gets the Wi-Fi enabled state.
  
          @return: One of WIFI_STATE_DISABLED, WIFI_STATE_DISABLING, WIFI_STATE_ENABLED, WIFI_STATE_ENABLING, WIFI_STATE_UNKNOWN