From a180e855f66db8e4aa4796247e55ca5372d53de2 Mon Sep 17 00:00:00 2001 From: Nick Armstrong-Crews Date: Wed, 2 Sep 2015 13:00:52 -0700 Subject: [PATCH] Add KEYCODE_SOFT_SLEEP for Ungaze. BUG: b/23589870 Change-Id: I9bb575fe97bfae926ef4db37615e88057b81480c --- include/android/keycodes.h | 4 +++- include/input/InputEventLabels.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/android/keycodes.h b/include/android/keycodes.h index 1f55d9f37..421abe547 100644 --- a/include/android/keycodes.h +++ b/include/android/keycodes.h @@ -735,7 +735,9 @@ enum { AKEYCODE_MEDIA_SKIP_FORWARD = 272, AKEYCODE_MEDIA_SKIP_BACKWARD = 273, AKEYCODE_MEDIA_STEP_FORWARD = 274, - AKEYCODE_MEDIA_STEP_BACKWARD = 275 + AKEYCODE_MEDIA_STEP_BACKWARD = 275, + /** Put device to sleep unless a wakelock is held. */ + AKEYCODE_SOFT_SLEEP = 276 // NOTE: If you add a new keycode here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. diff --git a/include/input/InputEventLabels.h b/include/input/InputEventLabels.h index 344f2f377..f0a6238e9 100644 --- a/include/input/InputEventLabels.h +++ b/include/input/InputEventLabels.h @@ -311,6 +311,7 @@ static const InputEventLabel KEYCODES[] = { DEFINE_KEYCODE(MEDIA_SKIP_BACKWARD), DEFINE_KEYCODE(MEDIA_STEP_FORWARD), DEFINE_KEYCODE(MEDIA_STEP_BACKWARD), + DEFINE_KEYCODE(SOFT_SLEEP), { NULL, 0 } };