Create callbacks for setting up and cleaning up metric collectors.

Subclasses should implement these callbacks to ensure that components
that use metric collectors programatically can have them set up and
cleaned up correctly. These classes should not call these callbacks
directly, however, but through setUp and cleanUp().

Bug: 206859096
Test: atest baseMetricListenerInstrumentedTest (updated)

Original change: https://android-review.googlesource.com/c/platform/platform_testing/+/1918957

Change-Id: I6d74fe767c73199bfc216f15519e6949a05af3fb
(cherry picked from commit 5c8241e95c8ad9e84afd55d9edba9d7d1763dde0)
Merged-In: I6d74fe767c73199bfc216f15519e6949a05af3fb
Merged-In: Ica467d9fb143c8f25e495d4c1d4d4be8632a72ae
Merged-In: Idcb8af0a76e03ea14fe929fd9eff29a23134c942
2 files changed
tree: eab2127ca37b6a145c69522b8b975800d49b6166
  1. build/
  2. docs/
  3. emu_test/
  4. libraries/
  5. scripts/
  6. tests/
  7. utils/
  8. PREUPLOAD.cfg