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

Commit 8d06dcf9 authored by Jaekyun Seok's avatar Jaekyun Seok
Browse files

Add a keycode to switch audio tracks (2/2)

A key to switch audio tracks is general on media devices like blu-ray.

Bug: 9728155
Change-Id: I13ebbc64321f3cf10370f9a605f3d94ea0d16d6d
parent 59a99aaa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -265,6 +265,7 @@ enum {
    AKEYCODE_ASSIST          = 219,
    AKEYCODE_BRIGHTNESS_DOWN = 220,
    AKEYCODE_BRIGHTNESS_UP   = 221,
    AKEYCODE_MEDIA_AUDIO_TRACK = 222,

    // 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.
+1 −0
Original line number Diff line number Diff line
@@ -246,6 +246,7 @@ static const KeycodeLabel KEYCODES[] = {
    { "ASSIST", 219 },
    { "BRIGHTNESS_DOWN", 220 },
    { "BRIGHTNESS_UP", 221 },
    { "MEDIA_AUDIO_TRACK", 222 },

    // 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.
+2 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ bool KeyEvent::hasDefaultAction(int32_t keyCode) {
        case AKEYCODE_MUTE:
        case AKEYCODE_BRIGHTNESS_DOWN:
        case AKEYCODE_BRIGHTNESS_UP:
        case AKEYCODE_MEDIA_AUDIO_TRACK:
            return true;
    }
    
@@ -112,6 +113,7 @@ bool KeyEvent::isSystemKey(int32_t keyCode) {
        case AKEYCODE_SEARCH:
        case AKEYCODE_BRIGHTNESS_DOWN:
        case AKEYCODE_BRIGHTNESS_UP:
        case AKEYCODE_MEDIA_AUDIO_TRACK:
            return true;
    }