SwitchUserTargetPreparer

public class SwitchUserTargetPreparer
extends BaseTargetPreparer

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


A ITargetPreparer that switches to the specified user kind in setUp. By default it remains in the current user, and no switching is performed.

Tries to restore device user state by switching back to the pre-execution current user.

Summary

Public constructors

SwitchUserTargetPreparer()

Public methods

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

Public constructors

SwitchUserTargetPreparer

public SwitchUserTargetPreparer ()

Public methods

setUp

public void setUp (TestInformation testInformation)

Parameters
testInformation TestInformation

Throws
DeviceNotAvailableException
TargetSetupError

tearDown

public void tearDown (TestInformation testInformation, 
                Throwable e)

Parameters
testInformation TestInformation

e Throwable

Throws
DeviceNotAvailableException