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

Commit 86420ad2 authored by Timi Rautamäki's avatar Timi Rautamäki Committed by Paul Keith
Browse files

sdk: introduce custom action keys



ATV targets often have special keys for apps, for example Netflix.

Set a reasonable set of defaults for atv. Remote keylayouts can
be configured to use these keycodes. If for some reason a device
has a keylayout that cannot be modified, the list can be overlaid.

Co-authored-by: default avatarAaron Kling <webgeek1234@gmail.com>

Change-Id: Ied3ed5d68671148a3729b1f0e1a2b15c4b080239
parent a7262011
Loading
Loading
Loading
Loading
+26 −0
Original line number Original line Diff line number Diff line
@@ -90,4 +90,30 @@
        <item>org.lineageos.overlay.accent.brown</item>
        <item>org.lineageos.overlay.accent.brown</item>
        <item>org.lineageos.overlay.accent.black</item>
        <item>org.lineageos.overlay.accent.black</item>
    </string-array>
    </string-array>

    <!-- Array of keycodes for special keys on device.
         Order & size must match with keyhandler_packages -->
    <integer-array name="keyhandler_keycodes">
        <item>170</item> <!-- KEYCODE_TV -->
        <item>176</item> <!-- KEYCODE_SETTINGS -->
        <item>190</item> <!-- KEYCODE_BUTTON_3 -->
        <item>191</item> <!-- KEYCODE_BUTTON_4 -->
        <item>193</item> <!-- KEYCODE_BUTTON_6 -->
        <item>194</item> <!-- KEYCODE_BUTTON_7 -->
        <item>195</item> <!-- KEYCODE_BUTTON_8 -->
        <item>225</item> <!-- KEYCODE_PAIRING -->
    </integer-array>

    <!-- Array of packages for special keys on device.
         Order & size must match with keyhandler_keycodes -->
    <string-array name="keyhandler_packages">
        <item>com.google.android.tv</item>
        <item>android.settings.SETTINGS</item> <!-- This is an intent -->
        <item>com.google.android.youtube.tv</item>
        <item>com.netflix.ninja</item>
        <item>com.disney.disneyplus</item>
        <item>com.hbo.hbonow</item>
        <item>com.android.vending</item>
        <item>com.google.android.intent.action.CONNECT_INPUT</item>
    </string-array>
</resources>
</resources>
+4 −0
Original line number Original line Diff line number Diff line
@@ -92,6 +92,10 @@
    <java-symbol type="integer" name="config_longPressOnMenuBehavior" />
    <java-symbol type="integer" name="config_longPressOnMenuBehavior" />
    <java-symbol type="integer" name="config_longPressOnAppSwitchBehavior" />
    <java-symbol type="integer" name="config_longPressOnAppSwitchBehavior" />


    <!-- ATV remote custom keys handling -->
    <java-symbol type="array" name="keyhandler_keycodes" />
    <java-symbol type="array" name="keyhandler_packages" />

    <!-- Camera key type -->
    <!-- Camera key type -->
    <java-symbol type="bool" name="config_singleStageCameraKey" />
    <java-symbol type="bool" name="config_singleStageCameraKey" />