Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d826681 authored by Anthony Hugh's avatar Anthony Hugh
Browse files

Introduce stem keycodes for Wear

This change adds four new stem keycodes for Android Wear. These
keycodes are intended to represent the various hardware buttons
around the watch.  There is one primary stem key that will be used
for power/settings and three generic stem keys that will be
customizable.

BUG: 21903503
Change-Id: I8835cfdba3a8819aae61b47d018c0794ba5f772e
parent 2b40e707
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -35196,6 +35196,10 @@ package android.view {
    field public static final int KEYCODE_STAR = 17; // 0x11
    field public static final int KEYCODE_STB_INPUT = 180; // 0xb4
    field public static final int KEYCODE_STB_POWER = 179; // 0xb3
    field public static final int KEYCODE_STEM_1 = 265; // 0x109
    field public static final int KEYCODE_STEM_2 = 266; // 0x10A
    field public static final int KEYCODE_STEM_3 = 267; // 0x10B
    field public static final int KEYCODE_STEM_PRIMARY = 264; // 0x108
    field public static final int KEYCODE_SWITCH_CHARSET = 95; // 0x5f
    field public static final int KEYCODE_SYM = 63; // 0x3f
    field public static final int KEYCODE_SYSRQ = 120; // 0x78
+4 −0
Original line number Diff line number Diff line
@@ -37494,6 +37494,10 @@ package android.view {
    field public static final int KEYCODE_STAR = 17; // 0x11
    field public static final int KEYCODE_STB_INPUT = 180; // 0xb4
    field public static final int KEYCODE_STB_POWER = 179; // 0xb3
    field public static final int KEYCODE_STEM_1 = 265; // 0x109
    field public static final int KEYCODE_STEM_2 = 266; // 0x10A
    field public static final int KEYCODE_STEM_3 = 267; // 0x10B
    field public static final int KEYCODE_STEM_PRIMARY = 264; // 0x108
    field public static final int KEYCODE_SWITCH_CHARSET = 95; // 0x5f
    field public static final int KEYCODE_SYM = 63; // 0x3f
    field public static final int KEYCODE_SYSRQ = 120; // 0x78
+11 −2
Original line number Diff line number Diff line
@@ -761,8 +761,17 @@ public class KeyEvent extends InputEvent implements Parcelable {
     * Backs out one level of a navigation hierarchy or collapses the item that currently has 
     * focus. */
    public static final int KEYCODE_NAVIGATE_OUT    = 263;

    private static final int LAST_KEYCODE = KEYCODE_NAVIGATE_OUT;
    /** Key code constant: Primary stem key for Wear
     * Main power/reset button on watch. */
    public static final int KEYCODE_STEM_PRIMARY = 264;
    /** Key code constant: Generic stem key 1 for Wear */
    public static final int KEYCODE_STEM_1 = 265;
    /** Key code constant: Generic stem key 2 for Wear */
    public static final int KEYCODE_STEM_2 = 266;
    /** Key code constant: Generic stem key 3 for Wear */
    public static final int KEYCODE_STEM_3 = 267;

    private static final int LAST_KEYCODE = KEYCODE_STEM_3;

    // NOTE: If you add a new keycode here you must also add it to:
    //  isSystem()
+4 −0
Original line number Diff line number Diff line
@@ -1803,6 +1803,10 @@ i
        <enum name="KEYCODE_NAVIGATE_NEXT" value="261" />
        <enum name="KEYCODE_NAVIGATE_IN" value="262" />
        <enum name="KEYCODE_NAVIGATE_OUT" value="263" />
        <enum name="KEYCODE_STEM_PRIMARY" value="264" />
        <enum name="KEYCODE_STEM_1" value="265" />
        <enum name="KEYCODE_STEM_2" value="266" />
        <enum name="KEYCODE_STEM_3" value="267" />
    </attr>

    <!-- ***************************************************************** -->