Skip to content

Commit

Permalink
Merge pull request flutter#2133 from eseidelGoogle/trace_startup
Browse files Browse the repository at this point in the history
Add support on Android for --trace-startup
  • Loading branch information
eseidelGoogle committed Dec 3, 2015
2 parents fff4d5b + 231ee08 commit 2815330
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sky/shell/platform/android/org/domokit/sky/shell/SkyActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.domokit.activity.ActivityImpl;

import java.io.File;
import java.util.ArrayList;

/**
* Base class for activities that use Sky.
Expand All @@ -31,9 +32,16 @@ private String[] getArgsFromIntent(Intent intent) {
// Before adding more entries to this list, consider that arbitrary
// Android applications can generate intents with extra data and that
// there are many security-sensitive args in the binary.
ArrayList<String> args = new ArrayList<String>();
if (intent.getBooleanExtra("enable-checked-mode", false)) {
String[] args = { "--enable-checked-mode"};
return args;
args.add("--enable-checked-mode");
}
if (intent.getBooleanExtra("trace-startup", false)) {
args.add("--trace-startup");
}
if (!args.isEmpty()) {
String[] argsArray = new String[args.size()];
return args.toArray(argsArray);
}
return null;
}
Expand Down
1 change: 1 addition & 0 deletions sky/shell/switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ void PrintUsage(const std::string& executable_name) {
std::cerr << "Usage: " << executable_name
<< " --" << kEnableCheckedMode
<< " --" << kNonInteractive
<< " --" << kTraceStartup
<< " --" << kFLX << "=FLX"
<< " --" << kPackageRoot << "=PACKAGE_ROOT"
<< " [ MAIN_DART ]" << std::endl;
Expand Down

0 comments on commit 2815330

Please sign in to comment.