Skip to content

Commit

Permalink
lemonade: Move some parts from common
Browse files Browse the repository at this point in the history
Following adding support for lunaa and martini

Change-Id: I7b4d709a7b59455638c41bfb53a4103317a05577
  • Loading branch information
pjgowtham authored and mikeNG committed Apr 10, 2023
1 parent 0710e36 commit ab9cb38
Show file tree
Hide file tree
Showing 6 changed files with 1,017 additions and 3 deletions.
5 changes: 4 additions & 1 deletion BoardConfig.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2021-2022 The LineageOS Project
# Copyright (C) 2021-2023 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -12,6 +12,9 @@ DEVICE_PATH := device/oneplus/lemonade
# Display
TARGET_SCREEN_DENSITY := 450

# HIDL
DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/manifest.xml

# Properties
TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop

Expand Down
28 changes: 27 additions & 1 deletion device.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2021-2022 The LineageOS Project
# Copyright (C) 2021-2023 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -8,6 +8,11 @@
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := xxhdpi

# Alert slider
PRODUCT_PACKAGES += \
KeyHandler \
tri-state-key-calibrate

# Audio
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/audio/audio_platform_info_intcodec.xml:$(TARGET_COPY_OUT_ODM)/etc/audio_platform_info.xml \
Expand All @@ -23,6 +28,23 @@ PRODUCT_COPY_FILES += \
TARGET_SCREEN_HEIGHT := 2400
TARGET_SCREEN_WIDTH := 1080

# NFC
PRODUCT_PACKAGES += \
[email protected] \
[email protected] \
com.android.nfc_extras \
Tag

PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \
frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \
frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \
frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.android.nfc_extras.xml \
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml

# Overlays
DEVICE_PACKAGE_OVERLAYS += \
$(LOCAL_PATH)/overlay-lineage
Expand All @@ -32,6 +54,10 @@ PRODUCT_PACKAGES += \
OPlusSettingsProviderResTarget \
OPlusSystemUIResTarget

# PowerShare
PRODUCT_PACKAGES += \
[email protected]

# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH)
Expand Down
40 changes: 40 additions & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<manifest version="2.0" type="device" target-level="5">
<hal format="hidl">
<name>android.hardware.nfc</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>INfc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.secure_element</name>
<transport>hwbinder</transport>
<version>1.2</version>
<interface>
<name>ISecureElement</name>
<instance>SIM1</instance>
<instance>SIM2</instance>
<instance>eSE1</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.nxp.nxpnfc</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>INxpNfc</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>vendor.qti.esepowermanager</name>
<transport>hwbinder</transport>
<version>1.1</version>
<interface>
<name>IEsePowerManager</name>
<instance>default</instance>
</interface>
</hal>
</manifest>
24 changes: 24 additions & 0 deletions overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015-2016 The CyanogenMod Project
2017-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_ext/app/KeyHandler/KeyHandler.apk</item>
<item>/system_ext/priv-app/LineageParts/LineageParts.apk</item>
</string-array>

<!-- Names of the key handler classes -->
<string-array name="config_deviceKeyHandlerClasses" translatable="false">
<item>org.lineageos.settings.device.KeyHandler</item>
<item>org.lineageos.lineageparts.gestures.KeyHandler</item>
</string-array>

<!-- Whether the device supports wireless charging or not -->
<bool name="config_deviceSupportsWirelessCharging">true</bool>

</resources>
14 changes: 13 additions & 1 deletion overlay/OPlusFrameworksResTarget/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The LineageOS Project
Copyright (C) 2022-2023 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>
Expand Down Expand Up @@ -414,6 +414,18 @@
<item>8000</item>
</integer-array>

<!-- Control whether the always on display mode is available. This should only be enabled on
devices where the display has been tuned to be power efficient in DOZE and/or DOZE_SUSPEND
states. -->
<bool name="config_dozeAlwaysOnDisplayAvailable">true</bool>

<!-- Control whether the always on display mode is enabled by default. This value will be used
during initialization when the setting is still null. -->
<bool name="config_dozeAlwaysOnEnabled">false</bool>

<!-- Type of the udfps long press sensor. Empty if long press is not supported. -->
<string name="config_dozeUdfpsLongPressSensorType" translatable="false">org.lineageos.sensor.udfps</string>

<!-- The bounding path of the cutout region of the main built-in display.
Must either be empty if there is no cutout region, or a string that is parsable by
{@link android.util.PathParser}.
Expand Down
Loading

0 comments on commit ab9cb38

Please sign in to comment.