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-aware (โดยปกติหลังจากได้รับคำตอบ 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" จะเป็นรหัสของคำขอที่เราส่งไปยังไคลเอ็นต์ มิฉะนั้นจะเป็นรหัสที่ไคลเอ็นต์สร้างขึ้นสำหรับเหตุการณ์นี้ โปรดทราบว่าอาจ ได้รับก้อนข้อมูลในแพ็กเก็ตการตอบกลับที่เราไม่ได้ลงทะเบียนไว้

แฮนเดิลเลอร์อาจแก้ไขเนื้อหาของ "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