summaryrefslogtreecommitdiffstats
path: root/cmds/am/src
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2012-03-09 16:24:04 -0800
committerSiva Velusamy <vsiva@google.com>2012-03-12 12:18:53 -0700
commit92a8b22e7410e74e1cba1b856333116652af8a5c (patch)
treefd340b33bdcf7d2b5f84d9f9454a5805efff54b6 /cmds/am/src
parent64d10a1da0a702ffeb086ad9c4a632f2712f1dad (diff)
downloadframeworks_base-92a8b22e7410e74e1cba1b856333116652af8a5c.zip
frameworks_base-92a8b22e7410e74e1cba1b856333116652af8a5c.tar.gz
frameworks_base-92a8b22e7410e74e1cba1b856333116652af8a5c.tar.bz2
ActivityManager: add option to allow OpenGL trace.
This patch adds an option to enable tracing of OpenGL functions. OpenGL tracing can be enabled by passing "--opengl-trace" option to am start. This option requires either a device in debug mode, or that the application itself has debug permission set. Change-Id: I77788bfe97c9108943b1f947ce81afe8293d78a0
Diffstat (limited to 'cmds/am/src')
-rw-r--r--cmds/am/src/com/android/commands/am/Am.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index 901f7c7..da38df1 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -61,6 +61,8 @@ public class Am {
private boolean mWaitOption = false;
private boolean mStopOption = false;
+ private boolean mOpenglTraceOption = false;
+
private int mRepeat = 0;
private String mProfileFile;
@@ -151,6 +153,7 @@ public class Am {
mDebugOption = false;
mWaitOption = false;
mStopOption = false;
+ mOpenglTraceOption = false;
mRepeat = 0;
mProfileFile = null;
Uri data = null;
@@ -307,6 +310,8 @@ public class Am {
mRepeat = Integer.parseInt(nextArgRequired());
} else if (opt.equals("-S")) {
mStopOption = true;
+ } else if (opt.equals("--opengl-trace")) {
+ mOpenglTraceOption = true;
} else {
System.err.println("Error: Unknown option: " + opt);
showUsage();
@@ -440,17 +445,19 @@ public class Am {
return;
}
}
-
+
IActivityManager.WaitResult result = null;
int res;
if (mWaitOption) {
result = mAm.startActivityAndWait(null, intent, mimeType,
- null, 0, null, null, 0, false, mDebugOption,
+ null, 0, null, null, 0, false,
+ mDebugOption, mOpenglTraceOption,
mProfileFile, fd, mProfileAutoStop);
res = result.result;
} else {
res = mAm.startActivity(null, intent, mimeType,
- null, 0, null, null, 0, false, mDebugOption,
+ null, 0, null, null, 0, false,
+ mDebugOption, mOpenglTraceOption,
mProfileFile, fd, mProfileAutoStop);
}
PrintStream out = mWaitOption ? System.out : System.err;
@@ -1277,7 +1284,7 @@ public class Am {
System.err.println(
"usage: am [subcommand] [options]\n" +
"usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]\n" +
- " [--R COUNT] [-S] <INTENT>\n" +
+ " [--R COUNT] [-S] [--opengl-trace] <INTENT>\n" +
" am startservice <INTENT>\n" +
" am force-stop <PACKAGE>\n" +
" am kill <PACKAGE>\n" +
@@ -1304,6 +1311,7 @@ public class Am {
" -R: repeat the activity launch <COUNT> times. Prior to each repeat,\n" +
" the top activity will be finished.\n" +
" -S: force stop the target app before starting the activity\n" +
+ " --opengl-trace: enable tracing of OpenGL functions\n" +
"\n" +
"am startservice: start a Service.\n" +
"\n" +