def update(self, get_running_apps=True):
<EOL>screen_on, awake, wake_lock_size, _current_app, running_apps = self.get_properties(get_running_apps=get_running_apps, lazy=True)<EOL>if not screen_on:<EOL><INDENT>state = STATE_OFF<EOL>current_app = None<EOL>running_apps = None<EOL><DEDENT>elif not awake:<EOL><INDENT>state = STATE_IDLE<EOL>current_app = None<EOL>running_apps = None<EOL><DEDENT>else:<EOL><INDENT>if isinstance(_current_app, dict) and '<STR_LIT>' in _current_app:<EOL><INDENT>current_app = _current_app['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>current_app = None<EOL><DEDENT>if running_apps is None and current_app:<EOL><INDENT>running_apps = [current_app]<EOL><DEDENT>if current_app in [PACKAGE_LAUNCHER, PACKAGE_SETTINGS]:<EOL><INDENT>state = STATE_STANDBY<EOL><DEDENT>elif current_app == AMAZON_VIDEO:<EOL><INDENT>if wake_lock_size == <NUM_LIT:5>:<EOL><INDENT>state = STATE_PLAYING<EOL><DEDENT>else:<EOL><INDENT>state = STATE_PAUSED<EOL><DEDENT><DEDENT>elif current_app == NETFLIX:<EOL><INDENT>if wake_lock_size > <NUM_LIT:3>:<EOL><INDENT>state = STATE_PLAYING<EOL><DEDENT>else:<EOL><INDENT>state = STATE_PAUSED<EOL><DEDENT><DEDENT>elif wake_lock_size == <NUM_LIT:1>:<EOL><INDENT>state = STATE_PLAYING<EOL><DEDENT>else:<EOL><INDENT>state = STATE_PAUSED<EOL><DEDENT><DEDENT>return state, current_app, running_apps<EOL>
Get the state of the device, the current app, and the running apps.

        :param get_running_apps: whether or not to get the ``running_apps`` property
        :return state: the state of the device
        :return current_app: the current app
        :return running_apps: the running apps