Add key code for thumbs up, thumbs down and profile switch keys
Bug: 119202163
Test: Trivial addition of new constants
Change-Id: I5743b4b818a837c88efaca311908bb5e8ec206ca
diff --git a/api/current.txt b/api/current.txt
index 120b475..5b92e8a 100755
--- a/api/current.txt
+++ b/api/current.txt
@@ -47768,6 +47768,7 @@
field public static final int KEYCODE_PLUS = 81; // 0x51
field public static final int KEYCODE_POUND = 18; // 0x12
field public static final int KEYCODE_POWER = 26; // 0x1a
+ field public static final int KEYCODE_PROFILE_SWITCH = 288; // 0x120
field public static final int KEYCODE_PROG_BLUE = 186; // 0xba
field public static final int KEYCODE_PROG_GREEN = 184; // 0xb8
field public static final int KEYCODE_PROG_RED = 183; // 0xb7
@@ -47806,6 +47807,8 @@
field public static final int KEYCODE_SYSTEM_NAVIGATION_UP = 280; // 0x118
field public static final int KEYCODE_T = 48; // 0x30
field public static final int KEYCODE_TAB = 61; // 0x3d
+ field public static final int KEYCODE_THUMBS_DOWN = 287; // 0x11f
+ field public static final int KEYCODE_THUMBS_UP = 286; // 0x11e
field public static final int KEYCODE_TV = 170; // 0xaa
field public static final int KEYCODE_TV_ANTENNA_CABLE = 242; // 0xf2
field public static final int KEYCODE_TV_AUDIO_DESCRIPTION = 252; // 0xfc
diff --git a/api/test-current.txt b/api/test-current.txt
index 604eebd..165f039 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -1588,7 +1588,7 @@
public class KeyEvent extends android.view.InputEvent implements android.os.Parcelable {
method public static java.lang.String actionToString(int);
- field public static final int LAST_KEYCODE = 285; // 0x11d
+ field public static final int LAST_KEYCODE = 288; // 0x120
}
public final class KeyboardShortcutGroup implements android.os.Parcelable {
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index 0a3403b..a103f87 100644
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -814,13 +814,19 @@
public static final int KEYCODE_ALL_APPS = 284;
/** Key code constant: Refresh key. */
public static final int KEYCODE_REFRESH = 285;
+ /** Key code constant: Thumbs up key. Apps can use this to let user upvote content. */
+ public static final int KEYCODE_THUMBS_UP = 286;
+ /** Key code constant: Thumbs down key. Apps can use this to let user downvote content. */
+ public static final int KEYCODE_THUMBS_DOWN = 287;
+ /** Key code constant: Consumed by system to switch current viewer profile. */
+ public static final int KEYCODE_PROFILE_SWITCH = 288;
/**
* Integer value of the last KEYCODE. Increases as new keycodes are added to KeyEvent.
* @hide
*/
@TestApi
- public static final int LAST_KEYCODE = KEYCODE_REFRESH;
+ public static final int LAST_KEYCODE = KEYCODE_PROFILE_SWITCH;
// NOTE: If you add a new keycode here you must also add it to:
// isSystem()