Merge "Merge "ActivityManager: Add support for agents on startup" am: d5cba89b98 am: ebc0afd811" into oc-mr1-dev-plus-aosp

am: 954ba2c6a1

Change-Id: I218eb054ef0da896c72674c597249c6a5120500d
This commit is contained in:
Android Build Merger (Role)
2018-01-25 23:03:11 +00:00
committed by android-build-merger
4 changed files with 106 additions and 19 deletions

View File

@@ -146,6 +146,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,

View File

@@ -86,6 +86,15 @@ public class ProfilerInfo implements Parcelable {
attachAgentDuringBind = in.attachAgentDuringBind;
}
/**
* 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.
*/