HandleViewDebug

public final class HandleViewDebug
extends ChunkHandler

java.lang.Object
   ↳ com.android.tradefed.device.server.jdwp.JdwpInterceptor
     ↳ com.android.tradefed.device.server.jdwp.chunkhandler.ChunkHandler
       ↳ com.android.tradefed.device.server.jdwp.chunkhandler.HandleViewDebug


摘要

公用方法

static void captureLayers(ClientImpl client, String viewRoot, DebugViewDumpHandler handler)
static void captureView(Client client, String viewRoot, String view, DebugViewDumpHandler handler)
void clientDisconnected(ClientImpl client)

用戶端已離開。

void clientReady(ClientImpl client)

用戶端已準備就緒。

static void dumpDisplayList(Client client, String viewRoot, String view)
static void dumpTheme(ClientImpl client, String viewRoot, DebugViewDumpHandler handler)
static void dumpViewHierarchy(Client client, String viewRoot, boolean skipChildren, boolean includeProperties, boolean useV2, DebugViewDumpHandler handler)
void handleChunk(ClientImpl client, int type, ByteBuffer data, boolean isReply, int msgId)

處理傳入的區塊。

static void invalidateView(ClientImpl client, String viewRoot, String view)
static void invokeMethod(ClientImpl client, String viewRoot, String view, String method, Object... args)
static void listViewRoots(Client client, DebugViewDumpHandler replyHandler)
static void profileView(ClientImpl client, String viewRoot, String view, DebugViewDumpHandler handler)
static void register(MonitorThread mt)
static void requestLayout(ClientImpl client, String viewRoot, String view)
static void sendStartGlTracing(ClientImpl client)
static void sendStopGlTracing(ClientImpl client)
static void setLayoutParameter(ClientImpl client, String viewRoot, String view, String parameter, int value)

公用方法

captureLayers

public static void captureLayers (ClientImpl client, 
                String viewRoot, 
                DebugViewDumpHandler handler)

參數
client ClientImpl

viewRoot String

handler DebugViewDumpHandler

captureView

public static void captureView (Client client, 
                String viewRoot, 
                String view, 
                DebugViewDumpHandler handler)

參數
client Client

viewRoot String

view String

handler DebugViewDumpHandler

clientDisconnected

public void clientDisconnected (ClientImpl client)

用戶端已離開。可用於清除與這個用戶端連線相關聯的任何資源。

參數
client ClientImpl

clientReady

public void clientReady (ClientImpl client)

用戶端已準備就緒。當用戶端判斷為 DDM 感知型 (通常是在收到 HELO 回應後),監控執行緒會在所有處理常式上呼叫這個方法。

處理常式可利用這個機會初始化用戶端活動。因為我們很有可能想傳送訊息給用戶端,所以這個方法可能會擲回 IOException。

參數
client ClientImpl

dumpDisplayList

public static void dumpDisplayList (Client client, 
                String viewRoot, 
                String view)

參數
client Client

viewRoot String

view String

dumpTheme

public static void dumpTheme (ClientImpl client, 
                String viewRoot, 
                DebugViewDumpHandler handler)

參數
client ClientImpl

viewRoot String

handler DebugViewDumpHandler

dumpViewHierarchy

public static void dumpViewHierarchy (Client client, 
                String viewRoot, 
                boolean skipChildren, 
                boolean includeProperties, 
                boolean useV2, 
                DebugViewDumpHandler handler)

參數
client Client

viewRoot String

skipChildren boolean

includeProperties boolean

useV2 boolean

handler DebugViewDumpHandler

handleChunk

public void handleChunk (ClientImpl client, 
                int type, 
                ByteBuffer data, 
                boolean isReply, 
                int msgId)

處理傳入的區塊。資料 (區塊類型為「type」) 會從「data」的開頭開始,並持續到 data.limit()。

如果設定了「isReply」,則「msgId」會是我們傳送給用戶端的請求 ID。 否則,就是用戶端為這個事件產生的 ID。請注意,回覆封包中可能包含我們未註冊的區塊。

處理常式不得修改「data」的內容。

參數
client ClientImpl

type int

data ByteBuffer

isReply boolean

msgId int

invalidateView

public static void invalidateView (ClientImpl client, 
                String viewRoot, 
                String view)

參數
client ClientImpl

viewRoot String

view String

invokeMethod

public static void invokeMethod (ClientImpl client, 
                String viewRoot, 
                String view, 
                String method, 
                Object... args)

參數
client ClientImpl

viewRoot String

view String

method String

args Object

listViewRoots

public static void listViewRoots (Client client, 
                DebugViewDumpHandler replyHandler)

參數
client Client

replyHandler DebugViewDumpHandler

profileView

public static void profileView (ClientImpl client, 
                String viewRoot, 
                String view, 
                DebugViewDumpHandler handler)

參數
client ClientImpl

viewRoot String

view String

handler DebugViewDumpHandler

註冊

public static void register (MonitorThread mt)

參數
mt MonitorThread

requestLayout

public static void requestLayout (ClientImpl client, 
                String viewRoot, 
                String view)

參數
client ClientImpl

viewRoot String

view String

sendStartGlTracing

public static void sendStartGlTracing (ClientImpl client)

參數
client ClientImpl

sendStopGlTracing

public static void sendStopGlTracing (ClientImpl client)

參數
client ClientImpl

setLayoutParameter

public static void setLayoutParameter (ClientImpl client, 
                String viewRoot, 
                String view, 
                String parameter, 
                int value)

參數
client ClientImpl

viewRoot String

view String

parameter String

value int