DeviceSelectionOptions

public class DeviceSelectionOptions
extends Object implements IDeviceSelection

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


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

Tóm tắt

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

DeviceSelectionOptions()

Phương thức 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 một loại sản phẩm vào các lựa chọn về thiết bị.

void addProperty(String propertyKey, String propValue)

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

void addSerial(String serialNumber)

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

static IDeviceSelection createForSerial(String serial)

Phương thức nhà máy của trình trợ giúp để tạo IDeviceSelection chỉ khớp với thiết bị có số sê-ri đã cho

boolean deviceRequested()

boolean emulatorRequested()

String fetchEnvironmentVariable(String name)

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

boolean gceDeviceRequested()

IDeviceSelection.BaseDeviceType getBaseDeviceTypeRequested()

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

Integer getBatteryLevel(IDevice device)

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

String getDeviceProductType(IDevice device)

Lấy loại sản phẩm của thiết bị đã cho

String getDeviceProductVariant(IDevice device)

Lấy biến thể sản phẩm của thiết bị đã cho

DeviceSelectionOptions.DeviceRequestedType getDeviceTypeRequested()
getExcludeSerials()

Lấy bản sao danh sách loại trừ số sê-ri

Integer getMaxBatteryLevel()

Lấy mức pin tối đa được yêu cầu

Integer getMaxBatteryTemperature()

Lấy mức pin tối đa được yêu cầu

Integer getMinBatteryLevel()

Lấy mức pin tối thiểu được yêu cầu

getNoMatchReason()

Trả về lý do thiết bị không được so khớp.

getProductTypes()

Lấy bản sao 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()

Xem liệu có cần kiểm tra pin cho các thiết bị có mức pin không xác định hay không

boolean getRequireBatteryTemperatureCheck()

Xem liệu có bắt buộc kiểm tra nhiệt độ pin cho các thiết bị có nhiệt độ pin không xác định hay không

getSerials(IDevice device)

Lấy bản sao của số sê-ri

getSerials()

Trả về danh sách các chương trình truyền hình dài tập đượ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ị mà 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ị rỗng

void setRequireBatteryCheck(boolean requireCheck)

Đặt xem có bắt buộc kiểm tra pin cho các thiết bị có mức pin không xác định hay không

void setRequireBatteryTemperatureCheck(boolean requireCheckTemprature)

Đặt xem có bắt buộc 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 giả lập

boolean stubEmulatorRequested()

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

DeviceSelectionOptions

public DeviceSelectionOptions ()

Phương thức công khai

addExcludeSerial

public void addExcludeSerial (String serialNumber)

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

addProductType

public void addProductType (String productType)

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

addProperty

public void addProperty (String propertyKey, 
                String propValue)

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

Tham số
propertyKey String

propValue String

addSerial

public void addSerial (String serialNumber)

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

createForSerial

public static IDeviceSelection createForSerial (String serial)

Phương thức nhà máy của trình trợ giúp để tạo IDeviceSelection chỉ khớp với thiết bị có số sê-ri đã cho

Tham số
serial String

Giá trị trả về
IDeviceSelection

deviceRequested

public boolean deviceRequested ()

Giá trị trả về
boolean

emulatorRequested

public boolean emulatorRequested ()

Giá trị trả về
boolean

fetchEnvironmentVariable

public String fetchEnvironmentVariable (String name)

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

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

Giá trị trả về
String giá trị String của biến môi trường hoặc giá trị rỗng nếu không có.

gceDeviceRequested

public boolean gceDeviceRequested ()

Giá trị trả về
boolean

getBaseDeviceTypeRequested

public IDeviceSelection.BaseDeviceType getBaseDeviceTypeRequested ()

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

Giá trị trả về
IDeviceSelection.BaseDeviceType

getBatteryLevel

public Integer getBatteryLevel (IDevice device)

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

Tham số
device IDevice: IDevice

Giá trị trả về
Integer mức pin của thiết bị hoặc null nếu không xác định được

getDeviceProductType

public String getDeviceProductType (IDevice device)

Lấy loại sản phẩm của thiết bị đã cho

Tham số
device IDevice: IDevice

Giá trị trả về
String loại sản phẩm thiết bị hoặc null nếu không xác định được

getDeviceProductVariant

public String getDeviceProductVariant (IDevice device)

Lấy biến thể sản phẩm của thiết bị đã cho

Tham số
device IDevice: IDevice

Giá trị trả về
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 ()

Giá trị trả về
DeviceSelectionOptions.DeviceRequestedType

getExcludeSerials

public  getExcludeSerials ()

Lấy bản sao danh sách loại trừ số sê-ri

Giá trị trả về
ERROR(/Collection) số sê-ri

getMaxBatteryLevel

public Integer getMaxBatteryLevel ()

Lấy mức pin tối đa được yêu cầu

Giá trị trả về
Integer

getMaxBatteryTemperature

public Integer getMaxBatteryTemperature ()

Lấy mức pin tối đa được yêu cầu

Giá trị trả về
Integer

getMinBatteryLevel

public Integer getMinBatteryLevel ()

Lấy mức pin tối thiểu được yêu cầu

Giá trị trả về
Integer

getNoMatchReason

public  getNoMatchReason ()

Trả về lý do thiết bị không được so khớp.

Giá trị trả về
Bản đồ số sê-ri đến lý do không được phân bổ

getProductTypes

public  getProductTypes ()

Lấy bản sao danh sách loại sản phẩm

Giá trị trả về
ERROR(/Collection) loại sản phẩm

getProperties

public  getProperties ()

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

Giá trị trả về
ERROR(/Map) tên thuộc tính thiết bị thành giá trị

getRequireBatteryCheck

public boolean getRequireBatteryCheck ()

Xem liệu có cần kiểm tra pin cho các thiết bị có mức pin không xác định hay không

Giá trị trả về
boolean

getRequireBatteryTemperatureCheck

public boolean getRequireBatteryTemperatureCheck ()

Xem liệu có bắt buộc kiểm tra nhiệt độ pin cho các thiết bị có nhiệt độ pin không xác định hay không

Giá trị trả về
boolean

getSerials

public  getSerials (IDevice device)

Lấy bản sao của số sê-ri

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

Giá trị trả về
ERROR(/Collection) số sê-ri

getSerials

public  getSerials ()

Trả về danh sách các chương trình truyền hình dài tập được yêu cầu.

Giá trị trả về

localVirtualDeviceRequested

public boolean localVirtualDeviceRequested ()

Giá trị trả về
boolean

khớp với

public boolean matches (IDevice device)

Tham số
device IDevice

Giá trị trả về
boolean true nếu IDevice đã cho khớp với các tuỳ chọn đã cung cấp. false nếu không

nullDeviceRequested

public boolean nullDeviceRequested ()

Giá trị trả về
boolean

remoteDeviceRequested

public boolean remoteDeviceRequested ()

Giá trị trả về
boolean

setBaseDeviceTypeRequested

public void setBaseDeviceTypeRequested (IDeviceSelection.BaseDeviceType type)

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

Tham số
type IDeviceSelection.BaseDeviceType

setDeviceRequested

public void setDeviceRequested (boolean deviceRequested)

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

Tham số
deviceRequested boolean

setDeviceTypeRequested

public void setDeviceTypeRequested (DeviceSelectionOptions.DeviceRequestedType requestedType)

Tham số
requestedType DeviceSelectionOptions.DeviceRequestedType

setEmulatorRequested

public void setEmulatorRequested (boolean emulatorRequested)

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

Tham số
emulatorRequested boolean

setGceDeviceRequested

public void setGceDeviceRequested (boolean gceDeviceRequested)

Tham số
gceDeviceRequested boolean

setMaxBatteryLevel

public void setMaxBatteryLevel (Integer maxBattery)

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

Tham số
maxBattery Integer

setMaxBatteryTemperature

public void setMaxBatteryTemperature (Integer maxBatteryTemperature)

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

Tham số
maxBatteryTemperature Integer

setMinBatteryLevel

public void setMinBatteryLevel (Integer minBattery)

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

Tham số
minBattery Integer

setNullDeviceRequested

public void setNullDeviceRequested (boolean nullDeviceRequested)

Đặt cờ yêu cầu thiết bị rỗng

Tham số
nullDeviceRequested boolean

setRequireBatteryCheck

public void setRequireBatteryCheck (boolean requireCheck)

Đặt xem có bắt buộc kiểm tra pin cho các thiết bị có mức pin không xác định hay không

Tham số
requireCheck boolean

setRequireBatteryTemperatureCheck

public void setRequireBatteryTemperatureCheck (boolean requireCheckTemprature)

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

Tham 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ó.

Tham số
serialNumber String

setStubEmulatorRequested

public void setStubEmulatorRequested (boolean stubEmulatorRequested)

Đặt cờ yêu cầu trình mô phỏng giả lập

Tham số
stubEmulatorRequested boolean

stubEmulatorRequested

public boolean stubEmulatorRequested ()

Giá trị trả về
boolean