From 02758a9a80ab82154aa172ef1a0138f4c1d6e9bd Mon Sep 17 00:00:00 2001 From: Leonard Mosescu Date: Thu, 6 Oct 2016 17:32:05 -0700 Subject: Adding "attach-agent" to ActivityManagerShellCommand This new command is used to attach runtime agents to a running application: attach-agent Attach an agent to the specified , which may be either a process name or a PID. Test: m test-art-host, manual testing: . invalid syntax, missing arguments . invalid syntax, extra arguments . invalid numeric PID . invalid process name . valid process, not debuggable . valid process, missing agent . valid process, valid agent Bug: 31682382 Change-Id: I61cc8bf20addb1702acc8e7aae65b2f9ed7c5ca0 Merged-In: Ife88dbf23991dde7945d9208e54cd014bb7ecdc6 --- core/java/android/app/IApplicationThread.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/java/android/app/IApplicationThread.java') diff --git a/core/java/android/app/IApplicationThread.java b/core/java/android/app/IApplicationThread.java index 3fa88ae674a4..bfd97f8a2b27 100644 --- a/core/java/android/app/IApplicationThread.java +++ b/core/java/android/app/IApplicationThread.java @@ -123,6 +123,7 @@ public interface IApplicationThread extends IInterface { throws RemoteException; void dumpHeap(boolean managed, String path, ParcelFileDescriptor fd) throws RemoteException; + void attachAgent(String path) throws RemoteException; void setSchedulingGroup(int group) throws RemoteException; // the package has been removed, clean up internal references static final int PACKAGE_REMOVED = 0; @@ -225,4 +226,5 @@ public interface IApplicationThread extends IInterface { int SCHEDULE_MULTI_WINDOW_CHANGED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+58; int SCHEDULE_PICTURE_IN_PICTURE_CHANGED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+59; int SCHEDULE_LOCAL_VOICE_INTERACTION_STARTED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+60; + int ATTACH_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+61; } -- cgit v1.2.3