diff options
| author | Siva Velusamy <vsiva@google.com> | 2012-03-09 16:24:04 -0800 |
|---|---|---|
| committer | Siva Velusamy <vsiva@google.com> | 2012-03-12 12:18:53 -0700 |
| commit | 92a8b22e7410e74e1cba1b856333116652af8a5c (patch) | |
| tree | fd340b33bdcf7d2b5f84d9f9454a5805efff54b6 /core/java/android/app/ActivityManagerNative.java | |
| parent | 64d10a1da0a702ffeb086ad9c4a632f2712f1dad (diff) | |
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 'core/java/android/app/ActivityManagerNative.java')
| -rw-r--r-- | core/java/android/app/ActivityManagerNative.java | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java index b95264993032..7daaf7da88e9 100644 --- a/core/java/android/app/ActivityManagerNative.java +++ b/core/java/android/app/ActivityManagerNative.java @@ -120,17 +120,19 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM Uri[] grantedUriPermissions = data.createTypedArray(Uri.CREATOR); int grantedMode = data.readInt(); IBinder resultTo = data.readStrongBinder(); - String resultWho = data.readString(); + String resultWho = data.readString(); int requestCode = data.readInt(); boolean onlyIfNeeded = data.readInt() != 0; boolean debug = data.readInt() != 0; + boolean openglTrace = data.readInt() != 0; String profileFile = data.readString(); ParcelFileDescriptor profileFd = data.readInt() != 0 ? data.readFileDescriptor() : null; boolean autoStopProfiler = data.readInt() != 0; int result = startActivity(app, intent, resolvedType, grantedUriPermissions, grantedMode, resultTo, resultWho, - requestCode, onlyIfNeeded, debug, profileFile, profileFd, autoStopProfiler); + requestCode, onlyIfNeeded, debug, openglTrace, + profileFile, profileFd, autoStopProfiler); reply.writeNoException(); reply.writeInt(result); return true; @@ -146,17 +148,19 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM Uri[] grantedUriPermissions = data.createTypedArray(Uri.CREATOR); int grantedMode = data.readInt(); IBinder resultTo = data.readStrongBinder(); - String resultWho = data.readString(); + String resultWho = data.readString(); int requestCode = data.readInt(); boolean onlyIfNeeded = data.readInt() != 0; boolean debug = data.readInt() != 0; + boolean openglTrace = data.readInt() != 0; String profileFile = data.readString(); ParcelFileDescriptor profileFd = data.readInt() != 0 ? data.readFileDescriptor() : null; boolean autoStopProfiler = data.readInt() != 0; WaitResult result = startActivityAndWait(app, intent, resolvedType, grantedUriPermissions, grantedMode, resultTo, resultWho, - requestCode, onlyIfNeeded, debug, profileFile, profileFd, autoStopProfiler); + requestCode, onlyIfNeeded, debug, openglTrace, + profileFile, profileFd, autoStopProfiler); reply.writeNoException(); result.writeToParcel(reply, 0); return true; @@ -1607,17 +1611,17 @@ class ActivityManagerProxy implements IActivityManager { mRemote = remote; } - + public IBinder asBinder() { return mRemote; } - + public int startActivity(IApplicationThread caller, Intent intent, String resolvedType, Uri[] grantedUriPermissions, int grantedMode, IBinder resultTo, String resultWho, int requestCode, boolean onlyIfNeeded, - boolean debug, String profileFile, ParcelFileDescriptor profileFd, + boolean debug, boolean openglTrace, String profileFile, ParcelFileDescriptor profileFd, boolean autoStopProfiler) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); @@ -1632,6 +1636,7 @@ class ActivityManagerProxy implements IActivityManager data.writeInt(requestCode); data.writeInt(onlyIfNeeded ? 1 : 0); data.writeInt(debug ? 1 : 0); + data.writeInt(openglTrace ? 1 : 0); data.writeString(profileFile); if (profileFd != null) { data.writeInt(1); @@ -1651,7 +1656,7 @@ class ActivityManagerProxy implements IActivityManager String resolvedType, Uri[] grantedUriPermissions, int grantedMode, IBinder resultTo, String resultWho, int requestCode, boolean onlyIfNeeded, - boolean debug, String profileFile, ParcelFileDescriptor profileFd, + boolean debug, boolean openglTrace, String profileFile, ParcelFileDescriptor profileFd, boolean autoStopProfiler) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); @@ -1666,6 +1671,7 @@ class ActivityManagerProxy implements IActivityManager data.writeInt(requestCode); data.writeInt(onlyIfNeeded ? 1 : 0); data.writeInt(debug ? 1 : 0); + data.writeInt(openglTrace ? 1 : 0); data.writeString(profileFile); if (profileFd != null) { data.writeInt(1); |
