Skip to content
Commit 5b495d54 authored by Andreas Gampe's avatar Andreas Gampe
Browse files

ActivityManager: Add support for agents on startup

Add setAgentApp similar to setDebugApp. If given, attempt to attach the given
agent during handleBindApplication.

The flow needed a slight refactor. It is not possible to do a debuggability
check at setAgentApp time (without checking all installed apps). Instead,
when a ProfilerInfo contains an agent, perform a debuggability check then.
This is consistent with how setDebugApp works.

Expose through the shell command:

  cmd activity set-agent-app process agent

Add CTS coverage.

Bug: 69929492
Test: m
Test: m cts
Test: cts-tradefed run commandAndExit cts-dev -m CtsJvmtiAttachingHostTestCases
Change-Id: I65e869debd45e6073f9ab21cb9de9c9deb828a2e
parent d3dac85e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment