Google cam kết thúc đẩy công bằng chủng tộc cho Cộng đồng người da đen. Xem cách thực hiện.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.

DeviceSelectionOptions

public class DeviceSelectionOptions
extends Object implements IDeviceSelection

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


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

Tóm lược

Các lớp lồng nhau

enum DeviceSelectionOptions.DeviceRequestedType

Các loại thiết bị giữ chỗ có thể có khác nhau được hỗ trợ.

Các nhà xây dựng công cộng

DeviceSelectionOptions ()

Phương pháp công khai

void addExcludeSerial (String serialNumber)

Thêm một 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 pháp nhà máy Helper để tạo ra một IDeviceSelection rằng sẽ chỉ phù hợp với thiết bị với sê-ri cho

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 ()

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 thiết bị nhất định

DeviceSelectionOptions.DeviceRequestedType getDeviceTypeRequested ()
getExcludeSerials ()

Nhận bản sao 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 danh sách loại sản phẩm

getProperties ()

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

boolean getRequireBatteryCheck ()

Nhận có yêu cầu 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 ()

Nhận có yêu cầu 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 bản sao của các số sê-ri

getSerials ()

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

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

boolean remoteDeviceRequested ()
void setDeviceRequested (boolean deviceRequested)

Đặt cờ yêu cầu trình giả lập

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

Đặt cờ được yêu cầu trình giả lập

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ị rỗng

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ế bất kỳ giá trị hiện có nào.

void setStubEmulatorRequested (boolean stubEmulatorRequested)

Đặt cờ được yêu cầu của trình giả lập sơ khai

void setTcpDeviceRequested (boolean tcpDeviceRequested)

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

boolean stubEmulatorRequested ()

boolean tcpDeviceRequested ()

Các nhà xây dựng công cộng

DeviceSelectionOptions

public DeviceSelectionOptions ()

Phương pháp công khai

addExcludeSerial

public void addExcludeSerial (String serialNumber)

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

addProductType

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ị.

addProperty

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

addSerial

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 pháp nhà máy Helper để tạo ra một IDeviceSelection rằng sẽ chỉ phù hợp với thiết bị với sê-ri cho

Thông số
serial String

Lợi nhuận
IDeviceSelection

deviceRequested

public boolean deviceRequested ()

Lợi nhuận
boolean

giả lập

public boolean emulatorRequested ()

Lợi nhuận
boolean

fetchEnosystemVariable

public String fetchEnvironmentVariable (String name)

Hàm trợ giúp được sử dụng để tìm nạp biến môi trường. Nó thực chất là một wrapper quanh System.getenv(String) này được thực hiện nhằm mục đích kiểm tra đơn vị.

Thông số
name String : các biến môi trường để lấy.

Lợi nhuận
String một String giá trị của biến môi trường hoặc null nếu không có sẵn.

gceDeviceRequested

public boolean gceDeviceRequested ()

Lợi nhuận
boolean

getBatteryLevel

public Integer getBatteryLevel (IDevice device)

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

Thông số
device IDevice : các IDevice

Lợi nhuận
Integer mức pin thiết bị hoặc null nếu chưa biết

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 : các IDevice

Lợi nhuận
String loại sản phẩm thiết bị hoặc null nếu chưa biết

getDeviceProductVariant

public String getDeviceProductVariant (IDevice device)

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

Thông số
device IDevice : các IDevice

Lợi nhuận
String các biến thể sản phẩm thiết bị hoặc null nếu chưa biết

getDeviceTypeRequested

public DeviceSelectionOptions.DeviceRequestedType getDeviceTypeRequested ()

Lợi nhuận
DeviceSelectionOptions.DeviceRequestedType

getExcludeSerials

public  getExcludeSerials ()

Nhận bản sao danh sách loại trừ số sê-ri

Lợi nhuận
một ERROR(/Collection) số sê-ri

getMaxBatteryLevel

public Integer getMaxBatteryLevel ()

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

Lợi nhuận
Integer

getMaxBatteryTempe Nhiệt độ

public Integer getMaxBatteryTemperature ()

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

Lợi nhuận
Integer

getMinBatteryLevel

public Integer getMinBatteryLevel ()

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

Lợi nhuận
Integer

getNoMatchReason

public  getNoMatchReason ()

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

Lợi nhuận
một bản đồ của số sê-ri lý do mà nó không được cấp phát

getProductTypes

public  getProductTypes ()

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

Lợi nhuận
một ERROR(/Collection) của các loại sản phẩm

getProperties

public  getProperties ()

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

Lợi nhuận
một ERROR(/Map) của tên thuộc tính thiết bị cho các giá trị

getRequireBatteryCheck

public boolean getRequireBatteryCheck ()

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

Lợi nhuận
boolean

getRequireBatteryTempe Nhiệt độCheck

public boolean getRequireBatteryTemperatureCheck ()

Nhận có yêu cầu 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

Lợi nhuận
boolean

getSerial

public  getSerials (IDevice device)

Nhận bản sao của các số sê-ri

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

Lợi nhuận
một ERROR(/Collection) số sê-ri

getSerial

public  getSerials ()

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

Lợi nhuận

localVirtualDeviceRequested

public boolean localVirtualDeviceRequested ()

Lợi nhuận
boolean

diêm

public boolean matches (IDevice device)

Thông số
device IDevice

Lợi nhuận
boolean true nếu cho IDevice là một trận đấu cho các tùy chọn được cung cấp. false khác

nullDeviceRequested

public boolean nullDeviceRequested ()

Lợi nhuận
boolean

remoteDeviceRequested

public boolean remoteDeviceRequested ()

Lợi nhuận
boolean

setDeviceRequested

public void setDeviceRequested (boolean deviceRequested)

Đặt cờ được yêu cầu trình giả lập

Thông số
deviceRequested boolean

setDeviceTypeRequested

public void setDeviceTypeRequested (DeviceSelectionOptions.DeviceRequestedType requestedType)

Thông số
requestedType DeviceSelectionOptions.DeviceRequestedType

setEmulatorRequested

public void setEmulatorRequested (boolean emulatorRequested)

Đặt cờ được yêu cầu trình giả lập

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

setMaxBatteryTempe Nhiệ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ị rỗng

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

setRequireBatteryTempe Nhiệt độCheck

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ế bất kỳ giá trị hiện có nào.

Thông số
serialNumber String

setStubEmulatorRequested

public void setStubEmulatorRequested (boolean stubEmulatorRequested)

Đặt cờ được yêu cầu của trình giả lập 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

steveEmulatorRequested

public boolean stubEmulatorRequested ()

Lợi nhuận
boolean

tcpDeviceRequested

public boolean tcpDeviceRequested ()

Lợi nhuận
boolean