อุปกรณ์ Android ระยะไกล

public class RemoteAndroidDevice
extends TestDevice

java.lang.Object
com.android.tradefed.device.NativeDevice
com.android.tradefed.device.TestDevice
com.android.tradefed.device.RemoteAndroidอุปกรณ์


การใช้งาน ITestDevice สำหรับอุปกรณ์ Android แบบสแต็กเต็มรูปแบบที่เชื่อมต่อผ่านการเชื่อมต่อ adb สมมติว่าซีเรียลของอุปกรณ์จะอยู่ในรูปแบบ : : ใน adb

สรุป

ค่าคงที่

long DEFAULT_SHORT_CMD_TIMEOUT

int MAX_RETRIES

long RETRY_INTERVAL_MS

long WAIT_FOR_ADB_CONNECT

ผู้รับเหมาก่อสร้างสาธารณะ

RemoteAndroidDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

สร้างอุปกรณ์ RemoteAndroidDevice

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

static boolean checkSerialFormatValid (String serialString)

ตรวจสอบว่ารูปแบบของอนุกรมเป็นไปตามที่คาดไว้หรือไม่ :ท่าเรือ

DeviceDescriptor getDeviceDescriptor (boolean shortDescriptor)

ส่งคืน DeviceDescriptor จากข้อมูลอุปกรณ์เพื่อรับข้อมูลโดยไม่ต้องผ่านวัตถุอุปกรณ์จริง

String getFastbootSerialNumber ()

ส่งกลับหมายเลขซีเรียลของโหมด fastboot

String getMacAddress ()

ส่งกลับที่อยู่ MAC ของอุปกรณ์ จะเป็นโมฆะหากล้มเหลวในการสืบค้นจากอุปกรณ์

boolean isEncryptionSupported ()

ส่งคืนหากอุปกรณ์รองรับการเข้ารหัส

ค่าคงที่

DEFAULT_SHORT_CMD_TIMEOUT

protected static final long DEFAULT_SHORT_CMD_TIMEOUT

ค่าคงที่: 20000 (0x0000000000004e20)

MAX_RETIES

protected static final int MAX_RETRIES

ค่าคงที่: 5 (0x00000005)

ลองอีกครั้ง_INTERVAL_MS

protected static final long RETRY_INTERVAL_MS

ค่าคงที่: 5,000 (0x0000000000001388)

WAIT_FOR_ADB_CONNECT

public static final long WAIT_FOR_ADB_CONNECT

ค่าคงที่: 120000 (0x000000000001d4c0)

ผู้รับเหมาก่อสร้างสาธารณะ

อุปกรณ์ Android ระยะไกล

public RemoteAndroidDevice (IDevice device, 
                IDeviceStateMonitor stateMonitor, 
                IDeviceMonitor allocationMonitor)

สร้างอุปกรณ์ RemoteAndroidDevice

พารามิเตอร์
device IDevice : IDevice ที่เกี่ยวข้อง

stateMonitor IDeviceStateMonitor : กลไก IDeviceStateMonitor ที่จะใช้

allocationMonitor IDeviceMonitor : IDeviceMonitor เพื่อแจ้งการเปลี่ยนแปลงสถานะการจัดสรร

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

ตรวจสอบSerialFormatValid

public static boolean checkSerialFormatValid (String serialString)

ตรวจสอบว่ารูปแบบของอนุกรมเป็นไปตามที่คาดไว้หรือไม่ :ท่าเรือ

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

การส่งคืน
boolean เป็นจริงหากรูปแบบถูกต้อง มิฉะนั้นจะเป็นเท็จ

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor (boolean shortDescriptor)

ส่งคืน DeviceDescriptor จากข้อมูลอุปกรณ์เพื่อรับข้อมูลโดยไม่ต้องผ่านวัตถุอุปกรณ์จริง

พารามิเตอร์
shortDescriptor boolean : จะจำกัด descriptor ให้แสดงข้อมูลขั้นต่ำหรือไม่

การส่งคืน
DeviceDescriptor

รับ FastbootSerialNumber

public String getFastbootSerialNumber ()

ส่งกลับหมายเลขซีเรียลของโหมด fastboot

การส่งคืน
String

รับMacAddress

public String getMacAddress ()

ส่งกลับที่อยู่ MAC ของอุปกรณ์ จะเป็นโมฆะหากล้มเหลวในการสืบค้นจากอุปกรณ์

การส่งคืน
String

รองรับการเข้ารหัสแล้ว

public boolean isEncryptionSupported ()

ส่งคืนหากอุปกรณ์รองรับการเข้ารหัส

การส่งคืน
boolean true หากอุปกรณ์รองรับการเข้ารหัส