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


Tóm tắt

Phương thức công khai

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

Ứng dụng đã ngừng hoạt động.

void clientReady(ClientImpl client)

Ứng dụng đã sẵn sàng.

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)

Xử lý một khối dữ liệu đến.

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)

Phương thức công khai

captureLayers

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

Tham số
client ClientImpl

viewRoot String

handler DebugViewDumpHandler

captureView

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

Tham số
client Client

viewRoot String

view String

handler DebugViewDumpHandler

clientDisconnected

public void clientDisconnected (ClientImpl client)

Ứng dụng đã ngừng hoạt động. Có thể dùng để dọn dẹp mọi tài nguyên được liên kết với kết nối máy khách này.

Tham số
client ClientImpl

clientReady

public void clientReady (ClientImpl client)

Ứng dụng đã sẵn sàng. Luồng giám sát gọi phương thức này trên tất cả các trình xử lý khi ứng dụng được xác định là có hỗ trợ DDM (thường là sau khi nhận được phản hồi HELO).

Trình xử lý có thể tận dụng cơ hội này để khởi chạy hoạt động phía máy khách. Vì có khả năng chúng ta sẽ muốn gửi thông báo đến máy khách, nên phương thức này có thể gửi một IOException.

Tham số
client ClientImpl

dumpDisplayList

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

Tham số
client Client

viewRoot String

view String

dumpTheme

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

Tham số
client ClientImpl

viewRoot String

handler DebugViewDumpHandler

dumpViewHierarchy

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

Tham số
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)

Xử lý một khối dữ liệu đến. Dữ liệu, thuộc loại khối "type", bắt đầu từ đầu "data" và tiếp tục đến data.limit().

Nếu bạn đặt "isReply", thì "msgId" sẽ là mã nhận dạng của yêu cầu mà chúng tôi đã gửi cho ứng dụng. Nếu không, đó là mã nhận dạng do ứng dụng tạo cho sự kiện này. Xin lưu ý rằng có thể bạn sẽ nhận được các đoạn trong gói phản hồi mà bạn chưa đăng ký.

Trình xử lý không được sửa đổi nội dung của "data".

Tham số
client ClientImpl

type int

data ByteBuffer

isReply boolean

msgId int

invalidateView

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

Tham số
client ClientImpl

viewRoot String

view String

invokeMethod

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

Tham số
client ClientImpl

viewRoot String

view String

method String

args Object

listViewRoots

public static void listViewRoots (Client client, 
                DebugViewDumpHandler replyHandler)

Tham số
client Client

replyHandler DebugViewDumpHandler

profileView

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

Tham số
client ClientImpl

viewRoot String

view String

handler DebugViewDumpHandler

đăng ký

public static void register (MonitorThread mt)

Tham số
mt MonitorThread

requestLayout

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

Tham số
client ClientImpl

viewRoot String

view String

sendStartGlTracing

public static void sendStartGlTracing (ClientImpl client)

Tham số
client ClientImpl

sendStopGlTracing

public static void sendStopGlTracing (ClientImpl client)

Tham số
client ClientImpl

setLayoutParameter

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

Tham số
client ClientImpl

viewRoot String

view String

parameter String

value int