CuttlefishDisplayHandler

public class CuttlefishDisplayHandler
extends Object

java.lang.Object
com.android.tradefed.device.internal.CuttlefishDisplayHandler


Tiện ích xử lý các yêu cầu hiển thị Cuttlefish. Tiện ích này chỉ dùng để sử dụng nội bộ thông qua các bài kiểm thử máy chủ dành riêng cho Cuttlefish.

Tóm tắt

Lớp lồng ghép

class CuttlefishDisplayHandler.Display

 

Hàm dựng công khai

CuttlefishDisplayHandler()

Phương thức công khai

int addDisplay(ITestDevice device, int width, int height, int dpi, int refreshRateHz)

Gọi `cvd display add ` trên thiết bị Cuttlefish đã cho.

Map<Integer, CuttlefishDisplayHandler.Display> listDisplays(ITestDevice device)

Gọi `cvd display list` trên thiết bị Cuttlefish đã cho.

void removeDisplay(ITestDevice device, int displayNumber)

Gọi `cvd display remove --display=` trên thiết bị Cuttlefish đã cho.

BufferedImage screenshotDisplay(ITestDevice device, int displayNumber)

Gọi `cvd display screenshot --display=` trên thiết bị Cuttlefish đã cho.

Hàm dựng công khai

CuttlefishDisplayHandler

public CuttlefishDisplayHandler ()

Phương thức công khai

addDisplay

public int addDisplay (ITestDevice device, 
                int width, 
                int height, 
                int dpi, 
                int refreshRateHz)

Gọi `cvd display add ` trên thiết bị Cuttlefish đã cho.

Tham số
device ITestDevice: Thiết bị cần sử dụng.

width int: Chiều rộng tính bằng pixel cho màn hình mới.

height int: Chiều cao tính bằng pixel cho màn hình mới.

dpi int: Số dpi tính bằng pixel trên mỗi inch cho màn hình mới.

refreshRateHz int: Tần số làm mới tính bằng hertz cho màn hình mới.

Giá trị trả về
int Số màn hình của màn hình mới thêm (nếu thành công).

Gửi
DeviceNotAvailableException

listDisplays

public Map<Integer, CuttlefishDisplayHandler.Display> listDisplays (ITestDevice device)

Gọi `cvd display list` trên thiết bị Cuttlefish đã cho.

Tham số
device ITestDevice: Thiết bị cần sử dụng.

Giá trị trả về
Map<Integer, CuttlefishDisplayHandler.Display>

Gửi
DeviceNotAvailableException

removeDisplay

public void removeDisplay (ITestDevice device, 
                int displayNumber)

Gọi `cvd display remove --display=` trên thiết bị Cuttlefish đã cho.

Tham số
device ITestDevice: Thiết bị cần sử dụng.

displayNumber int: Màn hình cần xoá.

Gửi
DeviceNotAvailableException

screenshotDisplay

public BufferedImage screenshotDisplay (ITestDevice device, 
                int displayNumber)

Gọi `cvd display screenshot --display=` trên thiết bị Cuttlefish đã cho.

Tham số
device ITestDevice: Thiết bị cần sử dụng.

displayNumber int: Màn hình cần chụp ảnh màn hình.

Giá trị trả về
BufferedImage

Gửi
DeviceNotAvailableException