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 d31e5cb35048458b27834a7d96b061349bb03501..53b00e902312e6a5ccfbb7c2829fb76d8c81d855 100755 |
--- a/platform_tools/android/bin/android_launch_app |
+++ b/platform_tools/android/bin/android_launch_app |
@@ -12,5 +12,17 @@ if [[ -n $RESOURCE_PATH ]]; then |
adb_push_if_needed "${SKIA_SRC_DIR}/resources" $RESOURCE_PATH |
fi |
-$ADB ${DEVICE_SERIAL} shell am start -S -n "com.skia/.SkiaSampleActivity" --es "cmdLineFlags" "${APP_ARGS[*]}" |
+app=${APP_ARGS[0]} |
+if [[ ${app} == '-'* ]]; then |
+ app="SampleApp" |
+ APP_ARGS=( "SampleApp" ${APP_ARGS[*]} ) |
+fi |
+ |
+if [[ ${app} == 'SampleApp' ]]; then |
+ $ADB ${DEVICE_SERIAL} shell am start -S -n "com.skia/.SkiaSampleActivity" --es "cmdLineFlags" "${APP_ARGS[*]:1}" |
+elif [[ ${app} == "VisualBench" ]] ; then |
+ $ADB ${DEVICE_SERIAL} shell am start -S -n "com.skia/.VisualBenchActivity" --es "cmdLineFlags" "${APP_ARGS[*]:1}" |
+else |
+ echo "ERROR: supports either 'SampleApp' or 'VisualBench' as valid apps" |
+fi |