aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandros Frantzis <alexandros.frantzis@linaro.org>2012-08-13 13:10:52 +0300
committerAlexandros Frantzis <alexandros.frantzis@linaro.org>2012-08-13 13:10:52 +0300
commitab5e6cfeb163f03023707a26312a6c3f2b5e5f7e (patch)
treed4bdd259936e4f551bea351d0525616519a7b734
parent1c351ff4a501fee1fce3e7d2897372e0e55f607f (diff)
downloadglmark2-ab5e6cfeb163f03023707a26312a6c3f2b5e5f7e.tar.gz
Android: Properly handle spaces in extra intent options.
Surround the benchmark text definitions in quotes to ensure spaces are properly handled. This leverages the recently introduced (rev 244) Util::split() support for bash-like quoting rules.
-rw-r--r--android/src/org/linaro/glmark2/EditorActivity.java2
-rw-r--r--android/src/org/linaro/glmark2/MainActivity.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/android/src/org/linaro/glmark2/EditorActivity.java b/android/src/org/linaro/glmark2/EditorActivity.java
index 834c915..47e88c8 100644
--- a/android/src/org/linaro/glmark2/EditorActivity.java
+++ b/android/src/org/linaro/glmark2/EditorActivity.java
@@ -88,7 +88,7 @@ public class EditorActivity extends Activity {
runButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(EditorActivity.this, Glmark2Activity.class);
- String args = "-b " + getBenchmarkDescriptionText();
+ String args = "-b \"" + getBenchmarkDescriptionText() + "\"";
intent.putExtra("args", args);
startActivity(intent);
}
diff --git a/android/src/org/linaro/glmark2/MainActivity.java b/android/src/org/linaro/glmark2/MainActivity.java
index 36e3203..8e284b2 100644
--- a/android/src/org/linaro/glmark2/MainActivity.java
+++ b/android/src/org/linaro/glmark2/MainActivity.java
@@ -323,7 +323,7 @@ public class MainActivity extends Activity {
Intent intent = new Intent(MainActivity.this, Glmark2Activity.class);
String args = "";
for (int i = 0; i < benchmarks.size() - 1; i++)
- args += "-b " + benchmarks.get(i) + " ";
+ args += "-b \"" + benchmarks.get(i) + "\" ";
if (prefs.getBoolean("run_forever", false))
args += "--run-forever ";
if (prefs.getBoolean("log_debug", false))