From 605b78a0a192876b5f3b437be82cf10cef18dae2 Mon Sep 17 00:00:00 2001 From: Siva Velusamy Date: Fri, 1 Jun 2012 15:11:45 -0700 Subject: gltrace: Add a special keyword to not launch any activities. This is a hack to allow tracing of processes like surfaceflinger. Change-Id: I4b542ac95487ed2488796944c98d2d317c3ee428 --- .../src/com/android/ide/eclipse/gltrace/CollectTraceAction.java | 9 +++++++-- 1 file 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()); -- cgit v1.1