dopinder: build & overlay KeyHandler
authorTimi Rautamäki <timi.rautamaki@gmail.com>
Wed, 1 Sep 2021 16:13:30 +0000 (16:13 +0000)
committerTimi Rautamäki <timi.rautamaki@gmail.com>
Tue, 21 Sep 2021 16:12:36 +0000 (16:12 +0000)
Change-Id: I1bd4c27a646f5deda26f20d99e87ae61f977bde6

device.mk
overlay-lineage/device/lineage/atv/KeyHandler/res/values/config.xml [new file with mode: 0644]
overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml [new file with mode: 0644]

index f8f634fccd7d067c77d48d271fadcfec9c22d1ee..2519f44990e33e654aed1244057c7b64cf7126f0 100644 (file)
--- a/device.mk
+++ b/device.mk
@@ -18,10 +18,15 @@ include hardware/realtek/rtkbt/rtkbt.mk
 PRODUCT_COPY_FILES += \
     $(DEVICE_PATH)/init-files/init.amlogic.wifi_buildin.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.amlogic.wifi_buildin.rc
 
+## Keyhandler
+PRODUCT_PACKAGES += \
+    KeyHandler
+
 ## Kernel Modules
 PRODUCT_PACKAGES += \
     8822cs
 
 ## Overlays
 DEVICE_PACKAGE_OVERLAYS += \
-    $(DEVICE_PATH)/overlay
+    $(DEVICE_PATH)/overlay \
+    $(DEVICE_PATH)/overlay-lineage
diff --git a/overlay-lineage/device/lineage/atv/KeyHandler/res/values/config.xml b/overlay-lineage/device/lineage/atv/KeyHandler/res/values/config.xml
new file mode 100644 (file)
index 0000000..f2f6ef2
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 The LineageOS Project
+
+     SPDX-License-Identifier: Apache-2.0
+-->
+<resources>
+    <!-- Array of keycodes for special keys on device.
+         Order & size must match with keyhandler_packages -->
+    <integer-array name="keyhandler_keycodes">
+        <item>137</item>
+        <item>138</item>
+        <item>140</item>
+        <item>141</item>
+        <item>176</item>
+    </integer-array>
+
+    <!-- Array of packages for special keys on device.
+         Order & size must match with keyhandler_keycodes -->
+    <string-array name="keyhandler_packages">
+        <item>com.disney.disneyplus</item>
+        <item>com.hbo.hbonow</item>
+        <item>com.google.android.youtube.tv</item>
+        <item>com.netflix.mediaclient</item>
+        <item>com.android.tv.settings</item>
+    </string-array>
+</resources>
diff --git a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
new file mode 100644 (file)
index 0000000..59d47a9
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 The LineageOS Project
+
+     SPDX-License-Identifier: Apache-2.0
+-->
+<resources>
+    <!-- Paths to the libraries that contain device specific key handlers -->
+    <string-array name="config_deviceKeyHandlerLibs" translatable="false">
+        <item>/system/priv-app/LineageParts/LineageParts.apk</item>
+        <item>/system/priv-app/KeyHandler/KeyHandler.apk</item>
+    </string-array>
+
+    <!-- Names of the key handler classes -->
+    <string-array name="config_deviceKeyHandlerClasses" translatable="false">
+        <item>org.lineageos.lineageparts.gestures.KeyHandler</item>
+        <item>org.lineageos.settings.device.KeyHandler</item>
+    </string-array>
+</resources>