Từ xaAndroidThiết bị ảo
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 |
Mở rộng hoạt động RemoteAndroidDevice
cho thiết bị Android đầy đủ chạy trong Google Computing Engine (Gce). Giả sử nối tiếp thiết bị sẽ ở định dạng
Bản tóm tắt
Nhà thầu xây dựng công cộng | |
---|---|
RemoteAndroidVirtualDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor) |
Phương pháp công khai | |
---|---|
GceAvdInfo | getAvdInfo () Trả về |
DeviceDescriptor | getDeviceDescriptor () |
getTombstones () Mực nang có một tính năng đặc biệt là mang bia mộ đến máy chủ ở xa nơi chúng ta có thể lấy trực tiếp. | |
void | postBootSetup () {@thừa kế } |
void | postInvocationTearDown (Throwable exception) |
boolean | powerwashGce () Cố gắng powerwash một phiên bản GCE |
void | preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes) |
void | recoverDevice () Nỗ lực khôi phục liên lạc của thiết bị. |
void | setGceSshMonitor ( GceSshTunnelMonitor gceSshMonitor) Ghi đè |
void | setTestLogger (ITestLogger testLogger) |
Phương pháp được bảo vệ | |
---|---|
void | doAdbReboot ( NativeDevice.RebootMode rebootMode, String reason) Thực hiện khởi động lại adb. |
long | getCurrentTime () Trả về thời gian hiện tại của hệ thống. |
GceSshTunnelMonitor | getGceSshMonitor () Trả về |
void | launchGce (IBuildInfo buildInfo, MultiMap<String, String> attributes) Khởi chạy thiết bị gce thực tế dựa trên thông tin bản dựng. |
void | waitForTunnelOnline (long waitTime) Kiểm tra xem màn hình đường hầm có đang chạy không. |
Nhà thầu xây dựng công cộng
Từ xaAndroidThiết bị ảo
public RemoteAndroidVirtualDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
Tạo RemoteAndroidVirtualDevice
.
Thông số | |
---|---|
device | IDevice : IDevice được liên kết |
stateMonitor | IDeviceStateMonitor : cơ chế IDeviceStateMonitor để sử dụng |
allocationMonitor | IDeviceMonitor : IDeviceMonitor để thông báo về những thay đổi trạng thái phân bổ. |
Phương pháp công khai
getAvdInfo
public GceAvdInfo getAvdInfo ()
Trả về GceAvdInfo
từ máy ảo từ xa đã tạo. Trả về null nếu việc đưa lên không thành công.
Trả lại | |
---|---|
GceAvdInfo |
getDeviceDevicer
public DeviceDescriptor getDeviceDescriptor ()
Trả lại | |
---|---|
DeviceDescriptor |
lấy bia mộ
publicgetTombstones ()
Mực nang có một tính năng đặc biệt là mang bia mộ đến máy chủ ở xa nơi chúng ta có thể lấy trực tiếp.
Trả lại | |
---|---|
Ném | |
---|---|
DeviceNotAvailableException |
postBootSetup
public void postBootSetup ()
{@thừa kế }
Ném | |
---|---|
DeviceNotAvailableException |
postInvocationTearDown
public void postInvocationTearDown (Throwable exception)
Thông số | |
---|---|
exception | Throwable |
powerwashGce
public boolean powerwashGce ()
Cố gắng powerwash một phiên bản GCE
Trả lại | |
---|---|
boolean | trả về true nếu powerwash Gce thành công. |
Ném | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
DeviceNotAvailableException | |
TargetSetupError |
preInvocationSetup
public void preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes)
Thông số | |
---|---|
info | IBuildInfo |
attributes | MultiMap |
Ném | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
phục hồiThiết bị
public void recoverDevice ()
Nỗ lực khôi phục liên lạc của thiết bị.
Ném | |
---|---|
DeviceNotAvailableException |
setGceSshMonitor
public void setGceSshMonitor (GceSshTunnelMonitor gceSshMonitor)
Ghi đè GceSshTunnelMonitor
bên trong của thiết bị.
Thông số | |
---|---|
gceSshMonitor | GceSshTunnelMonitor |
setTestLogger
public void setTestLogger (ITestLogger testLogger)
Thông số | |
---|---|
testLogger | ITestLogger |
Phương pháp được bảo vệ
doAdbKhởi động lại
protected void doAdbReboot (NativeDevice.RebootMode rebootMode, String reason)
Thực hiện khởi động lại adb.
Thông số | |
---|---|
rebootMode | NativeDevice.RebootMode : một chế độ khởi động lại này. |
reason | String : cho lần khởi động lại này. |
Ném | |
---|---|
DeviceNotAvailableException |
lấy thời gian hiện tại
protected long getCurrentTime ()
Trả về thời gian hiện tại của hệ thống. Tiếp xúc để thử nghiệm.
Trả lại | |
---|---|
long |
getGceSshMonitor
protected GceSshTunnelMonitor getGceSshMonitor ()
Trả về GceSshTunnelMonitor
của thiết bị. Tiếp xúc để thử nghiệm.
Trả lại | |
---|---|
GceSshTunnelMonitor |
ra mắtGce
protected void launchGce (IBuildInfo buildInfo, MultiMap<String, String> attributes)
Khởi chạy thiết bị gce thực tế dựa trên thông tin bản dựng.
Thông số | |
---|---|
buildInfo | IBuildInfo |
attributes | MultiMap |
Ném | |
---|---|
TargetSetupError |
waitForTunnelTrực tuyến
protected void waitForTunnelOnline (long waitTime)
Kiểm tra xem màn hình đường hầm có đang chạy không.
Thông số | |
---|---|
waitTime | long |
Ném | |
---|---|
DeviceNotAvailableException |