def reset_all(self):
'''
defaults to settings.
accelerometer_rotation on
airplane_mode_off
user_rotation POTRAIT
'''
self.set_accelerometer_rotation(False)
self.set_user_rotation(UserRotation.ROTATION_POTRAIT)
self.set_accelerometer_rotation(True)
# def adb_start_server_safe(self):
# '''
# checks if `adb server` is running. if not, starts it.
# '''
# try:
# status = subprocess.check_output(['pidof', ADB])
# print('adb already running in PID: ' + status.decode())
# return True
# except subprocess.CalledProcessError as exception:
# print('adb is not running, returned status: ' +
# str(exception.returncode))
# print('adb was not started. starting...')
# try:
# subprocess.check_output([ADB, 'start-server'])
# return True
# except subprocess.SubprocessError as exception:
# print('something disastrous happened. maybe ' +
# ADB + ' was not found')
# return False
评论列表
文章目录