A partir de 2026, para alinhar com nosso modelo de desenvolvimento estável de tronco e garantir a estabilidade da plataforma para o ecossistema, vamos publicar o código-fonte no AOSP no segundo e quarto trimestres. Para criar e contribuir com o AOSP, recomendamos usar android-latest-release em vez de aosp-main. O branch de manifesto android-latest-release sempre vai fazer referência à versão mais recente enviada ao AOSP. Para mais informações, consulte Mudanças no AOSP.
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
HandleViewDebug
public
final
class
HandleViewDebug
extends ChunkHandler
Resumo
Métodos públicos |
static
void
|
captureLayers(ClientImpl client, String viewRoot, DebugViewDumpHandler handler)
|
static
void
|
captureView(Client client, String viewRoot, String view, DebugViewDumpHandler handler)
|
void
|
clientDisconnected(ClientImpl client)
O cliente saiu.
|
void
|
clientReady(ClientImpl client)
O cliente está pronto.
|
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)
Processa um bloco de entrada.
|
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)
|
Métodos públicos
captureLayers
public static void captureLayers (ClientImpl client,
String viewRoot,
DebugViewDumpHandler handler)
| Parâmetros |
client |
ClientImpl |
viewRoot |
String |
handler |
DebugViewDumpHandler |
captureView
public static void captureView (Client client,
String viewRoot,
String view,
DebugViewDumpHandler handler)
| Parâmetros |
client |
Client |
viewRoot |
String |
view |
String |
handler |
DebugViewDumpHandler |
clientDisconnected
public void clientDisconnected (ClientImpl client)
O cliente saiu. Pode ser usado para limpar todos os recursos associados a essa conexão
do cliente.
| Parâmetros |
client |
ClientImpl |
clientReady
public void clientReady (ClientImpl client)
O cliente está pronto. A linha de execução do monitor chama esse método em todos os manipuladores quando o cliente é
determinado como compatível com DDM (geralmente após receber uma resposta HELO).
O manipulador pode aproveitar essa oportunidade para inicializar a atividade do lado do cliente. Como há uma chance razoável de querermos enviar uma mensagem ao cliente, esse método pode gerar uma IOException.
| Parâmetros |
client |
ClientImpl |
dumpDisplayList
public static void dumpDisplayList (Client client,
String viewRoot,
String view)
| Parâmetros |
client |
Client |
viewRoot |
String |
view |
String |
dumpTheme
public static void dumpTheme (ClientImpl client,
String viewRoot,
DebugViewDumpHandler handler)
| Parâmetros |
client |
ClientImpl |
viewRoot |
String |
handler |
DebugViewDumpHandler |
dumpViewHierarchy
public static void dumpViewHierarchy (Client client,
String viewRoot,
boolean skipChildren,
boolean includeProperties,
boolean useV2,
DebugViewDumpHandler handler)
| Parâmetros |
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)
Processa um bloco de entrada. Os dados, do tipo de bloco "type", começam no início de "data" e continuam até data.limit().
Se "isReply" estiver definido, "msgId" será o ID da solicitação enviada ao cliente.
Caso contrário, é o ID gerado pelo cliente para esse evento. É possível receber partes em pacotes de resposta para os quais não estamos registrados.
O manipulador não pode modificar o conteúdo de "data".
| Parâmetros |
client |
ClientImpl |
type |
int |
data |
ByteBuffer |
isReply |
boolean |
msgId |
int |
invalidateView
public static void invalidateView (ClientImpl client,
String viewRoot,
String view)
| Parâmetros |
client |
ClientImpl |
viewRoot |
String |
view |
String |
invokeMethod
public static void invokeMethod (ClientImpl client,
String viewRoot,
String view,
String method,
Object... args)
| Parâmetros |
client |
ClientImpl |
viewRoot |
String |
view |
String |
method |
String |
args |
Object |
listViewRoots
public static void listViewRoots (Client client,
DebugViewDumpHandler replyHandler)
| Parâmetros |
client |
Client |
replyHandler |
DebugViewDumpHandler |
profileView
public static void profileView (ClientImpl client,
String viewRoot,
String view,
DebugViewDumpHandler handler)
| Parâmetros |
client |
ClientImpl |
viewRoot |
String |
view |
String |
handler |
DebugViewDumpHandler |
registrar
public static void register (MonitorThread mt)
| Parâmetros |
mt |
MonitorThread |
requestLayout
public static void requestLayout (ClientImpl client,
String viewRoot,
String view)
| Parâmetros |
client |
ClientImpl |
viewRoot |
String |
view |
String |
sendStartGlTracing
public static void sendStartGlTracing (ClientImpl client)
| Parâmetros |
client |
ClientImpl |
sendStopGlTracing
public static void sendStopGlTracing (ClientImpl client)
| Parâmetros |
client |
ClientImpl |
setLayoutParameter
public static void setLayoutParameter (ClientImpl client,
String viewRoot,
String view,
String parameter,
int value)
| Parâmetros |
client |
ClientImpl |
viewRoot |
String |
view |
String |
parameter |
String |
value |
int |
O conteúdo e os exemplos de código nesta página estão sujeitos às licenças descritas na Licença de conteúdo. Java e OpenJDK são marcas registradas da Oracle e/ou suas afiliadas.
Última atualização 2025-12-04 UTC.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-12-04 UTC."],[],[]]