DeviceSelectionOptions

public class DeviceSelectionOptions
extends Object implements IDeviceSelection

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


คอนเทนเนอร์สำหรับเกณฑ์การเลือกอุปกรณ์

สรุป

เครื่องมือสร้างสาธารณะ

DeviceSelectionOptions()

เมธอดสาธารณะ

void addExcludeSerial(String serialNumber)

เพิ่มหมายเลขซีเรียลลงในรายการการยกเว้น

void addProductType(String productType)

เพิ่มประเภทสินค้าลงในตัวเลือกการเลือกอุปกรณ์

void addProperty(String propertyKey, String propValue)

เพิ่มเกณฑ์พร็อพเพอร์ตี้ลงในตัวเลือกการเลือกอุปกรณ์

void addSerial(String serialNumber)

เพิ่มหมายเลขซีเรียลลงในตัวเลือกการเลือกอุปกรณ์

static IDeviceSelection createForSerial(String serial)

เมธอด Factory Helper เพื่อสร้าง IDeviceSelection ที่จะจับคู่อุปกรณ์ที่มีซีเรียลที่ระบุเท่านั้น

boolean deviceRequested()

boolean emulatorRequested()

String fetchEnvironmentVariable(String name)

ฟังก์ชันตัวช่วยที่ใช้ในการดึงตัวแปรสภาพแวดล้อม

boolean gceDeviceRequested()

IDeviceSelection.BaseDeviceType getBaseDeviceTypeRequested()

แสดงประเภทอุปกรณ์ที่เราควรใช้

Integer getBatteryLevel(IDevice device)

ดึงข้อมูลระดับแบตเตอรี่ของอุปกรณ์ที่ระบุ

String getDeviceProductType(IDevice device)

รับประเภทสินค้าของอุปกรณ์ที่ระบุ

String getDeviceProductVariant(IDevice device)

รับสินค้าย่อยของอุปกรณ์ที่ระบุ

DeviceSelectionOptions.DeviceRequestedType getDeviceTypeRequested()
Collection<String> getExcludeSerials()

รับสำเนาของรายการการยกเว้นหมายเลขซีเรียล

Integer getMaxBatteryLevel()

รับระดับแบตเตอรี่สูงสุดที่ขอ

Integer getMaxBatteryTemperature()

รับระดับแบตเตอรี่สูงสุดที่ขอ

Integer getMinBatteryLevel()

รับระดับแบตเตอรี่ขั้นต่ำที่ขอ

Map<String, String> getNoMatchReason()

แสดงผลเหตุผลที่จับคู่อุปกรณ์ไม่ได้

Collection<String> getProductTypes()

รับสำเนารายการประเภทสินค้า

Map<String, String> getProperties()

แสดงผลแผนที่ของรายการพร็อพเพอร์ตี้

boolean getRequireBatteryCheck()

รับว่าต้องตรวจสอบแบตเตอรี่สำหรับอุปกรณ์ที่มีระดับแบตเตอรี่ที่ไม่รู้จักหรือไม่

boolean getRequireBatteryTemperatureCheck()

รับว่าต้องตรวจสอบอุณหภูมิแบตเตอรี่สำหรับอุปกรณ์ที่มีอุณหภูมิแบตเตอรี่ที่ไม่รู้จักหรือไม่

Collection<String> getSerials(IDevice device)

รับสำเนาหมายเลขซีเรียล

List<String> getSerials()

แสดงรายการซีเรียลที่ขอ

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

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

ตั้งค่าประเภทอุปกรณ์ที่เราควรใช้

void setDeviceRequested(boolean deviceRequested)

ตั้งค่าสถานะที่ขอโปรแกรมจำลอง

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

ตั้งค่าสถานะที่ขอโปรแกรมจำลอง

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

ตั้งระดับแบตเตอรี่สูงสุด

void setMaxBatteryTemperature(Integer maxBatteryTemperature)

ตั้งระดับแบตเตอรี่สูงสุด

void setMinBatteryLevel(Integer minBattery)

ตั้งระดับแบตเตอรี่ขั้นต่ำ

void setNullDeviceRequested(boolean nullDeviceRequested)

ตั้งค่าสถานะอุปกรณ์ว่างที่ขอ

void setRequireBatteryCheck(boolean requireCheck)

ตั้งค่าว่าต้องตรวจสอบแบตเตอรี่สำหรับอุปกรณ์ที่ไม่ทราบระดับแบตเตอรี่หรือไม่

void setRequireBatteryTemperatureCheck(boolean requireCheckTemprature)

กำหนดว่าต้องตรวจสอบอุณหภูมิแบตเตอรี่สำหรับอุปกรณ์ที่มีอุณหภูมิแบตเตอรี่ที่ไม่รู้จักหรือไม่

void setSerial(String... serialNumber)

ตั้งค่ารายการรวมหมายเลขซีเรียลโดยแทนที่ค่าที่มีอยู่

void setStubEmulatorRequested(boolean stubEmulatorRequested)

ตั้งค่าสถานะที่ขอโปรแกรมจำลอง Stub

boolean shouldCreateTemporarilyPlaceholder()

สร้างตัวยึดตำแหน่งชั่วคราวจากข้อมูลเมตา

boolean stubEmulatorRequested()

เครื่องมือสร้างสาธารณะ

DeviceSelectionOptions

public DeviceSelectionOptions ()

เมธอดสาธารณะ

addExcludeSerial

public void addExcludeSerial (String serialNumber)

เพิ่มหมายเลขซีเรียลลงในรายการการยกเว้น

addProductType

public void addProductType (String productType)

เพิ่มประเภทสินค้าลงในตัวเลือกการเลือกอุปกรณ์

addProperty

public void addProperty (String propertyKey, 
                String propValue)

เพิ่มเกณฑ์พร็อพเพอร์ตี้ลงในตัวเลือกการเลือกอุปกรณ์

พารามิเตอร์
propertyKey String

propValue String

addSerial

public void addSerial (String serialNumber)

เพิ่มหมายเลขซีเรียลลงในตัวเลือกการเลือกอุปกรณ์

createForSerial

public static IDeviceSelection createForSerial (String serial)

เมธอด Factory Helper เพื่อสร้าง IDeviceSelection ที่จะจับคู่อุปกรณ์ที่มีซีเรียลที่ระบุเท่านั้น

พารามิเตอร์
serial String

การคืนสินค้า
IDeviceSelection

deviceRequested

public boolean deviceRequested ()

การคืนสินค้า
boolean

emulatorRequested

public boolean emulatorRequested ()

การคืนสินค้า
boolean

fetchEnvironmentVariable

public String fetchEnvironmentVariable (String name)

ฟังก์ชันตัวช่วยที่ใช้ในการดึงตัวแปรสภาพแวดล้อม ซึ่งเป็น Wrapper รอบ System.getenv(String) โดยทำเพื่อวัตถุประสงค์ในการทำ Unit Test

พารามิเตอร์
name String: ตัวแปรสภาพแวดล้อมที่จะดึงข้อมูล

การคืนสินค้า
String ค่า String ของตัวแปรสภาพแวดล้อม หรือ null หากไม่มี

gceDeviceRequested

public boolean gceDeviceRequested ()

การคืนสินค้า
boolean

getBaseDeviceTypeRequested

public IDeviceSelection.BaseDeviceType getBaseDeviceTypeRequested ()

แสดงประเภทอุปกรณ์ที่เราควรใช้

การคืนสินค้า
IDeviceSelection.BaseDeviceType

getBatteryLevel

public Integer getBatteryLevel (IDevice device)

ดึงข้อมูลระดับแบตเตอรี่ของอุปกรณ์ที่ระบุ

พารามิเตอร์
device IDevice: IDevice

การคืนสินค้า
Integer ระดับแบตเตอรี่ของอุปกรณ์หรือ null หากไม่ทราบ

getDeviceProductType

public String getDeviceProductType (IDevice device)

รับประเภทสินค้าของอุปกรณ์ที่ระบุ

พารามิเตอร์
device IDevice: IDevice

การคืนสินค้า
String ประเภทสินค้าของอุปกรณ์หรือ null หากไม่ทราบ

getDeviceProductVariant

public String getDeviceProductVariant (IDevice device)

รับสินค้าย่อยของอุปกรณ์ที่ระบุ

พารามิเตอร์
device IDevice: IDevice

การคืนสินค้า
String สินค้าย่อยของอุปกรณ์หรือ null หากไม่ทราบ

getDeviceTypeRequested

public DeviceSelectionOptions.DeviceRequestedType getDeviceTypeRequested ()

การคืนสินค้า
DeviceSelectionOptions.DeviceRequestedType

getExcludeSerials

public Collection<String> getExcludeSerials ()

รับสำเนาของรายการการยกเว้นหมายเลขซีเรียล

การคืนสินค้า
Collection<String> Collection หมายเลขซีเรียล

getMaxBatteryLevel

public Integer getMaxBatteryLevel ()

รับระดับแบตเตอรี่สูงสุดที่ขอ

การคืนสินค้า
Integer

getMaxBatteryTemperature

public Integer getMaxBatteryTemperature ()

รับระดับแบตเตอรี่สูงสุดที่ขอ

การคืนสินค้า
Integer

getMinBatteryLevel

public Integer getMinBatteryLevel ()

รับระดับแบตเตอรี่ขั้นต่ำที่ขอ

การคืนสินค้า
Integer

getNoMatchReason

public Map<String, String> getNoMatchReason ()

แสดงผลเหตุผลที่จับคู่อุปกรณ์ไม่ได้

การคืนสินค้า
Map<String, String> แผนที่ของหมายเลขซีเรียลไปยังเหตุผลที่ไม่ได้จัดสรร

getProductTypes

public Collection<String> getProductTypes ()

รับสำเนารายการประเภทสินค้า

การคืนสินค้า
Collection<String> Collection ประเภทผลิตภัณฑ์

getProperties

public Map<String, String> getProperties ()

แสดงผลแผนที่ของรายการพร็อพเพอร์ตี้

การคืนสินค้า
Map<String, String> Map ของชื่อพร็อพเพอร์ตี้อุปกรณ์เป็นค่า

getRequireBatteryCheck

public boolean getRequireBatteryCheck ()

รับว่าต้องตรวจสอบแบตเตอรี่สำหรับอุปกรณ์ที่มีระดับแบตเตอรี่ที่ไม่รู้จักหรือไม่

การคืนสินค้า
boolean

getRequireBatteryTemperatureCheck

public boolean getRequireBatteryTemperatureCheck ()

รับว่าต้องตรวจสอบอุณหภูมิแบตเตอรี่สำหรับอุปกรณ์ที่มีอุณหภูมิแบตเตอรี่ที่ไม่รู้จักหรือไม่

การคืนสินค้า
boolean

getSerials

public Collection<String> getSerials (IDevice device)

รับสำเนาหมายเลขซีเรียล

พารามิเตอร์
device IDevice: IDevice ที่แสดงถึงอุปกรณ์ที่พิจารณาสำหรับการเลือก

การคืนสินค้า
Collection<String> Collection หมายเลขซีเรียล

getSerials

public List<String> getSerials ()

แสดงรายการซีเรียลที่ขอ

การคืนสินค้า
List<String>

localVirtualDeviceRequested

public boolean localVirtualDeviceRequested ()

การคืนสินค้า
boolean

ผลลัพธ์ที่ตรงกัน

public boolean matches (IDevice device)

พารามิเตอร์
device IDevice

การคืนสินค้า
boolean true หาก IDevice ที่ระบุตรงกับตัวเลือกที่ให้ไว้ false มิฉะนั้น

nullDeviceRequested

public boolean nullDeviceRequested ()

การคืนสินค้า
boolean

remoteDeviceRequested

public boolean remoteDeviceRequested ()

การคืนสินค้า
boolean

setBaseDeviceTypeRequested

public void setBaseDeviceTypeRequested (IDeviceSelection.BaseDeviceType type)

ตั้งค่าประเภทอุปกรณ์ที่เราควรใช้

พารามิเตอร์
type IDeviceSelection.BaseDeviceType

setDeviceRequested

public void setDeviceRequested (boolean deviceRequested)

ตั้งค่าสถานะที่ขอโปรแกรมจำลอง

พารามิเตอร์
deviceRequested boolean

setDeviceTypeRequested

public void setDeviceTypeRequested (DeviceSelectionOptions.DeviceRequestedType requestedType)

พารามิเตอร์
requestedType DeviceSelectionOptions.DeviceRequestedType

setEmulatorRequested

public void setEmulatorRequested (boolean emulatorRequested)

ตั้งค่าสถานะที่ขอโปรแกรมจำลอง

พารามิเตอร์
emulatorRequested boolean

setGceDeviceRequested

public void setGceDeviceRequested (boolean gceDeviceRequested)

พารามิเตอร์
gceDeviceRequested boolean

setMaxBatteryLevel

public void setMaxBatteryLevel (Integer maxBattery)

ตั้งระดับแบตเตอรี่สูงสุด

พารามิเตอร์
maxBattery Integer

setMaxBatteryTemperature

public void setMaxBatteryTemperature (Integer maxBatteryTemperature)

ตั้งระดับแบตเตอรี่สูงสุด

พารามิเตอร์
maxBatteryTemperature Integer

setMinBatteryLevel

public void setMinBatteryLevel (Integer minBattery)

ตั้งระดับแบตเตอรี่ขั้นต่ำ

พารามิเตอร์
minBattery Integer

setNullDeviceRequested

public void setNullDeviceRequested (boolean nullDeviceRequested)

ตั้งค่าสถานะอุปกรณ์ว่างที่ขอ

พารามิเตอร์
nullDeviceRequested boolean

setRequireBatteryCheck

public void setRequireBatteryCheck (boolean requireCheck)

ตั้งค่าว่าต้องตรวจสอบแบตเตอรี่สำหรับอุปกรณ์ที่ไม่ทราบระดับแบตเตอรี่หรือไม่

พารามิเตอร์
requireCheck boolean

setRequireBatteryTemperatureCheck

public void setRequireBatteryTemperatureCheck (boolean requireCheckTemprature)

กำหนดว่าต้องตรวจสอบอุณหภูมิแบตเตอรี่สำหรับอุปกรณ์ที่มีอุณหภูมิแบตเตอรี่ที่ไม่รู้จักหรือไม่

พารามิเตอร์
requireCheckTemprature boolean

setSerial

public void setSerial (String... serialNumber)

ตั้งค่ารายการรวมหมายเลขซีเรียลโดยแทนที่ค่าที่มีอยู่

พารามิเตอร์
serialNumber String

setStubEmulatorRequested

public void setStubEmulatorRequested (boolean stubEmulatorRequested)

ตั้งค่าสถานะที่ขอโปรแกรมจำลอง Stub

พารามิเตอร์
stubEmulatorRequested boolean

shouldCreateTemporarilyPlaceholder

public boolean shouldCreateTemporarilyPlaceholder ()

สร้างตัวยึดตำแหน่งชั่วคราวจากข้อมูลเมตา

การคืนสินค้า
boolean

stubEmulatorRequested

public boolean stubEmulatorRequested ()

การคืนสินค้า
boolean