parameters: (self, timeout=None, retries=None)
return_statement: return check_value in dumpsys_out[0]
docstring: Determines if screen is on.
  
      Dumpsys input_method exposes screen on/off state. Below is an explination of
      the states.
  
      Pre-L:
        On: mScreenOn=true
        Off: mScreenOn=false
      L+:
        On: mInteractive=true
        Off: mInteractive=false
  
      Returns:
        True if screen is on, false if it is off.
  
      Raises:
        device_errors.CommandFailedError: If screen state cannot be found.
docstring_summary: Determines if screen is on.
docstring_tokens: Determines if screen is on .
function: def IsScreenOn(self, timeout=None, retries=None):
      """Determines if screen is on.
  
      Dumpsys input_method exposes screen on/off state. Below is an explination of
      the states.
  
      Pre-L:
        On: mScreenOn=true
        Off: mScreenOn=false
      L+:
        On: mInteractive=true
        Off: mInteractive=false
  
      Returns:
        True if screen is on, false if it is off.
  
      Raises:
        device_errors.CommandFailedError: If screen state cannot be found.
      """
      if self.build_version_sdk < version_codes.LOLLIPOP:
        input_check = 'mScreenOn'
        check_value = 'mScreenOn=true'
      else:
        input_check = 'mInteractive'
        check_value = 'mInteractive=true'
      dumpsys_out = self._RunPipedShellCommand(
          'dumpsys input_method | grep %s' % input_check)
      if not dumpsys_out:
        raise device_errors.CommandFailedError(
            'Unable to detect screen state', str(self))
      return check_value in dumpsys_out[0]
function_tokens: def IsScreenOn ( self , timeout = None , retries = None ) : if self . build_version_sdk < version_codes . LOLLIPOP : input_check = 'mScreenOn' check_value = 'mScreenOn=true' else : input_check = 'mInteractive' check_value = 'mInteractive=true' dumpsys_out = self . _RunPipedShellCommand ( 'dumpsys input_method | grep %s' % input_check ) if not dumpsys_out : raise device_errors . CommandFailedError ( 'Unable to detect screen state' , str ( self ) ) return check_value in dumpsys_out [ 0 ]