Android Looper&Handler 源码

Native版Looper + Handler源码:

system/core/libutils/Looper.cpp
system/core/include/utils/Looper.h

 

Native层一个仿照HandlerThread.java实现的HandlerThread:

./packages/services/Car/libvehiclenetwork/native/HandlerThread.cpp
./packages/services/Car/libvehiclenetwork/include/HandlerThread.h

 

Java版Looper + Handler源码:
frameworks/base/core/java/android/os/Handler.java
frameworks/base/core/java/android/os/HandlerThread.java

 

Java版和C++版Looper + Handler的接壤处:

./frameworks/base/core/jni/android_os_MessageQueue.cpp
./frameworks/base/core/jni/android_os_MessageQueue.h
./frameworks/base/core/java/android/os/MessageQueue.java

你可能感兴趣的:(Android)