BaseModuleController

public abstract class BaseModuleController
extends Object implements IModuleController

java.lang.Object
   ↳ com.android.tradefed.testtype.suite.module.BaseModuleController


Basic implementation of IModuleController that should be implemented for checking if a module should run or not.

Summary

Public constructors

BaseModuleController()

Public methods

final IAbi getModuleAbi()

Helper method to get the module abi.

final String getModuleName()

Helper method to get the module name.

final boolean shouldCaptureBugreport()

Returns whether of not the module wants to capture the bugreport on test failure.

final boolean shouldCaptureLogcat()

Returns whether of not the module wants to capture the logcat on test failure.

final boolean shouldCaptureScreenshot()

Returns whether of not the module wants to capture the screenshot on test failure.

abstract IModuleController.RunStrategy shouldRun(IInvocationContext context)

Method to decide if the module should run or not.

final IModuleController.RunStrategy shouldRunModule(IInvocationContext context)

Method to determine if a module should run or not.

Public constructors

BaseModuleController

public BaseModuleController ()

Public methods

getModuleAbi

public final IAbi getModuleAbi ()

Helper method to get the module abi.

Returns
IAbi

getModuleName

public final String getModuleName ()

Helper method to get the module name.

Returns
String

shouldCaptureBugreport

public final boolean shouldCaptureBugreport ()

Returns whether of not the module wants to capture the bugreport on test failure.

Returns
boolean

shouldCaptureLogcat

public final boolean shouldCaptureLogcat ()

Returns whether of not the module wants to capture the logcat on test failure.

Returns
boolean

shouldCaptureScreenshot

public final boolean shouldCaptureScreenshot ()

Returns whether of not the module wants to capture the screenshot on test failure.

Returns
boolean

shouldRun

public abstract IModuleController.RunStrategy shouldRun (IInvocationContext context)

Method to decide if the module should run or not.

Parameters
context IInvocationContext: the IInvocationContext of the module

Returns
IModuleController.RunStrategy True if the module should run, false otherwise.

Throws
DeviceNotAvailableException

shouldRunModule

public final IModuleController.RunStrategy shouldRunModule (IInvocationContext context)

Method to determine if a module should run or not.

Parameters
context IInvocationContext: the IInvocationContext of the module.

Returns
IModuleController.RunStrategy True if the module should run, false otherwise.

Throws
DeviceNotAvailableException