diff options
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/IActivityManager.aidl | 1 | ||||
| -rw-r--r-- | core/java/android/app/ProfilerInfo.java | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/app/IActivityManager.aidl b/core/java/android/app/IActivityManager.aidl index 18117481b0ea..7b1afa583d49 100644 --- a/core/java/android/app/IActivityManager.aidl +++ b/core/java/android/app/IActivityManager.aidl @@ -137,6 +137,7 @@ interface IActivityManager { void publishService(in IBinder token, in Intent intent, in IBinder service); void activityResumed(in IBinder token); void setDebugApp(in String packageName, boolean waitForDebugger, boolean persistent); + void setAgentApp(in String packageName, @nullable String agent); void setAlwaysFinish(boolean enabled); boolean startInstrumentation(in ComponentName className, in String profileFile, int flags, in Bundle arguments, in IInstrumentationWatcher watcher, diff --git a/core/java/android/app/ProfilerInfo.java b/core/java/android/app/ProfilerInfo.java index 044b78003bd7..8f718df28911 100644 --- a/core/java/android/app/ProfilerInfo.java +++ b/core/java/android/app/ProfilerInfo.java @@ -85,6 +85,15 @@ public class ProfilerInfo implements Parcelable { } /** + * Return a new ProfilerInfo instance, with fields populated from this object, + * and {@link agent} and {@link attachAgentDuringBind} as given. + */ + public ProfilerInfo setAgent(String agent, boolean attachAgentDuringBind) { + return new ProfilerInfo(this.profileFile, this.profileFd, this.samplingInterval, + this.autoStopProfiler, this.streamingOutput, agent, attachAgentDuringBind); + } + + /** * Close profileFd, if it is open. The field will be null after a call to this function. */ public void closeFd() { |
