diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 245: Android: Properly handle spaces in extra intent options.

Message ID 20120813105017.1482.53798.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

alexandros.frantzis@linaro.org Aug. 13, 2012, 10:50 a.m. UTC
------------------------------------------------------------
revno: 245
fixes bug: https://launchpad.net/bugs/1031780
committer: Alexandros Frantzis <alexandros.frantzis@linaro.org>
branch nick: trunk
timestamp: Mon 2012-08-13 13:10:52 +0300
message:
  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.
modified:
  android/src/org/linaro/glmark2/EditorActivity.java
  android/src/org/linaro/glmark2/MainActivity.java


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'android/src/org/linaro/glmark2/EditorActivity.java'
--- android/src/org/linaro/glmark2/EditorActivity.java	2012-07-18 16:10:51 +0000
+++ android/src/org/linaro/glmark2/EditorActivity.java	2012-08-13 10:10:52 +0000
@@ -88,7 +88,7 @@ 
         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);
             }

=== modified file 'android/src/org/linaro/glmark2/MainActivity.java'
--- android/src/org/linaro/glmark2/MainActivity.java	2012-07-31 10:35:18 +0000
+++ android/src/org/linaro/glmark2/MainActivity.java	2012-08-13 10:10:52 +0000
@@ -323,7 +323,7 @@ 
                 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))