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 响应后)时,监控线程会在所有处理程序上调用此方法。

处理程序可以利用此机会初始化客户端 activity。由于我们很有可能会想向客户端发送消息,因此此方法可能会抛出 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