Default TV remote keys to no-wake
For Android TV, we want the default behavior of keys to not wake
up the device. We want to be able to whitelist keys if wake is
desired.
This differs from the behavior on mobile where the default is
to wake the device unless its a media key.
We separate by means of the idc file. Specifying
"keyboard.doNotWakeByDefault=1" in the idc would indicate the device is
a TV remote and should go through corresponding path.
Bug: 144979700
Test: Change idc/kl files. Rebuild and examine 'dumpsys input' on key presses.
atest inputflinger_tests
Change-Id: I4168c4c21fd901ca0402e0211f636b06234b9a85
diff --git a/services/inputflinger/reader/mapper/KeyboardInputMapper.h b/services/inputflinger/reader/mapper/KeyboardInputMapper.h
index de2a377..badbcb2 100644
--- a/services/inputflinger/reader/mapper/KeyboardInputMapper.h
+++ b/services/inputflinger/reader/mapper/KeyboardInputMapper.h
@@ -73,6 +73,7 @@
struct Parameters {
bool orientationAware;
bool handlesKeyRepeat;
+ bool doNotWakeByDefault;
} mParameters;
void configureParameters();