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


Ringkasan

Metode publik

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

Klien telah keluar.

void clientReady(ClientImpl client)

Klien sudah siap.

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)

Menangani chunk yang masuk.

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)

Metode publik

captureLayers

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

Parameter
client ClientImpl

viewRoot String

handler DebugViewDumpHandler

captureView

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

Parameter
client Client

viewRoot String

view String

handler DebugViewDumpHandler

clientDisconnected

public void clientDisconnected (ClientImpl client)

Klien telah keluar. Dapat digunakan untuk membersihkan semua resource yang terkait dengan koneksi klien ini.

Parameter
client ClientImpl

clientReady

public void clientReady (ClientImpl client)

Klien sudah siap. Thread monitor memanggil metode ini pada semua handler saat klien ditentukan sebagai kompatibel dengan DDM (biasanya setelah menerima respons HELO).

Handler dapat menggunakan kesempatan ini untuk melakukan inisialisasi aktivitas sisi klien. Karena ada peluang yang cukup besar bahwa kita akan ingin mengirim pesan kepada klien, metode ini dapat memunculkan IOException.

Parameter
client ClientImpl

dumpDisplayList

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

Parameter
client Client

viewRoot String

view String

dumpTheme

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

Parameter
client ClientImpl

viewRoot String

handler DebugViewDumpHandler

dumpViewHierarchy

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

Parameter
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)

Menangani chunk yang masuk. Data, dari jenis chunk "type", dimulai di awal "data" dan berlanjut ke data.limit().

Jika "isReply" disetel, "msgId" akan menjadi ID permintaan yang kami kirim ke klien. Jika tidak, ID ini adalah ID yang dihasilkan oleh klien untuk peristiwa ini. Perhatikan bahwa kami mungkin menerima potongan dalam paket balasan yang tidak kami daftarkan.

Handler tidak boleh mengubah konten "data".

Parameter
client ClientImpl

type int

data ByteBuffer

isReply boolean

msgId int

invalidateView

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

Parameter
client ClientImpl

viewRoot String

view String

invokeMethod

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

Parameter
client ClientImpl

viewRoot String

view String

method String

args Object

listViewRoots

public static void listViewRoots (Client client, 
                DebugViewDumpHandler replyHandler)

Parameter
client Client

replyHandler DebugViewDumpHandler

profileView

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

Parameter
client ClientImpl

viewRoot String

view String

handler DebugViewDumpHandler

mendaftar

public static void register (MonitorThread mt)

Parameter
mt MonitorThread

requestLayout

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

Parameter
client ClientImpl

viewRoot String

view String

sendStartGlTracing

public static void sendStartGlTracing (ClientImpl client)

Parameter
client ClientImpl

sendStopGlTracing

public static void sendStopGlTracing (ClientImpl client)

Parameter
client ClientImpl

setLayoutParameter

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

Parameter
client ClientImpl

viewRoot String

view String

parameter String

value int