Google is committed to advancing racial equity for Black communities. See how.
This page was translated by the Cloud Translation API.
Switch to English

伴侶分配器

public abstract class CompanionAllocator
extends BaseTargetPreparer implements ITargetCleaner

java.lang.Object
com.android.tradefed.targetprep.BaseTargetPreparer
com.android.tradefed.targetprep.companion.CompanionAllocator


基類,負責分配和釋放伴侶設備

應該實現getCompanionDeviceSelectionOptions()來描述分配配套設備所需的條件

摘要

公共建設者

CompanionAllocator ()

公開方法

void setUp ( ITestDevice device, IBuildInfo buildInfo)

設置設備。

void tearDown ( ITestDevice device, IBuildInfo buildInfo, Throwable e)

測試後執行目標清理/拆卸。

受保護的方法

abstract DeviceSelectionOptions getCompanionDeviceSelectionOptions ()

描述配套設備的DeviceSelectionOptions

公共建設者

伴侶分配器

public CompanionAllocator ()

公開方法

建立

public void setUp ( ITestDevice device, 
                IBuildInfo buildInfo)

設置設備。

此方法的內部實現將請求一個伴隨設備,並對其進行分配。

參量
device ITestDevice :準備的ITestDevice

buildInfo IBuildInfo :有關測試中的構建的數據。

投擲
BuildError
DeviceNotAvailableException
TargetSetupError

拆除

public void tearDown ( ITestDevice device, 
                IBuildInfo buildInfo, 
                Throwable e)

測試後執行目標清理/拆卸。

參量
device ITestDevice :準備的ITestDevice

buildInfo IBuildInfo :有關被測構建的數據。

e Throwable :如果調用以異常結束,則這將是在調用級別捕獲的異常。否則,將為null

投擲
DeviceNotAvailableException

受保護的方法

getCompanionDeviceSelectionOptions

protected abstract DeviceSelectionOptions getCompanionDeviceSelectionOptions ()

描述配套設備的DeviceSelectionOptions

退貨
DeviceSelectionOptions