Tùy chọn lựa chọn thiết bị

public class DeviceSelectionOptions
extends Object implements IDeviceSelection

java.lang.Object
com.android.tradefed.device.DeviceSelectionOptions


Vùng chứa các tiêu chí lựa chọn thiết bị.

Bản tóm tắt

Nhà thầu xây dựng công cộng

DeviceSelectionOptions ()

Phương pháp công khai

void addExcludeSerial (String serialNumber)

Thêm số sê-ri vào danh sách loại trừ.

void addProductType (String productType)

Thêm loại sản phẩm vào các tùy chọn lựa chọn thiết bị.

void addProperty (String propertyKey, String propValue)

Thêm tiêu chí thuộc tính vào các tùy chọn lựa chọn thiết bị

void addSerial (String serialNumber)

Thêm số sê-ri vào các tùy chọn lựa chọn thiết bị.

static IDeviceSelection createForSerial (String serial)

Phương thức xuất xưởng của trình trợ giúp để tạo IDeviceSelection sẽ chỉ khớp với thiết bị có số sê-ri nhất định

boolean deviceRequested ()

boolean emulatorRequested ()

String fetchEnvironmentVariable (String name)

Hàm trợ giúp được sử dụng để tìm nạp biến môi trường.

boolean gceDeviceRequested ()

IDeviceSelection.BaseDeviceType getBaseDeviceTypeRequested ()

Trả về loại thiết bị chúng ta nên sử dụng.

Integer getBatteryLevel (IDevice device)

Truy xuất mức pin cho thiết bị nhất định

String getDeviceProductType (IDevice device)

Nhận loại sản phẩm thiết bị nhất định

String getDeviceProductVariant (IDevice device)

Nhận biến thể sản phẩm của thiết bị nhất định

DeviceSelectionOptions.DeviceRequestedType getDeviceTypeRequested ()
getExcludeSerials ()

Nhận một bản sao của danh sách loại trừ số sê-ri

Integer getMaxBatteryLevel ()

Nhận mức pin tối đa được yêu cầu

Integer getMaxBatteryTemperature ()

Nhận mức pin tối đa được yêu cầu

Integer getMinBatteryLevel ()

Nhận mức pin tối thiểu được yêu cầu

getNoMatchReason ()

Trả về lý do thiết bị không khớp.

getProductTypes ()

Nhận bản sao của danh sách loại sản phẩm

getProperties ()

Trả về bản đồ của danh sách thuộc tính

boolean getRequireBatteryCheck ()

Biết liệu có cần kiểm tra pin đối với các thiết bị có mức pin không xác định hay không

boolean getRequireBatteryTemperatureCheck ()

Biết liệu có cần kiểm tra nhiệt độ pin đối với các thiết bị có nhiệt độ pin không xác định hay không

getSerials (IDevice device)

Nhận một bản sao của số sê-ri

getSerials ()

Trả về danh sách các serial được yêu cầu.

boolean localVirtualDeviceRequested ()
boolean matches (IDevice device)
boolean nullDeviceRequested ()

boolean remoteDeviceRequested ()
void setBaseDeviceTypeRequested ( IDeviceSelection.BaseDeviceType type)

Đặt loại thiết bị chúng ta nên sử dụng.

void setDeviceRequested (boolean deviceRequested)

Đặt cờ yêu cầu của trình mô phỏng

void setDeviceTypeRequested ( DeviceSelectionOptions.DeviceRequestedType requestedType)
void setEmulatorRequested (boolean emulatorRequested)

Đặt cờ yêu cầu của trình mô phỏng

void setGceDeviceRequested (boolean gceDeviceRequested)
void setMaxBatteryLevel (Integer maxBattery)

Đặt mức pin tối đa

void setMaxBatteryTemperature (Integer maxBatteryTemperature)

Đặt mức pin tối đa

void setMinBatteryLevel (Integer minBattery)

Đặt mức pin tối thiểu

void setNullDeviceRequested (boolean nullDeviceRequested)

Đặt cờ yêu cầu thiết bị null

void setRequireBatteryCheck (boolean requireCheck)

Đặt xem có cần kiểm tra pin đối với các thiết bị có mức pin không xác định hay không

void setRequireBatteryTemperatureCheck (boolean requireCheckTemprature)

Đặt xem có cần kiểm tra nhiệt độ pin cho các thiết bị có nhiệt độ pin không xác định hay không

void setSerial (String... serialNumber)

Đặt danh sách bao gồm số sê-ri, thay thế mọi giá trị hiện có.

void setStubEmulatorRequested (boolean stubEmulatorRequested)

Đặt cờ yêu cầu trình mô phỏng sơ khai

void setTcpDeviceRequested (boolean tcpDeviceRequested)

Đặt cờ yêu cầu thiết bị tcp

boolean stubEmulatorRequested ()

boolean tcpDeviceRequested ()

Nhà thầu xây dựng công cộng

Tùy chọn lựa chọn thiết bị

public DeviceSelectionOptions ()

Phương pháp công khai

thêmExcludeSerial

public void addExcludeSerial (String serialNumber)

Thêm số sê-ri vào danh sách loại trừ.

thêmLoại sản phẩm

public void addProductType (String productType)

Thêm loại sản phẩm vào các tùy chọn lựa chọn thiết bị.

thêm tài sản

public void addProperty (String propertyKey, 
                String propValue)

Thêm tiêu chí thuộc tính vào các tùy chọn lựa chọn thiết bị

Thông số
propertyKey String

propValue String

thêm nối tiếp

public void addSerial (String serialNumber)

Thêm số sê-ri vào các tùy chọn lựa chọn thiết bị.

createForSerial

public static IDeviceSelection createForSerial (String serial)

Phương thức xuất xưởng của trình trợ giúp để tạo IDeviceSelection sẽ chỉ khớp với thiết bị có số sê-ri nhất định

Thông số
serial String

Trả lại
IDeviceSelection

thiết bị được yêu cầu

public boolean deviceRequested ()

Trả lại
boolean

trình mô phỏng được yêu cầu

public boolean emulatorRequested ()

Trả lại
boolean

lấy Môi trườngBiến

public String fetchEnvironmentVariable (String name)

Hàm trợ giúp được sử dụng để tìm nạp biến môi trường. Về cơ bản, nó là một trình bao bọc xung quanh System.getenv(String) Việc này được thực hiện nhằm mục đích thử nghiệm đơn vị.

Thông số
name String : biến môi trường cần tìm nạp.

Trả lại
String giá trị String của biến môi trường hoặc null nếu không có sẵn.

gceDeviceYêu cầu

public boolean gceDeviceRequested ()

Trả lại
boolean

getBaseDeviceTypeRequested

public IDeviceSelection.BaseDeviceType getBaseDeviceTypeRequested ()

Trả về loại thiết bị chúng ta nên sử dụng.

Trả lại
IDeviceSelection.BaseDeviceType

lấy mức pin

public Integer getBatteryLevel (IDevice device)

Truy xuất mức pin cho thiết bị nhất định

Thông số
device IDevice : IDevice

Trả lại
Integer mức pin của thiết bị hoặc null nếu không xác định

getDeviceProductType

public String getDeviceProductType (IDevice device)

Nhận loại sản phẩm thiết bị nhất định

Thông số
device IDevice : IDevice

Trả lại
String loại sản phẩm thiết bị hoặc null nếu không xác định

getDeviceProductBiến thể

public String getDeviceProductVariant (IDevice device)

Nhận biến thể sản phẩm của thiết bị nhất định

Thông số
device IDevice : IDevice

Trả lại
String biến thể sản phẩm thiết bị hoặc null nếu không xác định

getDeviceTypeRequested

public DeviceSelectionOptions.DeviceRequestedType getDeviceTypeRequested ()

Trả lại
DeviceSelectionOptions.DeviceRequestedType

getExcludeSerials

public  getExcludeSerials ()

Nhận một bản sao của danh sách loại trừ số sê-ri

Trả lại
ERROR(/Collection) số sê-ri

getMaxBatteryLevel

public Integer getMaxBatteryLevel ()

Nhận mức pin tối đa được yêu cầu

Trả lại
Integer

getMaxBatteryNhiệt độ

public Integer getMaxBatteryTemperature ()

Nhận mức pin tối đa được yêu cầu

Trả lại
Integer

getMinBatteryLevel

public Integer getMinBatteryLevel ()

Nhận mức pin tối thiểu được yêu cầu

Trả lại
Integer

getNoMatchLý do

public  getNoMatchReason ()

Trả về lý do thiết bị không khớp.

Trả lại
Bản đồ số sê-ri lý do tại sao nó không được phân bổ

lấy các loại sản phẩm

public  getProductTypes ()

Nhận bản sao của danh sách loại sản phẩm

Trả lại
ERROR(/Collection) của các loại sản phẩm

getProperties

public  getProperties ()

Trả về bản đồ của danh sách thuộc tính

Trả lại
ERROR(/Map) của tên thuộc tính thiết bị thành giá trị

getRequireBatteryCheck

public boolean getRequireBatteryCheck ()

Biết liệu có cần kiểm tra pin đối với các thiết bị có mức pin không xác định hay không

Trả lại
boolean

getRequireBatteryTemperatureCheck

public boolean getRequireBatteryTemperatureCheck ()

Biết liệu có cần kiểm tra nhiệt độ pin đối với các thiết bị có nhiệt độ pin không xác định hay không

Trả lại
boolean

getSerial

public  getSerials (IDevice device)

Nhận một bản sao của số sê-ri

Thông số
device IDevice : IDevice đại diện cho thiết bị được xem xét lựa chọn.

Trả lại
ERROR(/Collection) số sê-ri

getSerial

public  getSerials ()

Trả về danh sách các serial được yêu cầu.

Trả lại

localVirtualDeviceRequested

public boolean localVirtualDeviceRequested ()

Trả lại
boolean

diêm

public boolean matches (IDevice device)

Thông số
device IDevice

Trả lại
boolean true nếu IDevice đã cho phù hợp với các tùy chọn được cung cấp. false khác

nullThiết bị được yêu cầu

public boolean nullDeviceRequested ()

Trả lại
boolean

thiết bị từ xa được yêu cầu

public boolean remoteDeviceRequested ()

Trả lại
boolean

setBaseDeviceTypeYêu cầu

public void setBaseDeviceTypeRequested (IDeviceSelection.BaseDeviceType type)

Đặt loại thiết bị chúng ta nên sử dụng.

Thông số
type IDeviceSelection.BaseDeviceType

setDeviceRequested

public void setDeviceRequested (boolean deviceRequested)

Đặt cờ yêu cầu của trình mô phỏng

Thông số
deviceRequested boolean

setDeviceTypeRequested

public void setDeviceTypeRequested (DeviceSelectionOptions.DeviceRequestedType requestedType)

Thông số
requestedType DeviceSelectionOptions.DeviceRequestedType

setEmulatorYêu cầu

public void setEmulatorRequested (boolean emulatorRequested)

Đặt cờ yêu cầu của trình mô phỏng

Thông số
emulatorRequested boolean

setGceDeviceRequested

public void setGceDeviceRequested (boolean gceDeviceRequested)

Thông số
gceDeviceRequested boolean

setMaxBatteryLevel

public void setMaxBatteryLevel (Integer maxBattery)

Đặt mức pin tối đa

Thông số
maxBattery Integer

setMaxBatteryNhiệt độ

public void setMaxBatteryTemperature (Integer maxBatteryTemperature)

Đặt mức pin tối đa

Thông số
maxBatteryTemperature Integer

setMinBatteryLevel

public void setMinBatteryLevel (Integer minBattery)

Đặt mức pin tối thiểu

Thông số
minBattery Integer

setNullDeviceRequested

public void setNullDeviceRequested (boolean nullDeviceRequested)

Đặt cờ yêu cầu thiết bị null

Thông số
nullDeviceRequested boolean

setRequireBatteryCheck

public void setRequireBatteryCheck (boolean requireCheck)

Đặt xem có cần kiểm tra pin đối với các thiết bị có mức pin không xác định hay không

Thông số
requireCheck boolean

setRequireBatteryTemperatureCheck

public void setRequireBatteryTemperatureCheck (boolean requireCheckTemprature)

Đặt xem có cần kiểm tra nhiệt độ pin cho các thiết bị có nhiệt độ pin không xác định hay không

Thông số
requireCheckTemprature boolean

setSerial

public void setSerial (String... serialNumber)

Đặt danh sách bao gồm số sê-ri, thay thế mọi giá trị hiện có.

Thông số
serialNumber String

setStubEmulatorYêu cầu

public void setStubEmulatorRequested (boolean stubEmulatorRequested)

Đặt cờ yêu cầu trình mô phỏng sơ khai

Thông số
stubEmulatorRequested boolean

setTcpDeviceRequested

public void setTcpDeviceRequested (boolean tcpDeviceRequested)

Đặt cờ yêu cầu thiết bị tcp

Thông số
tcpDeviceRequested boolean

sơ khaiEmulatorYêu cầu

public boolean stubEmulatorRequested ()

Trả lại
boolean

tcpDeviceRequested

public boolean tcpDeviceRequested ()

Trả lại
boolean