CuttlefishDisplayHandler

public class CuttlefishDisplayHandler
extends Object

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


Cuttlefish のディスプレイ リクエストを処理するユーティリティ。これは、 Cuttlefish 固有のホストテストを介して内部でのみ使用することを目的としています。

概要

ネストされたクラス

class CuttlefishDisplayHandler.Display

 

パブリック コンストラクタ

CuttlefishDisplayHandler()

パブリック メソッド

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

指定された Cuttlefish デバイスで `cvd display add ` を呼び出します。

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

指定された Cuttlefish デバイスで `cvd display list` を呼び出します。

void removeDisplay(ITestDevice device, int displayNumber)

指定された Cuttlefish デバイスで `cvd display remove --display=` を呼び出します。

BufferedImage screenshotDisplay(ITestDevice device, int displayNumber)

指定された Cuttlefish デバイスで `cvd display screenshot --display=` を呼び出します。

パブリック コンストラクタ

CuttlefishDisplayHandler

public CuttlefishDisplayHandler ()

パブリック メソッド

addDisplay

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

指定された Cuttlefish デバイスで `cvd display add ` を呼び出します。

パラメータ
device ITestDevice: 使用するデバイス。

width int: 新しいディスプレイの幅(ピクセル単位)。

height int: 新しいディスプレイの高さ(ピクセル単位)。

dpi int: 新しいディスプレイの dpi(1 インチあたりのピクセル数)。

refreshRateHz int: 新しいディスプレイのリフレッシュ レート(ヘルツ単位)。

戻り値
int 追加された新しいディスプレイのディスプレイ番号(成功した場合)。

例外
DeviceNotAvailableException

listDisplays

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

指定された Cuttlefish デバイスで `cvd display list` を呼び出します。

パラメータ
device ITestDevice: 使用するデバイス。

戻り値
Map<Integer, CuttlefishDisplayHandler.Display>

例外
DeviceNotAvailableException

removeDisplay

public void removeDisplay (ITestDevice device, 
                int displayNumber)

指定された Cuttlefish デバイスで `cvd display remove --display=` を呼び出します。

パラメータ
device ITestDevice: 使用するデバイス。

displayNumber int: 削除するディスプレイ。

例外
DeviceNotAvailableException

screenshotDisplay

public BufferedImage screenshotDisplay (ITestDevice device, 
                int displayNumber)

指定された Cuttlefish デバイスで `cvd display screenshot --display=` を呼び出します。

パラメータ
device ITestDevice: 使用するデバイス。

displayNumber int: スクリーンショットを撮るディスプレイ。

戻り値
BufferedImage

例外
DeviceNotAvailableException