diff options
author | kkinnunen <kkinnunen@nvidia.com> | 2016-01-14 11:54:13 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-14 11:54:13 -0800 |
commit | 721772ec49d45e3c4b72fb141b6ad7b228356302 (patch) | |
tree | 6caa256f8e6d655010c066c1f1cd6a7866450d41 | |
parent | f074e707491e4e80f971e52c84d4f3e294564edb (diff) |
VisualBench: Make the Android SDL app start without cmdline arguments
Make the Android SDL VisualBench start even if it is started without
command-line arguments.
Also makes it start when started by pressing the icon.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1573913008
Review URL: https://codereview.chromium.org/1573913008
-rw-r--r-- | platform_tools/android/apps/visualbenchsdl/src/main/java/com/skia/VisualBenchActivity.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/platform_tools/android/apps/visualbenchsdl/src/main/java/com/skia/VisualBenchActivity.java b/platform_tools/android/apps/visualbenchsdl/src/main/java/com/skia/VisualBenchActivity.java index f54b7d9746..894a9b3391 100644 --- a/platform_tools/android/apps/visualbenchsdl/src/main/java/com/skia/VisualBenchActivity.java +++ b/platform_tools/android/apps/visualbenchsdl/src/main/java/com/skia/VisualBenchActivity.java @@ -13,10 +13,10 @@ import android.content.Intent; public class VisualBenchActivity extends SDLActivity { protected String[] getArguments() { - // intent get intent extras if triggered from the command line - Intent intent = this.getIntent(); - String flags = intent.getStringExtra("cmdLineFlags"); - - return flags.split("\\s+"); + String flags = this.getIntent().getStringExtra("cmdLineFlags"); + if (flags != null && !flags.isEmpty()) { + return flags.split("\\s+"); + } + return new String[0]; } } |