只需要注释SystemServer里面的 inputManager.start(); 这一句即可。
因为:
status_t InputManager::start() {
status_t result = mDispatcher->start();
if (result) {
ALOGE("Could not start InputDispatcher thread due to error %d.", result);
return result;
}
result = mReader->start();
if (result) {
ALOGE("Could not start InputReader due to error %d.", result);
mDispatcher->stop();
return result;
}
return OK;
}
不调用 mDispatcher->start() 和 mReader->start() 自然就不会有事件收到了 。