DeviceActionUtil
public
class
DeviceActionUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.DeviceActionUtil |
A Utility class to execute device actions.
Summary
Nested classes | |
---|---|
class |
DeviceActionUtil.DeviceActionConfigError
Exception for config error. |
Public methods | |
---|---|
static
DeviceActionUtil
|
create(File deviceActionMainJar, File bundletoolJar)
Creates an instance. |
CommandResult
|
execute(DeviceActionUtil.Command command, String deviceId,
Executes a device action command. |
static
File
|
findExecutableOnPath(String name)
|
void
|
generateLogFile(CommandResult result)
Generates the host log file. |
void
|
saveToLogs(DeviceActionUtil.Command cmd, ITestLogger testLogger)
Saves all generated files to test logs. |
Public methods
create
public static DeviceActionUtil create (File deviceActionMainJar, File bundletoolJar)
Creates an instance.
Parameters | |
---|---|
deviceActionMainJar |
File |
bundletoolJar |
File |
Returns | |
---|---|
DeviceActionUtil |
Throws | |
---|---|
DeviceActionUtil.DeviceActionConfigError |
execute
public CommandResult execute (DeviceActionUtil.Command command, String deviceId,actionArgs)
Executes a device action command.
Parameters | |
---|---|
command |
DeviceActionUtil.Command : to execute. |
deviceId |
String : of the device. |
actionArgs |
: action args for the command . |
Returns | |
---|---|
CommandResult |
findExecutableOnPath
public static File findExecutableOnPath (String name)
Parameters | |
---|---|
name |
String |
Returns | |
---|---|
File |
Throws | |
---|---|
DeviceActionUtil.DeviceActionConfigError |
generateLogFile
public void generateLogFile (CommandResult result)
Generates the host log file.
Parameters | |
---|---|
result |
CommandResult |
saveToLogs
public void saveToLogs (DeviceActionUtil.Command cmd, ITestLogger testLogger)
Saves all generated files to test logs.
Parameters | |
---|---|
cmd |
DeviceActionUtil.Command |
testLogger |
ITestLogger |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-08-13 UTC.
[null,null,["Last updated 2024-08-13 UTC."],[],[]]