RemoteAndroidVirtualDevice

public class RemoteAndroidVirtualDevice
extends RemoteAndroidDevice

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 עבור מכשיר אנדרואיד מלא שפועל ב-Google Compute Engine (Gce). נניח שסדרת המכשיר תהיה בפורמט : ב-adb.

סיכום

בנאים ציבוריים

RemoteAndroidVirtualDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

יוצר RemoteAndroidVirtualDevice .

שיטות ציבוריות

GceAvdInfo getAvdInfo ()

מחזיר את ה- GceAvdInfo מה-VM המרוחק שנוצר.

GceAvdInfo getAvdInfoAnyState ()

מחזיר את ה- GceAvdInfo מה-VM המרוחק שנוצר.

DeviceDescriptor getDeviceDescriptor ()

החזר DeviceDescriptor ממידע המכשיר כדי לקבל מידע עליו מבלי להעביר את אובייקט המכשיר בפועל.

GceSshTunnelMonitor getGceSshMonitor ()

מחזיר את ה- GceSshTunnelMonitor של המכשיר.

getTombstones ()

לדיונון יש תכונה מיוחדת שמביאה את המצבות למארח המרוחק שם נוכל להשיג אותן ישירות.

void postBootSetup ()

{@inherit }

void postInvocationTearDown (Throwable exception)

שלבים נוספים עבור ניקוי נדרש ספציפי למכשיר שיבוצעו לאחר ביצוע ההזמנה.

CommandResult powerwash ()

נסה לבצע powerwash מופע GCE

CommandResult powerwashGce (String user, Integer offset)

נסה לבצע powerwash מופע GCE

boolean powerwashGce ()

נסה לבצע powerwash מופע GCE

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

שלבים נוספים עבור הגדרה נדרשת ספציפית למכשיר שיבוצעו במכשיר לפני זרימת הפנייה.

boolean recoverDevice ()

ניסיונות לשחזר את התקשורת במכשיר.

void setAvdInfo ( GceAvdInfo gceAvdInfo)

הגדר את GceAvdInfo למכשיר שהושק.

void setGceSshMonitor ( GceSshTunnelMonitor gceSshMonitor)

עוקף את GceSshTunnelMonitor הפנימי של המכשיר.

שיטות מוגנות

void addExtraConnectionBuilderArgs ( DefaultConnection.ConnectionBuilder builder)
void doAdbReboot ( NativeDevice.RebootMode rebootMode, String reason)

בצע אתחול של adb.

long getCurrentTime ()

מחזירה את זמן המערכת הנוכחי.

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

הפעל את מכשיר ה-gce בפועל על סמך מידע הבנייה.

void postAdbReboot ()

פעולות נוספות אפשריות שניתן לבצע לאחר אתחול מחדש.

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

getAvdInfoAnyState

public GceAvdInfo getAvdInfoAnyState ()

מחזיר את ה- GceAvdInfo מה-VM המרוחק שנוצר. חוזר ללא קשר לסטטוס כדי שנוכל לבדוק את המידע.

החזרות
GceAvdInfo

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor ()

החזר DeviceDescriptor ממידע המכשיר כדי לקבל מידע עליו מבלי להעביר את אובייקט המכשיר בפועל.

החזרות
DeviceDescriptor

getGceSshMonitor

public GceSshTunnelMonitor getGceSshMonitor ()

מחזיר את ה- GceSshTunnelMonitor של המכשיר.

החזרות
GceSshTunnelMonitor

קבל מצבות

public  getTombstones ()

לדיונון יש תכונה מיוחדת שמביאה את המצבות למארח המרוחק שם נוכל להשיג אותן ישירות.

החזרות
רשימה של תיקי מצבות, ריקה אם אין מצבה.

זורק
DeviceNotAvailableException

postBootSetup

public void postBootSetup ()

{@inherit }

זורק
DeviceNotAvailableException

postInvocationTearDown

public void postInvocationTearDown (Throwable exception)

שלבים נוספים עבור ניקוי נדרש ספציפי למכשיר שיבוצעו לאחר ביצוע ההזמנה.

פרמטרים
exception Throwable : אם קיים, החריג האחרון שהועלה על ידי כשל הפנייה.

שטיפת כוח

public CommandResult powerwash ()

נסה לבצע powerwash מופע GCE

החזרות
CommandResult מחזיר CommandResult של ניסיונות Powerwash

זורק
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

powerwashGce

public CommandResult powerwashGce (String user, 
                Integer offset)

נסה לבצע powerwash מופע GCE

פרמטרים
user String : המשתמש המארח הפועל של AVD, null אם לא רלוונטי.

offset Integer : היסט מספר ההתקן של ה-AVD במארח, null אם לא רלוונטי

החזרות
CommandResult מחזיר CommandResult של ניסיונות Powerwash

זורק
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

powerwashGce

public boolean powerwashGce ()

נסה לבצע powerwash מופע GCE

החזרות
boolean מחזיר CommandResult של ניסיונות Powerwash

זורק
TargetSetupError

preInvocationSetup

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

שלבים נוספים עבור הגדרה נדרשת ספציפית למכשיר שיבוצעו במכשיר לפני זרימת הפנייה.

פרמטרים
info IBuildInfo : ה- IBuildInfo של המכשיר.

attributes MultiMap : התכונות המאוחסנות בהקשר ההזמנה

זורק
DeviceNotAvailableException
TargetSetupError

recoverDevice

public boolean recoverDevice ()

ניסיונות לשחזר את התקשורת במכשיר.

החזרות
boolean נכון אם התאוששות נוסתה והצליחה, מחזירה False אם השחזור נדלג

זורק
DeviceNotAvailableException

setAvdInfo

public void setAvdInfo (GceAvdInfo gceAvdInfo)

הגדר את GceAvdInfo למכשיר שהושק.

פרמטרים
gceAvdInfo GceAvdInfo

זורק
TargetSetupError

setGceSshMonitor

public void setGceSshMonitor (GceSshTunnelMonitor gceSshMonitor)

עוקף את GceSshTunnelMonitor הפנימי של המכשיר.

פרמטרים
gceSshMonitor GceSshTunnelMonitor

שיטות מוגנות

addExtraConnectionBuilderArgs

protected void addExtraConnectionBuilderArgs (DefaultConnection.ConnectionBuilder builder)

פרמטרים
builder DefaultConnection.ConnectionBuilder

doAdbReboot

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

בצע אתחול של adb.

פרמטרים
rebootMode NativeDevice.RebootMode : מצב של אתחול זה.

reason String : עבור אתחול מחדש זה.

זורק
DeviceNotAvailableException

getCurrentTime

protected long getCurrentTime ()

מחזירה את זמן המערכת הנוכחי. נחשף לבדיקה.

החזרות
long

launchGce

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

הפעל את מכשיר ה-gce בפועל על סמך מידע הבנייה.

פרמטרים
buildInfo IBuildInfo

attributes MultiMap

זורק
TargetSetupError

postAdbReboot

protected void postAdbReboot ()

פעולות נוספות אפשריות שניתן לבצע לאחר אתחול מחדש.

זורק
DeviceNotAvailableException

waitForTunnelOnline

protected void waitForTunnelOnline (long waitTime)

בדוק אם צג המנהרה פועל.

פרמטרים
waitTime long

זורק
DeviceNotAvailableException