Index: platform_tools/android/bin/android_launch_app |
diff --git a/platform_tools/android/bin/android_launch_app b/platform_tools/android/bin/android_launch_app |
index 1d4bc4695abdf94bc7731e7999696f98473db05f..e5fd54c96a411db63241820770bfc30f50d2161a 100755 |
--- a/platform_tools/android/bin/android_launch_app |
+++ b/platform_tools/android/bin/android_launch_app |
@@ -14,15 +14,17 @@ fi |
app=${APP_ARGS[0]} |
if [[ ${app} == '-'* ]]; then |
+ echo "Defaulting to running SampleApp." |
app="SampleApp" |
APP_ARGS=( "SampleApp" ${APP_ARGS[*]} ) |
fi |
if [[ ${app} == 'SampleApp' ]]; then |
- $ADB ${DEVICE_SERIAL} shell am start -S -n "com.skia.sampleapp/com.skia.SkiaSampleActivity" --es "cmdLineFlags" "${APP_ARGS[*]:1}" |
+ activity="com.skia.sample_app/com.skia.SkiaSampleActivity" |
elif [[ ${app} == "VisualBench" ]] ; then |
- $ADB ${DEVICE_SERIAL} shell am start -S -n "com.skia.visualbench/com.skia.VisualBenchActivity" --es "cmdLineFlags" \"${APP_ARGS[*]:1}\" |
+ activity="com.skia.visualbench/com.skia.VisualBenchActivity" |
else |
echo "ERROR: supports either 'SampleApp' or 'VisualBench' as valid apps" |
+ exit 1 |
fi |
- |
+$ADB ${DEVICE_SERIAL} shell "am start -S -n ${activity} --es cmdLineFlags \"${APP_ARGS[*]:1}\"" |