RemoteAndroidVirtualDevice

public class RemoteAndroidVirtualDevice
extends RemoteAndroidDevice implements ITestLoggerReceiver

java.lang.Object
   ↳ com.android.tradefed.device.NativeDevice
     ↳ com.android.tradefed.device.TestDevice
       ↳ com.android.tradefed.device.RemoteAndroidDevice
         ↳ com.android.tradefed.device.cloud.RemoteAndroidVirtualDevice


ขยายลักษณะการทํางานของ RemoteAndroidDevice สําหรับอุปกรณ์ Android สแต็กแบบสมบูรณ์ที่ทํางานใน Google Compute Engine (GCE) สมมติว่าซีเรียลของอุปกรณ์จะอยู่ในรูปแบบ : ใน adb

สรุป

ตัวสร้างแบบสาธารณะ

RemoteAndroidVirtualDevice(IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

สร้าง RemoteAndroidVirtualDevice

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

GceAvdInfo getAvdInfo()

แสดงผล GceAvdInfo จาก VM ระยะไกลที่สร้างขึ้น

DeviceDescriptor getDeviceDescriptor()

getTombstones()

Cuttlefish มีฟีเจอร์พิเศษที่จะนำรายการที่ลบไปแล้วไปยังโฮสต์ระยะไกลที่เรารับข้อมูลได้โดยตรง

void postBootSetup()

{@inherit }

void postInvocationTearDown(Throwable exception)

boolean powerwashGce()

พยายามล้างข้อมูลอินสแตนซ์ GCE

void preInvocationSetup(IBuildInfo info, MultiMap<String, String> attributes)

void recoverDevice()

พยายามกู้คืนการสื่อสารของอุปกรณ์

void setGceSshMonitor(GceSshTunnelMonitor gceSshMonitor)

ลบล้าง GceSshTunnelMonitor ภายในของอุปกรณ์

void setTestLogger(ITestLogger testLogger)

วิธีการที่มีการป้องกัน

void doAdbReboot(NativeDevice.RebootMode rebootMode, String reason)

รีบูต adb

long getCurrentTime()

แสดงผลเวลาปัจจุบันของระบบ

GceSshTunnelMonitor getGceSshMonitor()

แสดงผล GceSshTunnelMonitor ของอุปกรณ์

void launchGce(IBuildInfo buildInfo, MultiMap<String, String> attributes)

เปิดอุปกรณ์ GCE จริงตามข้อมูลบิลด์

void waitForTunnelOnline(long waitTime)

ตรวจสอบว่าเครื่องมือตรวจสอบอุโมงค์ทำงานอยู่หรือไม่

ตัวสร้างแบบสาธารณะ

RemoteAndroidVirtualDevice

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

สร้าง RemoteAndroidVirtualDevice

พารามิเตอร์
device IDevice: IDevice ที่เชื่อมโยง

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

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

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

getAvdInfo

public GceAvdInfo getAvdInfo ()

แสดงผล GceAvdInfo จาก VM ระยะไกลที่สร้างขึ้น แสดงผล Null หากการเรียกให้แสดงไม่สําเร็จ

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

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor ()

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

getTombstones

public  getTombstones ()

Cuttlefish มีฟีเจอร์พิเศษที่จะนำรายการที่ลบไปแล้วไปยังโฮสต์ระยะไกลที่เรารับข้อมูลได้โดยตรง

คิกรีเทิร์น

การโยน
DeviceNotAvailableException

postBootSetup

public void postBootSetup ()

{@inherit }

การโยน
DeviceNotAvailableException

postInvocationTearDown

public void postInvocationTearDown (Throwable exception)

พารามิเตอร์
exception Throwable

powerwashGce

public boolean powerwashGce ()

พยายามล้างข้อมูลอินสแตนซ์ GCE

คิกรีเทิร์น
boolean แสดงค่า "จริง" หากล้างข้อมูล GCE สำเร็จ

การโยน
com.android.tradefed.targetprep.TargetSetupError
DeviceNotAvailableException
TargetSetupError

preInvocationSetup

public void preInvocationSetup (IBuildInfo info, 
                MultiMap<String, String> attributes)

พารามิเตอร์
info IBuildInfo

attributes MultiMap

การโยน
DeviceNotAvailableException
TargetSetupError

recoverDevice

public void recoverDevice ()

พยายามกู้คืนการสื่อสารของอุปกรณ์

การโยน
DeviceNotAvailableException

setGceSshMonitor

public void setGceSshMonitor (GceSshTunnelMonitor gceSshMonitor)

ลบล้าง GceSshTunnelMonitor ภายในของอุปกรณ์

พารามิเตอร์
gceSshMonitor GceSshTunnelMonitor

setTestLogger

public void setTestLogger (ITestLogger testLogger)

พารามิเตอร์
testLogger ITestLogger

วิธีการที่มีการป้องกัน

doAdbReboot

protected void doAdbReboot (NativeDevice.RebootMode rebootMode, 
                String reason)

รีบูต adb

พารามิเตอร์
rebootMode NativeDevice.RebootMode: โหมดของการรีบูตนี้

reason String: สำหรับการรีบูตครั้งนี้

การโยน
DeviceNotAvailableException

getCurrentTime

protected long getCurrentTime ()

แสดงผลเวลาปัจจุบันของระบบ แสดงเพื่อทดสอบ

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

getGceSshMonitor

protected GceSshTunnelMonitor getGceSshMonitor ()

แสดงผล GceSshTunnelMonitor ของอุปกรณ์ แสดงเพื่อทดสอบ

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

launchGce

protected void launchGce (IBuildInfo buildInfo, 
                MultiMap<String, String> attributes)

เปิดอุปกรณ์ GCE จริงตามข้อมูลบิลด์

พารามิเตอร์
buildInfo IBuildInfo

attributes MultiMap

การโยน
TargetSetupError

waitForTunnelOnline

protected void waitForTunnelOnline (long waitTime)

ตรวจสอบว่าเครื่องมือตรวจสอบอุโมงค์ทำงานอยู่หรือไม่

พารามิเตอร์
waitTime long

การโยน
DeviceNotAvailableException