Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ccb9c47 authored by Yanye Li's avatar Yanye Li Committed by Android (Google) Code Review
Browse files

Merge "Input: Gate setKernelWakeEnabled with a flag" into main

parents 4a49249f 0dd9a4e7
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include "InputReader.h"

#include <android-base/stringprintf.h>
#include <com_android_input_flags.h>
#include <errno.h>
#include <input/Keyboard.h>
#include <input/VirtualKeyMap.h>
@@ -903,7 +904,9 @@ void InputReader::notifyMouseCursorFadedOnTyping() {

bool InputReader::setKernelWakeEnabled(int32_t deviceId, bool enabled) {
    std::scoped_lock _l(mLock);

    if (!com::android::input::flags::set_input_device_kernel_wake()){
        return false;
    }
    InputDevice* device = findInputDeviceLocked(deviceId);
    if (device) {
        return device->setKernelWakeEnabled(enabled);