切換使用者目標準備器
public class SwitchUserTargetPreparer
extends BaseTargetPreparer
java.lang.Object | ||
↳ | com.android.tradefed.targetprep.BaseTargetPreparer | |
↳ | com.android.tradefed.targetprep.SwitchUserTargetPreparer |
一個ITargetPreparer
,用於在setUp中切換到指定的使用者類型。預設保留目前用戶,不進行切換。
嘗試透過切換回執行前的目前使用者來恢復裝置使用者狀態。
概括
公共構造函數 | |
---|---|
SwitchUserTargetPreparer () |
公共方法 | |
---|---|
void | setUp ( TestInformation testInformation) |
void | tearDown ( TestInformation testInformation, Throwable e) |
公共構造函數
切換使用者目標準備器
public SwitchUserTargetPreparer ()
公共方法
設定
public void setUp (TestInformation testInformation)
參數 | |
---|---|
testInformation | TestInformation |
投擲 | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
拆除
public void tearDown (TestInformation testInformation, Throwable e)
參數 | |
---|---|
testInformation | TestInformation |
e | Throwable |
投擲 | |
---|---|
DeviceNotAvailableException |