ตัวเลือกการเลือกอุปกรณ์

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)

เมธอดจากโรงงานของ 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()
getExcludeSerials()

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

Integer getMaxBatteryLevel()

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

Integer getMaxBatteryTemperature()

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

Integer getMinBatteryLevel()

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

getNoMatchReason()

แสดงสาเหตุที่อุปกรณ์ไม่ตรงกัน

getProductTypes()

รับสำเนารายการประเภทผลิตภัณฑ์

getProperties()

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

boolean getRequireBatteryCheck()

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

boolean getRequireBatteryTemperatureCheck()

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

getSerials(IDevice device)

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

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)

ตั้งค่าการติดธงที่ขออุปกรณ์ Null

void setRequireBatteryCheck(boolean requireCheck)

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

void setRequireBatteryTemperatureCheck(boolean requireCheckTemprature)

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

void setSerial(String... serialNumber)

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

void setStubEmulatorRequested(boolean stubEmulatorRequested)

ตั้งค่าการแฟล็กที่ขอของตัวจำลอง Stub

boolean stubEmulatorRequested()

ช่างก่อสร้างสาธารณะ

ตัวเลือกการเลือกอุปกรณ์

public DeviceSelectionOptions ()

วิธีการสาธารณะ

เพิ่มการยกเว้นซีเรียล

public void addExcludeSerial (String serialNumber)

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

addProductType

public void addProductType (String productType)

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

เพิ่มพร็อพเพอร์ตี้

public void addProperty (String propertyKey, 
                String propValue)

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

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

propValue String

เพิ่มซีเรียล

public void addSerial (String serialNumber)

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

CreateForSerial

public static IDeviceSelection createForSerial (String serial)

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

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

คิกรีเทิร์น
IDeviceSelection

อุปกรณ์ที่ขอ

public boolean deviceRequested ()

คิกรีเทิร์น
boolean

ขอโปรแกรมจำลองแล้ว

public boolean emulatorRequested ()

คิกรีเทิร์น
boolean

ตัวแปรสภาพแวดล้อมการดึงข้อมูล

public String fetchEnvironmentVariable (String name)

ใช้ฟังก์ชันตัวช่วยเพื่อดึงข้อมูลตัวแปรสภาพแวดล้อม โดยพื้นฐานแล้วคือ Wrapper ของ System.getenv(String) ซึ่งทำขึ้นเพื่อการทดสอบ 1 หน่วย

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

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

gceDevice Request

public boolean gceDeviceRequested ()

คิกรีเทิร์น
boolean

getBaseDeviceTypeRequest

public IDeviceSelection.BaseDeviceType getBaseDeviceTypeRequested ()

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

คิกรีเทิร์น
IDeviceSelection.BaseDeviceType

รับระดับแบตเตอรี่

public Integer getBatteryLevel (IDevice device)

เรียกดูระดับแบตเตอรี่ของอุปกรณ์ที่กำหนด

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

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

getDeviceProductType

public String getDeviceProductType (IDevice device)

รับประเภทผลิตภัณฑ์ของอุปกรณ์ที่ระบุ

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

คิกรีเทิร์น
String ประเภทผลิตภัณฑ์ของอุปกรณ์หรือ null หากไม่ทราบ

รับรูปแบบผลิตภัณฑ์ของอุปกรณ์

public String getDeviceProductVariant (IDevice device)

รับผลิตภัณฑ์ย่อยของผลิตภัณฑ์ในอุปกรณ์ที่ระบุ

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

คิกรีเทิร์น
String ผลิตภัณฑ์ย่อยของอุปกรณ์หรือ null หากไม่ทราบ

getDeviceTypeRequest

public DeviceSelectionOptions.DeviceRequestedType getDeviceTypeRequested ()

คิกรีเทิร์น
DeviceSelectionOptions.DeviceRequestedType

getExcludeSerials

public  getExcludeSerials ()

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

คิกรีเทิร์น
หมายเลขซีเรียล ERROR(/Collection)

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

public Integer getMaxBatteryLevel ()

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

คิกรีเทิร์น
Integer

อุณหภูมิของ getMaxBattery

public Integer getMaxBatteryTemperature ()

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

คิกรีเทิร์น
Integer

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

public Integer getMinBatteryLevel ()

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

คิกรีเทิร์น
Integer

getNoMatchReason

public  getNoMatchReason ()

แสดงสาเหตุที่อุปกรณ์ไม่ตรงกัน

คิกรีเทิร์น
การแมปหมายเลขซีเรียลเพื่อเหตุผลที่ไม่ได้รับการจัดสรร

getProductTypes

public  getProductTypes ()

รับสำเนารายการประเภทผลิตภัณฑ์

คิกรีเทิร์น
ERROR(/Collection) ของประเภทผลิตภัณฑ์

getProperties

public  getProperties ()

แสดงแผนที่ของรายการที่พัก

คิกรีเทิร์น
ERROR(/Map) ของชื่อพร็อพเพอร์ตี้ของอุปกรณ์เป็นค่า

getข้อกำหนดของแบตเตอรี่การตรวจสอบ

public boolean getRequireBatteryCheck ()

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

คิกรีเทิร์น
boolean

การตรวจสอบอุณหภูมิของแบตเตอรี่ที่ขอ

public boolean getRequireBatteryTemperatureCheck ()

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

คิกรีเทิร์น
boolean

getSerials

public  getSerials (IDevice device)

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

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

คิกรีเทิร์น
หมายเลขซีเรียล ERROR(/Collection)

getSerials

public  getSerials ()

แสดงผลรายการอนุกรมที่ขอ

คิกรีเทิร์น

ขออุปกรณ์เสมือนจริงในเครื่องแล้ว

public boolean localVirtualDeviceRequested ()

คิกรีเทิร์น
boolean

ตรงกับ

public boolean matches (IDevice device)

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

คิกรีเทิร์น
boolean true หาก IDevice ที่ระบุตรงกับตัวเลือกที่ระบุ จ่าย false

อุปกรณ์ที่ขอเป็นค่าว่าง

public boolean nullDeviceRequested ()

คิกรีเทิร์น
boolean

ขออุปกรณ์ระยะไกลแล้ว

public boolean remoteDeviceRequested ()

คิกรีเทิร์น
boolean

setBaseDeviceTypeRequest

public void setBaseDeviceTypeRequested (IDeviceSelection.BaseDeviceType type)

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

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

setDeviceRequest

public void setDeviceRequested (boolean deviceRequested)

ตั้งค่าการแฟล็กที่ขอของโปรแกรมจำลอง

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

setDeviceTypeRequest

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

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

public void setMaxBatteryLevel (Integer maxBattery)

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

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

ตั้งค่าอุณหภูมิแบตเตอรี่สูงสุด

public void setMaxBatteryTemperature (Integer maxBatteryTemperature)

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

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

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

public void setMinBatteryLevel (Integer minBattery)

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

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

setNullDeviceRequested

public void setNullDeviceRequested (boolean nullDeviceRequested)

ตั้งค่าการติดธงที่ขออุปกรณ์ Null

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

setต้องระบุการตรวจสอบแบตเตอรี่

public void setRequireBatteryCheck (boolean requireCheck)

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

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

ตั้งค่าต้องตรวจสอบอุณหภูมิแบตเตอรี่

public void setRequireBatteryTemperatureCheck (boolean requireCheckTemprature)

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

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

ซีเรียล

public void setSerial (String... serialNumber)

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

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

setStubEmulatorRequested

public void setStubEmulatorRequested (boolean stubEmulatorRequested)

ตั้งค่าการแฟล็กที่ขอของตัวจำลอง Stub

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

stubEmulator ขอแล้ว

public boolean stubEmulatorRequested ()

คิกรีเทิร์น
boolean