OSDN Git Service

Add a new keycode for TV (ALL_APPS)
authorSujith Ramakrishnan <sujithrk@google.com>
Wed, 19 Jul 2017 01:54:15 +0000 (18:54 -0700)
committerSujith Ramakrishnan <sujithrk@google.com>
Wed, 30 Aug 2017 22:18:56 +0000 (22:18 +0000)
    - KEYCODE_ALL_APPS: Launches all apps. For TV, this checks for
      launcher package in system image.

Test: Manual: ALL_APPS: adb shell input keyevent 284
Test: also tested with --longpress for these keys

Bug: 38496261
Change-Id: I2e50a569533f01d93c020adde672c842540f0193

include/android/keycodes.h
include/input/InputEventLabels.h

index e202060..2164d61 100644 (file)
@@ -765,7 +765,9 @@ enum {
     /** fingerprint navigation key, left. */
     AKEYCODE_SYSTEM_NAVIGATION_LEFT = 282,
     /** fingerprint navigation key, right. */
-    AKEYCODE_SYSTEM_NAVIGATION_RIGHT = 283
+    AKEYCODE_SYSTEM_NAVIGATION_RIGHT = 283,
+    /** all apps */
+    AKEYCODE_ALL_APPS = 284
 
     // 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.
index 20154eb..c282cf0 100644 (file)
@@ -323,6 +323,7 @@ static const InputEventLabel KEYCODES[] = {
     DEFINE_KEYCODE(SYSTEM_NAVIGATION_DOWN),
     DEFINE_KEYCODE(SYSTEM_NAVIGATION_LEFT),
     DEFINE_KEYCODE(SYSTEM_NAVIGATION_RIGHT),
+    DEFINE_KEYCODE(ALL_APPS),
 
     { NULL, 0 }
 };