summaryrefslogtreecommitdiff
path: root/include/input/InputEventLabels.h
diff options
context:
space:
mode:
author Powei Feng <powei@google.com> 2019-05-03 17:11:33 -0700
committer Patrick Rohr <prohr@google.com> 2019-12-13 13:36:00 +0100
commitd041c5d9e162fbac4ef92c1d84a1bcd035fb8455 (patch)
tree8bad7b608a6c17a86787775bb99cb188391d8a69 /include/input/InputEventLabels.h
parent896bcfceafc9f696d5f93032bc2814f2e35c9bf2 (diff)
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
Diffstat (limited to 'include/input/InputEventLabels.h')
-rw-r--r--include/input/InputEventLabels.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/input/InputEventLabels.h b/include/input/InputEventLabels.h
index eaa562bb7b..b327d76b1c 100644
--- a/include/input/InputEventLabels.h
+++ b/include/input/InputEventLabels.h
@@ -405,13 +405,12 @@ static const InputEventLabel LEDS[] = {
{ nullptr, 0 }
};
-static const InputEventLabel FLAGS[] = {
- DEFINE_FLAG(VIRTUAL),
- DEFINE_FLAG(FUNCTION),
- DEFINE_FLAG(GESTURE),
+static const InputEventLabel FLAGS[] = {DEFINE_FLAG(VIRTUAL),
+ DEFINE_FLAG(FUNCTION),
+ DEFINE_FLAG(GESTURE),
+ DEFINE_FLAG(WAKE),
- { nullptr, 0 }
-};
+ {nullptr, 0}};
static int lookupValueByLabel(const char* literal, const InputEventLabel *list) {
while (list->literal) {