| Index: platform_tools/android/bin/adb_wait_for_charge
|
| diff --git a/platform_tools/android/bin/adb_wait_for_device b/platform_tools/android/bin/adb_wait_for_charge
|
| similarity index 86%
|
| copy from platform_tools/android/bin/adb_wait_for_device
|
| copy to platform_tools/android/bin/adb_wait_for_charge
|
| index a1f8c1645e1b2053b5370ed3fdf51f5348425a02..43e70bcf69e074ad03a86f290e07bd98c11ec1bb 100755
|
| --- a/platform_tools/android/bin/adb_wait_for_device
|
| +++ b/platform_tools/android/bin/adb_wait_for_charge
|
| @@ -1,6 +1,6 @@
|
| #!/bin/bash
|
| #
|
| -# Wait for the device to be ready to run tests.
|
| +# Wait for the device to be charged enough for testing.
|
|
|
| SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
| source $SCRIPT_DIR/android_setup.sh
|
| @@ -63,14 +63,6 @@ function get_battery_level {
|
| echo "0"
|
| }
|
|
|
| -set -e
|
| -
|
| -# Wait for the device to be connected and fully booted.
|
| -while [ "$($ADB $DEVICE_SERIAL shell getprop sys.boot_completed | tr -d '\r')" != "1" ]; do
|
| - echo "Waiting for the device to be connected and ready."
|
| - sleep 5
|
| -done
|
| -
|
| # Wait for battery charge.
|
| DESIRED_BATTERY_LEVEL=80
|
| CURRENT_BATTERY_LEVEL="$(get_battery_level)"
|
| @@ -80,4 +72,4 @@ while [ "${CURRENT_BATTERY_LEVEL}" -lt "${DESIRED_BATTERY_LEVEL}" ]; do
|
| CURRENT_BATTERY_LEVEL="$(get_battery_level)"
|
| done
|
|
|
| -echo "Ready!"
|
| +echo "Charged!"
|
|
|