ISystemStatusChecker

public interface ISystemStatusChecker

com.android.tradefed.suite.checker.ISystemStatusChecker
Known Indirect Subclasses
KeyguardStatusChecker Checks the keyguard status after module execution. 
SystemServerFileDescriptorChecker Checks if system server appears to be running out of FDs. 
SystemServerStatusChecker Check if the pid of system_server has changed from before and after a module run. 


An checker that performs checks on system status and returns a boolean to indicate if the system is in an expected state. Such check maybe performed either prior to or after a module execution.

Note: the checker must be reentrant: meaning that the same instance will be called multiple times for each module executed, so it should not leave a state so as to interfere with the checks to be performed for the following modules.

Summary

Public methods

default boolean postExecutionCheck(ITestDevice device)

Check system condition after test module execution.

default boolean preExecutionCheck(ITestDevice device)

Check system condition before test module execution.

Public methods

postExecutionCheck

boolean postExecutionCheck (ITestDevice device)

Check system condition after test module execution. Subclass should override this method if a check is desirable here. Implementation must return a boolean value to indicate if the status check has passed or failed.

Parameters
device ITestDevice: The ITestDevice on which to run the checks.

Returns
boolean result of system status check

Throws
DeviceNotAvailableException

preExecutionCheck

boolean preExecutionCheck (ITestDevice device)

Check system condition before test module execution. Subclass should override this method if a check is desirable here. Implementation must return a boolean value to indicate if the status check has passed or failed.

It's strongly recommended that system status be checked after module execution, and this method may be used for the purpose of caching certain system state prior to module execution.

Parameters
device ITestDevice: The ITestDevice on which to run the checks.

Returns
boolean result of system status check

Throws
DeviceNotAvailableException