LocalAndroidVirtualDevice

public class LocalAndroidVirtualDevice
extends RemoteAndroidDevice implements ITestLoggerReceiver

java.lang.Object
   ↳ com.android.tradefed.device.NativeDevice
     ↳ com.android.tradefed.device.TestDevice
       ↳ com.android.tradefed.device.RemoteAndroidDevice
         ↳ com.android.tradefed.device.LocalAndroidVirtualDevice


Lớp cho các thiết bị ảo cục bộ chạy trên máy chủ TradeFed.

Tóm tắt

Hàm khởi tạo công khai

LocalAndroidVirtualDevice(IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

Phương thức công khai

boolean adbTcpConnect(String host, String port)
boolean adbTcpDisconnect(String host, String port)
void postInvocationTearDown(Throwable exception)

Thực thi quy trình tháo dỡ thông thường và dừng thiết bị ảo.

void preInvocationSetup(IBuildInfo info, MultiMap<String, String> attributes)

Thực thi quy trình thiết lập chung và khởi chạy thiết bị ảo.

void setTestLogger(ITestLogger testLogger)

Chèn thực thể ITestLogger

void shutdown()

Tắt thiết bị.

Hàm khởi tạo công khai

LocalAndroidVirtualDevice

public LocalAndroidVirtualDevice (IDevice device, 
                IDeviceStateMonitor stateMonitor, 
                IDeviceMonitor allocationMonitor)

Tham số
device IDevice

stateMonitor IDeviceStateMonitor

allocationMonitor IDeviceMonitor

Phương thức công khai

adbTcpConnect

public boolean adbTcpConnect (String host, 
                String port)

Tham số
host String

port String

Giá trị trả về
boolean

adbTcpDisconnect

public boolean adbTcpDisconnect (String host, 
                String port)

Tham số
host String

port String

Giá trị trả về
boolean

postInvocationTearDown

public void postInvocationTearDown (Throwable exception)

Thực thi quy trình tháo dỡ thông thường và dừng thiết bị ảo.

Tham số
exception Throwable: ngoại lệ cuối cùng (nếu có) do lỗi gọi gây ra.

preInvocationSetup

public void preInvocationSetup (IBuildInfo info, 
                MultiMap<String, String> attributes)

Thực thi quy trình thiết lập chung và khởi chạy thiết bị ảo.

Tham số
info IBuildInfo: IBuildInfo của thiết bị.

attributes MultiMap: Các thuộc tính được lưu trữ trong ngữ cảnh gọi

Gửi
DeviceNotAvailableException
TargetSetupError

setTestLogger

public void setTestLogger (ITestLogger testLogger)

Chèn thực thể ITestLogger

Tham số
testLogger ITestLogger

tắt

public void shutdown ()

Tắt thiết bị.