Methods Summary |
---|
public void | connected()Called when the DDM server connects. The handler is allowed to
send messages to the server.
|
public void | disconnected()Called when the DDM server disconnects. Can be used to disable
periodic transmissions or clean up saved state.
|
public static java.lang.String | getAppName()
return mAppName;
|
public org.apache.harmony.dalvik.ddmc.Chunk | handleChunk(org.apache.harmony.dalvik.ddmc.Chunk request)Handle a chunk of data.
return null;
|
public static void | register()Register for the messages we're interested in.
|
private static void | sendAPNM(java.lang.String appName)
if (Config.LOGV)
Log.v("ddm", "Sending app name");
ByteBuffer out = ByteBuffer.allocate(4 + appName.length()*2);
out.order(ChunkHandler.CHUNK_ORDER);
out.putInt(appName.length());
putString(out, appName);
Chunk chunk = new Chunk(CHUNK_APNM, out);
DdmServer.sendChunk(chunk);
|
public static void | setAppName(java.lang.String name)Set the application name. Called when we get named, which may be
before or after DDMS connects. For the latter we need to send up
an APNM message.
if (name == null || name.length() == 0)
return;
mAppName = name;
// if DDMS is already connected, send the app name up
sendAPNM(name);
|