1、WindowManager服务
文件:frameworks/base/services/java/com/android/server/WindowManagerService.java
WindowManagerService的构造函数中会创建内部类KeyQ对象。
private WindowManagerService(Context context, PowerManagerService pm,
boolean haveInputMethods) {
if (MEASURE_LATENCY) {
lt = new LatencyTimer(100, 1000);
}
...
mQueue = new KeyQ();
...
}
|
2、KeyInputQueue类
文件:frameworks/base/services/java/com/android/server/KeyInputQueue.java
KeyQ继承于KeyInputQueue类,在KeyInputQueue类的构造函数中会启动一个线程mThread,在这个线程里不断读取输入事件,然后对这个事件进行处理:
KeyInputQueue(Context context, HapticFeedbackCallback hapticFeedbackCallback) {
......
mThread.start();
}
|
阅读(1605) | 评论(0) | 转发(0) |