public class

DeviceFileReporter

extends Object
java.lang.Object
   ↳ com.android.tradefed.result.DeviceFileReporter

Class Overview

A utility class that checks the device for files and sends them to testLog(String, LogDataType, InputStreamSource) if found.

Summary

Public Constructors
DeviceFileReporter(ITestDevice device, ITestInvocationListener listener)
Initialize a new DeviceFileReporter with the provided ITestDevice
Public Methods
void addPatterns(List<String> patterns)
Add patterns with the log data type set to the default.
void addPatterns(Map<String, LogDataType> patterns)
Add patterns with the respective log data types
void addPatterns(String... patterns)
Add patterns with the log data type set to the default.
List<String> run()
Actually search the filesystem for the specified patterns and send them to testLog(String, LogDataType, InputStreamSource) if found
void setDefaultLogDataType(LogDataType type)
Set the default log data type set for patterns that don't have an associated type.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DeviceFileReporter (ITestDevice device, ITestInvocationListener listener)

Initialize a new DeviceFileReporter with the provided ITestDevice

Public Methods

public void addPatterns (List<String> patterns)

Add patterns with the log data type set to the default.

Parameters
patterns a List of String filename glob patterns. Should be absolute.

public void addPatterns (Map<String, LogDataType> patterns)

Add patterns with the respective log data types

Parameters
patterns a Map of String filename glob patterns to their respective LogDataTypes. The globs should be absolute.

public void addPatterns (String... patterns)

Add patterns with the log data type set to the default.

Parameters
patterns a varargs array of String filename glob patterns. Should be absolute.

public List<String> run ()

Actually search the filesystem for the specified patterns and send them to testLog(String, LogDataType, InputStreamSource) if found

public void setDefaultLogDataType (LogDataType type)

Set the default log data type set for patterns that don't have an associated type.

Parameters
type the LogDataType