Effective in 2026, to align with our trunk stable development model and ensure platform stability for the ecosystem, we will publish source code to AOSP in Q2 and Q4. For building and contributing to AOSP, we recommend utilizing android-latest-release instead of aosp-main. The android-latest-release manifest branch will always reference the most recent release pushed to AOSP. For more information, see Changes to AOSP.
Stay organized with collections
Save and categorize content based on your preferences.
HandleViewDebug
public
final
class
HandleViewDebug
extends ChunkHandler
Summary
Public methods |
static
void
|
captureLayers(ClientImpl client, String viewRoot, DebugViewDumpHandler handler)
|
static
void
|
captureView(Client client, String viewRoot, String view, DebugViewDumpHandler handler)
|
void
|
clientDisconnected(ClientImpl client)
Client has gone away.
|
void
|
clientReady(ClientImpl client)
Client is ready.
|
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)
Handle an incoming chunk.
|
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)
|
Public methods
captureLayers
public static void captureLayers (ClientImpl client,
String viewRoot,
DebugViewDumpHandler handler)
| Parameters |
client |
ClientImpl |
viewRoot |
String |
handler |
DebugViewDumpHandler |
captureView
public static void captureView (Client client,
String viewRoot,
String view,
DebugViewDumpHandler handler)
| Parameters |
client |
Client |
viewRoot |
String |
view |
String |
handler |
DebugViewDumpHandler |
clientDisconnected
public void clientDisconnected (ClientImpl client)
Client has gone away. Can be used to clean up any resources associated with this client
connection.
| Parameters |
client |
ClientImpl |
clientReady
public void clientReady (ClientImpl client)
Client is ready. The monitor thread calls this method on all handlers when the client is
determined to be DDM-aware (usually after receiving a HELO response.)
The handler can use this opportunity to initialize client-side activity. Because there's a
fair chance we'll want to send a message to the client, this method can throw an IOException.
| Parameters |
client |
ClientImpl |
dumpDisplayList
public static void dumpDisplayList (Client client,
String viewRoot,
String view)
| Parameters |
client |
Client |
viewRoot |
String |
view |
String |
dumpTheme
public static void dumpTheme (ClientImpl client,
String viewRoot,
DebugViewDumpHandler handler)
| Parameters |
client |
ClientImpl |
viewRoot |
String |
handler |
DebugViewDumpHandler |
dumpViewHierarchy
public static void dumpViewHierarchy (Client client,
String viewRoot,
boolean skipChildren,
boolean includeProperties,
boolean useV2,
DebugViewDumpHandler handler)
| Parameters |
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)
Handle an incoming chunk. The data, of chunk type "type", begins at the start of "data" and
continues to data.limit().
If "isReply" is set, then "msgId" will be the ID of the request we sent to the client.
Otherwise, it's the ID generated by the client for this event. Note that it's possible to
receive chunks in reply packets for which we are not registered.
The handler may not modify the contents of "data".
| Parameters |
client |
ClientImpl |
type |
int |
data |
ByteBuffer |
isReply |
boolean |
msgId |
int |
invalidateView
public static void invalidateView (ClientImpl client,
String viewRoot,
String view)
| Parameters |
client |
ClientImpl |
viewRoot |
String |
view |
String |
invokeMethod
public static void invokeMethod (ClientImpl client,
String viewRoot,
String view,
String method,
Object... args)
| Parameters |
client |
ClientImpl |
viewRoot |
String |
view |
String |
method |
String |
args |
Object |
listViewRoots
public static void listViewRoots (Client client,
DebugViewDumpHandler replyHandler)
| Parameters |
client |
Client |
replyHandler |
DebugViewDumpHandler |
profileView
public static void profileView (ClientImpl client,
String viewRoot,
String view,
DebugViewDumpHandler handler)
| Parameters |
client |
ClientImpl |
viewRoot |
String |
view |
String |
handler |
DebugViewDumpHandler |
register
public static void register (MonitorThread mt)
| Parameters |
mt |
MonitorThread |
requestLayout
public static void requestLayout (ClientImpl client,
String viewRoot,
String view)
| Parameters |
client |
ClientImpl |
viewRoot |
String |
view |
String |
sendStartGlTracing
public static void sendStartGlTracing (ClientImpl client)
| Parameters |
client |
ClientImpl |
sendStopGlTracing
public static void sendStopGlTracing (ClientImpl client)
| Parameters |
client |
ClientImpl |
setLayoutParameter
public static void setLayoutParameter (ClientImpl client,
String viewRoot,
String view,
String parameter,
int value)
| Parameters |
client |
ClientImpl |
viewRoot |
String |
view |
String |
parameter |
String |
value |
int |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-12-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-12-04 UTC."],[],[]]