sabrina: 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:54 +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 02d312f3a0301e9ec598082c9e71ec760658a249..1e8293aaf9aa5292d1b0a8a7b391ce3ffecd131a 100644 (file)
--- a/device.mk
+++ b/device.mk
@@ -21,13 +21,18 @@ PRODUCT_COPY_FILES += \
     $(DEVICE_PATH)/init-files/init.amlogic.sku.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.amlogic.sku.rc \
     $(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 += \
     dhd
 
 ## Overlays
 DEVICE_PACKAGE_OVERLAYS += \
-    $(DEVICE_PATH)/overlay
+    $(DEVICE_PATH)/overlay \
+    $(DEVICE_PATH)/overlay-lineage
 
 ## Wi-Fi
 TARGET_DHD_VERSION := bcmdhd.100.10.545.x
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..24e22ed
--- /dev/null
@@ -0,0 +1,20 @@
+<?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>189</item>
+        <item>190</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.google.android.youtube.tv</item>
+        <item>com.netflix.mediaclient</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>