Lines Matching refs:ad
505 def sync_device_time(ad): argument
513 droid = ad.droid
592 def force_airplane_mode(ad, new_state, timeout_value=60): argument
609 def wait_for_device_with_timeout(ad): argument
610 ad.adb.wait_for_device()
613 wait_for_device_with_timeout(ad)
614 ad.adb.shell("settings put global airplane_mode_on {}".format(
622 def enable_doze(ad): argument
632 ad.adb.shell("dumpsys battery unplug")
633 ad.adb.shell("dumpsys deviceidle enable")
634 if (ad.adb.shell("dumpsys deviceidle force-idle") !=
637 ad.droid.goToSleepNow()
639 adb_shell_result = ad.adb.shell("dumpsys deviceidle step")
645 ad.adb.shell("dumpsys battery").decode('utf-8'),
646 ad.adb.shell("dumpsys deviceidle").decode('utf-8')))
652 def disable_doze(ad): argument
662 ad.adb.shell("dumpsys deviceidle disable")
663 ad.adb.shell("dumpsys battery reset")
664 adb_shell_result = ad.adb.shell("dumpsys deviceidle step")
669 ad.adb.shell("dumpsys battery").decode('utf-8'),
670 ad.adb.shell("dumpsys deviceidle").decode('utf-8')))
676 def set_ambient_display(ad, new_state): argument
683 ad.adb.shell("settings put secure doze_enabled {}".format(1 if new_state
687 def set_adaptive_brightness(ad, new_state): argument
694 ad.adb.shell("settings put system screen_brightness_mode {}".format(
698 def set_auto_rotate(ad, new_state): argument
705 ad.adb.shell("settings put system accelerometer_rotation {}".format(
709 def set_location_service(ad, new_state): argument
719 ad.adb.shell("settings put secure location_providers_allowed +gps")
720 ad.adb.shell("settings put secure location_providers_allowed +network")
722 ad.adb.shell("settings put secure location_providers_allowed -gps")
723 ad.adb.shell("settings put secure location_providers_allowed -network")
726 def set_mobile_data_always_on(ad, new_state): argument
735 ad.adb.shell("settings put global mobile_data_always_on {}".format(