code: def isScreenOn(self):
          
  
          self.__checkTransport()
          screenOnRE = re.compile('mScreenOnFully=(true|false)')
          m = screenOnRE.search(self.shell('dumpsys window policy'))
          if m:
              return m.group(1) == 'true'
          raise RuntimeError("Couldn't determine screen ON state")
docs: Checks if the screen is ON.
  
          @return: True if the device screen is ON