DeviceSelectionOptions

public class DeviceSelectionOptions
extends Object implements IDeviceSelection

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


Vùng chứa 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 chọn 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 chọn thiết bị

void addSerial(String serialNumber)

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

static IDeviceSelection createForSerial(String serial)

Phương thức trợ giúp ban đầu để tạo một 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 của 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 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()

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

getProperties()

Trả về bản đồ của danh sách tài sản

boolean getRequireBatteryCheck()

Cho biết có bắt buộc 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()

Cho biết có bắt buộc 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)

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

getSerials()

Trả về danh sách các số sê-ri đượ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ờ được yêu cầu của trình mô phỏng

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

Đặt cờ đượ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ờ thiết bị rỗng được yêu cầu

void setRequireBatteryCheck(boolean requireCheck)

Đặt xem có bắt buộc 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ó bắt buộc 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

void setSerial(String... serialNumber)

Đặt danh sách số sê-ri được đưa vào, thay thế mọi giá trị hiện có.

void setStubEmulatorRequested(boolean stubEmulatorRequested)

Đặt cờ được yêu cầu của trình mô phỏng gốc

boolean shouldCreateTemporarilyPlaceholder()

Tạo một phần giữ chỗ tạm thời từ siêu dữ liệu.

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 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 lựa chọn 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 lựa chọn chọn thiết bị.

createForSerial

public static IDeviceSelection createForSerial (String serial)

Phương thức trợ giúp ban đầu để tạo một 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, đây 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 của 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 của 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 của thiết bị hoặc null nếu không xác định được

getDeviceTypeRequested

public DeviceSelectionOptions.DeviceRequestedType getDeviceTypeRequested ()

Giá trị trả về
DeviceSelectionOptions.DeviceRequestedType

getExcludeSerials

public  getExcludeSerials ()

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

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

getMaxBatteryLevel

public Integer getMaxBatteryLevel ()

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

Giá trị trả về
Integer

getMaxBatteryTemperature

public Integer getMaxBatteryTemperature ()

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

Giá trị trả về
Integer

getMinBatteryLevel

public Integer getMinBatteryLevel ()

Nhận 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 khớp.

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

getProductTypes

public  getProductTypes ()

Lấy bản sao của 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 tài sản

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

getRequireBatteryCheck

public boolean getRequireBatteryCheck ()

Cho biết có bắt buộc kiểm tra pin đối với 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 ()

Cho biết có bắt buộc 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

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 số sê-ri đượ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 lựa chọn được cung cấp. Nếu không thì là false

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ờ đượ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ờ đượ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ờ thiết bị rỗng được yêu cầu

Tham số
nullDeviceRequested boolean

setRequireBatteryCheck

public void setRequireBatteryCheck (boolean requireCheck)

Đặt xem có bắt buộc kiểm tra pin đối với 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 đối với 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 số sê-ri được đưa vào, thay thế mọi giá trị hiện có.

Tham số
serialNumber String

setStubEmulatorRequested

public void setStubEmulatorRequested (boolean stubEmulatorRequested)

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

Tham số
stubEmulatorRequested boolean

shouldCreateTemporarilyPlaceholder

public boolean shouldCreateTemporarilyPlaceholder ()

Tạo một phần giữ chỗ tạm thời từ siêu dữ liệu.

Giá trị trả về
boolean

stubEmulatorRequested

public boolean stubEmulatorRequested ()

Giá trị trả về
boolean