RunOnWorkProfileTargetPreparer

public class RunOnWorkProfileTargetPreparer
extends BaseTargetPreparer implements IConfigurationReceiver

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.RunOnWorkProfileTargetPreparer


ITargetPreparer, który tworzy profil służbowy w ramach konfiguracji i oznacza, że testy powinny być uruchamiane na tym użytkowniku.

W przypadku demontażu profil służbowy jest usuwany.

Jeśli profil służbowy już istnieje, zostanie on użyty zamiast tworzenia nowego, a nie zostanie usunięty podczas dekompilacji.

Jeśli urządzenie nie ma funkcji managed_users lub nie ma możliwości utworzenia nowego użytkownika, gdy jest to wymagane, zostanie ustawiony argument pomijania testów skip-tests-reason, a użytkownik nie zostanie zmieniony. Testy wykonywane na urządzeniu mogą odczytać ten argument, aby zareagować na ten stan.

Podsumowanie

Konstruktory publiczne

RunOnWorkProfileTargetPreparer()

Metody publiczne

void setConfiguration(IConfiguration configuration)

Wstrzykuje IConfiguration w użyciu.

void setUp(TestInformation testInfo)
void tearDown(TestInformation testInfo, Throwable e)

Chronione metody

boolean canCreateAdditionalUsers(ITestDevice device, int numberOfUsers)

Sprawdzanie, czy można utworzyć żądaną liczbę użytkowników.

Konstruktory publiczne

RunOnWorkProfileTargetPreparer

public RunOnWorkProfileTargetPreparer ()

Metody publiczne

setConfiguration

public void setConfiguration (IConfiguration configuration)

Wstrzykuje IConfiguration w użyciu.

Parametry
configuration IConfiguration

setUp

public void setUp (TestInformation testInfo)

Parametry
testInfo TestInformation

Rzuty
DeviceNotAvailableException
TargetSetupError

tearDown

public void tearDown (TestInformation testInfo, 
                Throwable e)

Parametry
testInfo TestInformation

e Throwable

Rzuty
DeviceNotAvailableException

Chronione metody

canCreateAdditionalUsers

protected boolean canCreateAdditionalUsers (ITestDevice device, 
                int numberOfUsers)

Sprawdzanie, czy można utworzyć żądaną liczbę użytkowników.

Parametry
device ITestDevice

numberOfUsers int

Zwroty
boolean

Rzuty
DeviceNotAvailableException