perfetto_hprof: add flag to enable.

Add flag whether to allow loading of the perfetto hprof plugin.
Even with this option set, we will still only actually load the plugin
if we are on a userdebug build or the app is debuggable or profileable.

We do not want to enable this by default because PerfettoHprof does not
work on host, and we do not want to enable it in tests.

Test: flash flame-userdebug. get java heap dump.

Bug: 147667830
Change-Id: If978556dbf44b27828cba47e1fb95084a12838b7
4 files changed