DeviceActionUtil

public class DeviceActionUtil
extends Object

java.lang.Object
com.android.tradefed.util.DeviceActionUtil


Klasa narzędziowa do wykonywania działań na urządzeniu.

Podsumowanie

Zagnieżdżone klasy

class DeviceActionUtil.DeviceActionConfigError

Wyjątek w przypadku błędu konfiguracji. 

Metody publiczne

static DeviceActionUtil create(File deviceActionMainJar, File bundletoolJar)

Tworzy instancję.

CommandResult execute(DeviceActionUtil.Command command, String deviceId, List<String> actionArgs)

Wykonuje polecenie działania na urządzeniu.

static File findExecutableOnPath(String name)
void generateLogFile(CommandResult result)

Generuje plik dziennika hosta.

void saveToLogs(DeviceActionUtil.Command cmd, ITestLogger testLogger)

Zapisuje wszystkie wygenerowane pliki w logach testów.

Metody publiczne

create

public static DeviceActionUtil create (File deviceActionMainJar, 
                File bundletoolJar)

Tworzy instancję.

Parametry
deviceActionMainJar File

bundletoolJar File

Zwraca
DeviceActionUtil

Zgłasza
DeviceActionUtil.DeviceActionConfigError

execute

public CommandResult execute (DeviceActionUtil.Command command, 
                String deviceId, 
                List<String> actionArgs)

Wykonuje polecenie działania na urządzeniu.

Parametry
command DeviceActionUtil.Command: do wykonania.

deviceId String: urządzenia.

actionArgs List: argumenty działania dla command.

Zwraca
CommandResult

findExecutableOnPath

public static File findExecutableOnPath (String name)

Parametry
name String

Zwraca
File

Zgłasza
DeviceActionUtil.DeviceActionConfigError

generateLogFile

public void generateLogFile (CommandResult result)

Generuje plik dziennika hosta.

Parametry
result CommandResult

Zgłasza
IOException

saveToLogs

public void saveToLogs (DeviceActionUtil.Command cmd, 
                ITestLogger testLogger)

Zapisuje wszystkie wygenerowane pliki w logach testów.

Parametry
cmd DeviceActionUtil.Command

testLogger ITestLogger

Zgłasza
IOException