def isScreenOn(self):
        """
        Checks if the screen is ON.

        @return: True if the device screen is ON
        """

        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")
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" )
Checks if the screen is ON.

        @return: True if the device screen is ON