diff options
author | Siva Velusamy <vsiva@google.com> | 2012-06-01 15:11:45 -0700 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2012-06-01 15:57:18 -0700 |
commit | 605b78a0a192876b5f3b437be82cf10cef18dae2 (patch) | |
tree | 26f927261581f5d78e8a039835cc3f91423e9a82 | |
parent | 55121851dcb45f8474c2e895eb14cc8974045c86 (diff) | |
download | sdk-605b78a0a192876b5f3b437be82cf10cef18dae2.zip sdk-605b78a0a192876b5f3b437be82cf10cef18dae2.tar.gz sdk-605b78a0a192876b5f3b437be82cf10cef18dae2.tar.bz2 |
gltrace: Add a special keyword to not launch any activities.
This is a hack to allow tracing of processes like surfaceflinger.
Change-Id: I4b542ac95487ed2488796944c98d2d317c3ee428
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/CollectTraceAction.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/CollectTraceAction.java b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/CollectTraceAction.java index 2b07680..8e5e333 100644 --- a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/CollectTraceAction.java +++ b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/CollectTraceAction.java @@ -44,11 +44,14 @@ import java.util.concurrent.Semaphore; public class CollectTraceAction implements IWorkbenchWindowActionDelegate { /** Abstract Unix Domain Socket Name used by the gltrace device code. */ - private static final String GLTRACE_UDS = "gltrace"; + private static final String GLTRACE_UDS = "gltrace"; //$NON-NLS-1$ /** Local port that is forwarded to the device's {@link #GLTRACE_UDS} socket. */ private static final int LOCAL_FORWARDED_PORT = 6039; + /** Activity name to use for a system activity that has already been launched. */ + private static final String SYSTEM_APP = "system"; //$NON-NLS-1$ + @Override public void run(IAction action) { connectToDevice(); @@ -84,7 +87,9 @@ public class CollectTraceAction implements IWorkbenchWindowActionDelegate { } try { - startActivity(device, traceOptions.activityToTrace); + if (!SYSTEM_APP.equals(traceOptions.activityToTrace)) { + startActivity(device, traceOptions.activityToTrace); + } } catch (Exception e) { MessageDialog.openError(shell, "Setup GL Trace", "Error while launching application: " + e.getMessage()); |