Index: platform_tools/android/bin/adb_wait_for_charge |
diff --git a/platform_tools/android/bin/adb_wait_for_charge b/platform_tools/android/bin/adb_wait_for_charge |
index e24773aedaad18bbde976b4d589935a7630598fb..f05c44f4557b75843ea4a72bb62371fd91df9738 100755 |
--- a/platform_tools/android/bin/adb_wait_for_charge |
+++ b/platform_tools/android/bin/adb_wait_for_charge |
@@ -54,7 +54,7 @@ function get_battery_level { |
STATS="$($ADB $DEVICE_SERIAL shell dumpsys battery)" |
SPLIT=( $STATS ) |
RV="$(_parse_battery_level ${SPLIT[@]})" |
- if [ "$RV" != "-1" ]; then |
+ if [ -n "$RV" ] && [ "$RV" != "-1" ]; then |
echo "$RV" |
return |
fi |