Allow metric listeners to use temporary storage for artifacts
The BaseMetricListener class provides a facility for subclasses to
store collection artifacts (eg. screenshots, videos, traces) on
Android's external storage. Using this requires permissions that
are now (with recent SDKs) hard to grant to tests. When this
permission can't be granted, the artifacts can't be saved.
Add an option that allows tests to store these artifacts in
temporary stoarge that both the test and FilePullerLogCollector
can access. This requires no special permissions.
Bug: 436446037
Flag: EXEMPT bugfix
Test: atest DocumentsUIGoogleTests:com.android.documentsui.SidebarUiTest#testOpenInNewWindow_preservesFiles
Change-Id: I61656c61a1f0dbb9f39a774e6bb46474d95b28eb
1 file changed