Fix for android command line arguments to VisualBench
authorjoshualitt <joshualitt@chromium.org>
Wed, 15 Jul 2015 17:17:20 +0000 (10:17 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 15 Jul 2015 17:17:21 +0000 (10:17 -0700)
BUG=skia:

Review URL: https://codereview.chromium.org/1241923002

platform_tools/android/bin/android_launch_app
platform_tools/android/visualbench/jni/main.cpp

index 53b00e902312e6a5ccfbb7c2829fb76d8c81d855..3eddf3547e29efba4df2d4df48ce1d38237f88dd 100755 (executable)
@@ -21,7 +21,7 @@ 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}"
+    $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
index 3d7ceab9eb63a6a7f5ca651c75a213a52ee64895..2ea6b76b39220cf003f3c82a31d740c368ed67ea 100644 (file)
@@ -90,7 +90,6 @@ void android_main(struct android_app* state) {
                                                       env->NewStringUTF("cmdLineFlags"));
     if (jsParam1) {
         const char* flags = env->GetStringUTFChars(jsParam1, 0);
-        SkTArray<SkString> flagEntries;
         SkStrSplit(flags, " ", &visualBenchState.fFlags);
         env->ReleaseStringUTFChars(jsParam1, flags);
     }