This commit is contained in:
Valere
2019-06-19 10:46:59 +02:00
committed by Benoit Marty
parent 79735c6338
commit 0e46fc4c0a
112 changed files with 3957 additions and 249 deletions

10
tools/tests/app_standby_off.sh Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Ref: https://developer.android.com/training/monitoring-device-state/doze-standby#testing_your_app_with_app_standby
echo "Standby OFF"
echo "adb shell dumpsys battery reset"
adb shell dumpsys battery reset
echo "adb shell am set-inactive im.vector.riotredesign false"
adb shell am set-inactive im.vector.riotredesign false

10
tools/tests/app_standby_on.sh Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Ref: https://developer.android.com/training/monitoring-device-state/doze-standby#testing_your_app_with_app_standby
echo "Standby ON"
echo "adb shell dumpsys battery unplug"
adb shell dumpsys battery unplug
echo "adb shell am set-inactive im.vector.riotredesign true"
adb shell am set-inactive im.vector.riotredesign true

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Ref: https://developer.android.com/training/monitoring-device-state/doze-standby#testing_doze
echo "Exit doze mode"
echo "shell dumpsys deviceidle unforce"
adb shell dumpsys deviceidle unforce
echo "Reactivate device"
echo "shell dumpsys battery reset"
adb shell dumpsys battery reset

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Ref: https://developer.android.com/training/monitoring-device-state/doze-standby#testing_doze
echo "Enable doze mode"
echo "adb shell dumpsys deviceidle force-idle"
adb shell dumpsys deviceidle force-idle