Discuz! Board

标题: 修改关机添加下可以操作蓝牙 [打印本页]

作者: zangcf    时间: 2016-6-11 22:27
标题: 修改关机添加下可以操作蓝牙
修改文件::
/media/doraemon/works/android/mtk/6572/QPlayer/eng/alps/frameworks/base/services/jni/com_android_server_input_InputManagerService.cpp
===============================
bool NativeInputManager::isScreenOn() {
    //zcfdebug-- return android_server_PowerManagerService_isScreenOn();
        return true;//zcfdebug++
}

bool NativeInputManager::isScreenBright() {
    //zcfdebug-- return android_server_PowerManagerService_isScreenBright();
        return true;//zcfdebug++
}



作者: zangcf    时间: 2016-6-11 23:08
上面修改的方法会导致power短按唤醒被过滤掉了,这样修改才行
/media/doraemon/works/android/mtk/6572/QPlayer/eng/alps/frameworks/base/services/input/InputDispatcher.cpp

void InputDispatcher::dispatchOnceInnerLocked(nsecs_t* nextWakeupTime) {
    nsecs_t currentTime = now();

    // Reset the key repeat timer whenever we disallow key events, even if the next event
    // is not a key.  This is to ensure that we abort a key repeat if the device is just coming
    // out of sleep.
    if (!mPolicy->isKeyRepeatEnabled()) {
        //zcfdebug-- resetKeyRepeatLocked();
    }

    // If dispatching is frozen, do not process timeouts or try to deliver any new events.
    if (mDispatchFrozen) {
#if DEBUG_FOCUS
        ALOGD("Dispatch frozen.  Waiting some more.");
#endif
        return;
    }




欢迎光临 Discuz! Board (http://47.89.242.157:9000/bbs/discuz/) Powered by Discuz! X3.2