This is the document to read if you are new to ddmlib source code and want to make a change. The intent is to boost what can be achieved within a “window of naive interest”. You will not find function or class documentation here but rather the “big picture” which should allow you to build a mental map to help navigate the code.
DDMLib monitors devices state, debuggable app process, and JDWP messages (Standard debugger and Android JDWP extensions as defined in dalvik/docs/debugmon.html
(Dalvik VM Debug Monitor). The overall system relies on three Threads exchanging information in a waterfall where Thread 1 impacts Thread 2 selector S2 which in turns impacts Thread 3 selector S3.
DDMLib | ADB Server | Devices ---------------------------------------------------------------------------------------------------------------------- | | | | DeviceListMonitorTask (Thread 1)------------------> host:track-devices----+-----------------------------Device B | | | | | App Foo +------------->---------+ | +-----------------Device A | | | | | | App Bar | | DeviceClientMonitorTask (Thread 2)--------S2-+--<--- device:A track-jdwp -------------<-------+ | | | | | | | | | | | +--<--- device:B track-jdwp -------------<-----------)--------+ | | | | | | +------------->---------+ | | | | | | | | | MonitorThread (Thread 3)------------------S3-+--<--- device:A jdwp:Bar ----------------<-----------+ | | | | | +--<--- device:B jdwp:Foo ----------------<-------------------------+ | |
According to the previous section, notifications have a set Threading model.