Skip to content

Commit 7ccb9c4

Browse files
Yanye LiAndroid (Google) Code Review
authored andcommitted
Merge "Input: Gate setKernelWakeEnabled with a flag" into main
2 parents 4a49249 + 0dd9a4e commit 7ccb9c4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

services/inputflinger/reader/InputReader.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "InputReader.h"
2020

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

904905
bool InputReader::setKernelWakeEnabled(int32_t deviceId, bool enabled) {
905906
std::scoped_lock _l(mLock);
906-
907+
if (!com::android::input::flags::set_input_device_kernel_wake()){
908+
return false;
909+
}
907910
InputDevice* device = findInputDeviceLocked(deviceId);
908911
if (device) {
909912
return device->setKernelWakeEnabled(enabled);

0 commit comments

Comments
 (0)