Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a20c55e212 | ||
|
|
9b866f15ea | ||
|
|
35fa2d6cb5 | ||
|
|
3d933ac125 | ||
|
|
e7aefdb908 | ||
|
|
9820b42d06 | ||
|
|
fc0db8e84a | ||
|
|
94cd56de96 | ||
|
|
8a5d6e586d | ||
|
|
ba7e829f91 | ||
|
|
86990e11e9 | ||
|
|
5e5cb751cb | ||
|
|
6b0191fc61 | ||
|
|
37b1cadbe8 | ||
|
|
ddbeac45c5 | ||
|
|
e56f967349 | ||
|
|
36bdb60e16 | ||
|
|
f3cb4c7f64 | ||
|
|
1319de6729 | ||
|
|
f339c415bc | ||
|
|
21afb50c85 | ||
|
|
2aa3a069ce | ||
|
|
086303e2a5 | ||
|
|
f5d7430a9e | ||
|
|
7bb5181d56 | ||
|
|
b58fed1df8 | ||
|
|
8d5beab76f | ||
|
|
4205e75a5c | ||
|
|
1c2735dfbc | ||
|
|
15d12bff40 | ||
|
|
413a753905 | ||
|
|
a2a68bbe66 | ||
|
|
8e4eebbbd5 | ||
|
|
56ef533035 | ||
|
|
a7bcab7617 | ||
|
|
46f1374693 | ||
|
|
e14b765a0e | ||
|
|
d5119be483 | ||
|
|
64b601b3a8 | ||
|
|
05416f8d1c | ||
|
|
b410754e3a | ||
|
|
2ee39b72d5 | ||
|
|
21667ce404 | ||
|
|
6a0fa982bd | ||
|
|
31c3a5cc1a | ||
|
|
eb5a66a1ac | ||
|
|
9a20be388a | ||
|
|
5bf3318dd3 | ||
|
|
f87759b0df |
@@ -1,3 +1,8 @@
|
||||
//
|
||||
// Copyright (C) 2024-2025 The LineageOS Project
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
soong_namespace {
|
||||
}
|
||||
|
||||
|
||||
@@ -139,14 +139,15 @@ USE_XML_AUDIO_POLICY_CONF := 1
|
||||
AUDIOSERVER_MULTILIB := 32
|
||||
|
||||
# Audio
|
||||
AUDIO_FEATURE_ENABLED_AHAL_EXT := false
|
||||
AUDIO_FEATURE_ENABLED_AHAL_EXT := true
|
||||
AUDIO_FEATURE_ENABLED_COMPRESS_VOIP := false
|
||||
AUDIO_FEATURE_ENABLED_DLKM := true
|
||||
AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := false
|
||||
AUDIO_FEATURE_ENABLED_DS2_DOLBY_DAP := true
|
||||
AUDIO_FEATURE_ENABLED_DTS_EAGLE := false
|
||||
AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := false
|
||||
AUDIO_FEATURE_ENABLED_DYNAMIC_LOG := true
|
||||
AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER := false
|
||||
AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true
|
||||
AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true
|
||||
AUDIO_FEATURE_ENABLED_GEF_SUPPORT := false
|
||||
AUDIO_FEATURE_ENABLED_GKI := true
|
||||
AUDIO_FEATURE_ENABLED_HW_ACCELERATED_EFFECTS := false
|
||||
AUDIO_FEATURE_ENABLED_INSTANCE_ID := true
|
||||
@@ -154,6 +155,7 @@ AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true
|
||||
AUDIO_FEATURE_ENABLED_SSR := false
|
||||
AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true
|
||||
BOARD_SUPPORTS_SOUND_TRIGGER := true
|
||||
TARGET_PROVIDES_AUDIO_EXTNS := true
|
||||
|
||||
# Camera
|
||||
SOONG_CONFIG_NAMESPACES += samsungCameraVars
|
||||
@@ -166,14 +168,10 @@ SOONG_CONFIG_samsungCameraVars_extra_ids := 54
|
||||
|
||||
SOONG_CONFIG_samsungCameraVars_needs_sec_reserved_field := true
|
||||
|
||||
# Init
|
||||
TARGET_INIT_VENDOR_LIB := //$(COMMON_PATH):libinit_samsung_sm7325
|
||||
|
||||
# HIDL manifests
|
||||
DEVICE_MANIFEST_SKUS := yupik
|
||||
DEVICE_MANIFEST_YUPIK_FILES += $(COMMON_PATH)/configs/manifest_yupik.xml
|
||||
DEVICE_MANIFEST_FILE += $(COMMON_PATH)/configs/manifest_lahaina.xml
|
||||
DEVICE_MATRIX_FILE := hardware/qcom-caf/common/compatibility_matrix.xml
|
||||
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \
|
||||
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += \
|
||||
$(COMMON_PATH)/configs/framework_compatibility_matrix.xml \
|
||||
hardware/samsung/vintf/samsung_framework_compatibility_matrix.xml \
|
||||
hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \
|
||||
@@ -185,12 +183,6 @@ BOARD_USES_QCOM_HARDWARE := true
|
||||
# Samsung
|
||||
BOARD_VENDOR := samsung
|
||||
|
||||
# Lineage Health
|
||||
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_PATH := /sys/class/power_supply/battery/batt_slate_mode
|
||||
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_ENABLED := 0
|
||||
TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED := 1
|
||||
TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS := false
|
||||
|
||||
# DRM
|
||||
TARGET_ENABLE_MEDIADRM_64 := true
|
||||
|
||||
@@ -225,6 +217,7 @@ TARGET_RELEASETOOLS_EXTENSIONS := $(COMMON_PATH)/releasetools
|
||||
|
||||
# SePolicy
|
||||
include device/qcom/sepolicy_vndr/SEPolicy.mk
|
||||
include hardware/samsung-ext/interfaces/sepolicy/SEPolicy.mk
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor
|
||||
PRODUCT_PRIVATE_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/private
|
||||
PRODUCT_PUBLIC_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/public
|
||||
|
||||
@@ -41,6 +41,19 @@
|
||||
<library name="volume_listener" path="libvolumelistener.so"/>
|
||||
<library name="audiosphere" path="libasphere.so"/>
|
||||
<library name="shoebox" path="libshoebox.so"/>
|
||||
<!--DOLBY DAP-->
|
||||
<library name="dap" path="libswdap.so"/>
|
||||
<library name="dvl" path="libdlbvol.so"/>
|
||||
<!--DOLBY END-->
|
||||
<!--DOLBY GAME-->
|
||||
<library name="gamedap" path="libswgamedap.so"/>
|
||||
<!--DOLBY END-->
|
||||
<!--DOLBY VQE-->
|
||||
<library name="vqe" path="libswvqe.so"/>
|
||||
<!--DOLBY END-->
|
||||
<!--Spatial Audio-->
|
||||
<library name="spatializer" path="libspatialaudio.so"/>
|
||||
<!--Spatial Audio-->
|
||||
</libraries>
|
||||
<effects>
|
||||
<effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b">
|
||||
@@ -89,23 +102,29 @@
|
||||
<effect name="notification_helper" library="volume_listener" uuid="0b776dde-0590-11e5-81ba-0025b32654a0"/>
|
||||
<effect name="audiosphere" library="audiosphere" uuid="184e62ab-2d19-4364-9d1b-c0a40733866c"/>
|
||||
<effect name="shoebox" library="shoebox" uuid="1eab784c-1a36-4b2a-b7fc-e34c44cab89e"/>
|
||||
<!--DOLBY DAP-->
|
||||
<effect name="dap" library="dap" uuid="9d4921da-8225-4f29-aefa-39537a04bcaa"/>
|
||||
<effect name="dlb_music_listener" library="dvl" uuid="40f66c8b-5aa5-4345-8919-53ec431aaa98"/>
|
||||
<effect name="dlb_ring_listener" library="dvl" uuid="21d14087-558a-4f21-94a9-5002dce64bce"/>
|
||||
<effect name="dlb_alarm_listener" library="dvl" uuid="6aff229c-30c6-4cc8-9957-dbfe5c1bd7f6"/>
|
||||
<effect name="dlb_system_listener" library="dvl" uuid="874db4d8-051d-4b7b-bd95-a3bebc837e9e"/>
|
||||
<effect name="dlb_notification_listener" library="dvl" uuid="1f0091e3-6ad8-40fe-9b09-5948f9a26e7e"/>
|
||||
<effect name="dlb_voice_call_listener" library="dvl" uuid="58d13383-b41d-05df-d94e-bb23db293260"/>
|
||||
<!--DOLBY END-->
|
||||
<!--DOLBY GAME-->
|
||||
<effect name="gamedap" library="gamedap" uuid="3783c334-d3a0-4d13-874f-0032e5fb80e2"/>
|
||||
<!--DOLBY END-->
|
||||
<!--DOLBY VQE-->
|
||||
<effect name="vqe" library="vqe" uuid="64a0f614-7fa4-48b8-b081-d59dc954616f"/>
|
||||
<!--DOLBY END-->
|
||||
<!--Spatial Audio-->
|
||||
<effect name="spatializer" library="spatializer" uuid="cc4677de-ff72-11eb-9a03-0242ac130003"/>
|
||||
<!--Spatial Audio-->
|
||||
</effects>
|
||||
<postprocess>
|
||||
<stream type="music">
|
||||
<apply effect="music_helper"/>
|
||||
</stream>
|
||||
<stream type="ring">
|
||||
<apply effect="ring_helper"/>
|
||||
</stream>
|
||||
<stream type="alarm">
|
||||
<apply effect="alarm_helper"/>
|
||||
</stream>
|
||||
<stream type="voice_call">
|
||||
<apply effect="voice_helper"/>
|
||||
</stream>
|
||||
<stream type="notification">
|
||||
<apply effect="notification_helper"/>
|
||||
</stream>
|
||||
</stream>
|
||||
</postprocess>
|
||||
<preprocess>
|
||||
<stream type="voice_communication">
|
||||
|
||||
@@ -145,25 +145,10 @@ inputs {
|
||||
bit_width 16
|
||||
app_type 69938
|
||||
}
|
||||
record_24bit {
|
||||
formats AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_24_BIT
|
||||
sampling_rates 44100|48000|88200|96000|176400|192000
|
||||
bit_width 24
|
||||
# [[ SEC_AUDIO
|
||||
app_type 69944
|
||||
# SEC_AUDIO ]]
|
||||
#app_type 69948
|
||||
}
|
||||
#record_32bit {
|
||||
# formats AUDIO_FORMAT_PCM_32_BIT|AUDIO_FORMAT_PCM_FLOAT
|
||||
# sampling_rates 44100|48000|88200|96000|176400|192000
|
||||
# bit_width 32
|
||||
# app_type 69949
|
||||
#}
|
||||
record_compress_16 {
|
||||
flags AUDIO_INPUT_FLAG_COMPRESS
|
||||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
sampling_rates 8000|16000|32000|44100|48000|88200|96000|176400|192000
|
||||
sampling_rates 48000|96000
|
||||
bit_width 16
|
||||
app_type 69938
|
||||
}
|
||||
|
||||
@@ -111,6 +111,12 @@
|
||||
</mixPort>
|
||||
<mixPort name="hifi_playback" role="source" />
|
||||
<mixPort name="hifi_input" role="sink" />
|
||||
<!--Spatial Audio-->
|
||||
<mixPort name="immersive_out" role="source" flags="AUDIO_OUTPUT_FLAG_SPATIALIZER">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
<!--Spatial Audio-->
|
||||
</mixPort>
|
||||
</mixPorts>
|
||||
<devicePorts>
|
||||
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
|
||||
@@ -205,25 +211,25 @@
|
||||
<route type="mix" sink="Earpiece"
|
||||
sources="primary output,deep_buffer,fast,compressed_offload"/>
|
||||
<route type="mix" sink="Speaker"
|
||||
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out"/>
|
||||
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out,immersive_out"/>
|
||||
<route type="mix" sink="Wired Headset"
|
||||
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out"/>
|
||||
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out,immersive_out"/>
|
||||
<route type="mix" sink="Wired Headphones"
|
||||
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out"/>
|
||||
sources="primary output,deep_buffer,fast,compressed_offload,mmap_no_irq_out,immersive_out"/>
|
||||
<route type="mix" sink="USB Device Out"
|
||||
sources="primary output,deep_buffer,fast,direct_pcm,compressed_offload,mmap_no_irq_out,hifi_playback"/>
|
||||
sources="primary output,deep_buffer,fast,direct_pcm,compressed_offload,mmap_no_irq_out,hifi_playback,immersive_out"/>
|
||||
<route type="mix" sink="USB Headset Out"
|
||||
sources="primary output,deep_buffer,fast,direct_pcm,compressed_offload,mmap_no_irq_out,hifi_playback"/>
|
||||
sources="primary output,deep_buffer,fast,direct_pcm,compressed_offload,mmap_no_irq_out,hifi_playback,immersive_out"/>
|
||||
<route type="mix" sink="usb_surround_sound"
|
||||
sources="USB Device In,USB Headset In"/>
|
||||
<route type="mix" sink="hifi_input"
|
||||
sources="USB Device In,USB Headset In"/>
|
||||
<route type="mix" sink="BT SCO"
|
||||
sources="primary output,deep_buffer,fast,voip_rx"/>
|
||||
sources="primary output,deep_buffer,fast,voip_rx,immersive_out"/>
|
||||
<route type="mix" sink="BT SCO Headset"
|
||||
sources="primary output,deep_buffer,fast,voip_rx"/>
|
||||
sources="primary output,deep_buffer,fast,voip_rx,immersive_out"/>
|
||||
<route type="mix" sink="BT SCO Car Kit"
|
||||
sources="primary output,deep_buffer,fast,voip_rx"/>
|
||||
sources="primary output,deep_buffer,fast,voip_rx,immersive_out"/>
|
||||
<route type="mix" sink="Telephony Tx"
|
||||
sources="voice_tx,incall_music_uplink"/>
|
||||
<route type="mix" sink="voice_rx"
|
||||
|
||||
27
common.mk
27
common.mk
@@ -58,6 +58,8 @@ PRODUCT_PACKAGES += \
|
||||
wifi_qcom_wcn6750.rc \
|
||||
wifi_sec.rc
|
||||
|
||||
$(call soong_config_set,libinit,vendor_init_lib,//$(LOCAL_PATH):libinit_samsung_sm7325)
|
||||
|
||||
# Vendor scripts
|
||||
PRODUCT_PACKAGES += \
|
||||
init.class_main.sh \
|
||||
@@ -168,6 +170,9 @@ PRODUCT_PACKAGES += \
|
||||
PRODUCT_PACKAGES += \
|
||||
SamsungDoze
|
||||
|
||||
# Dolby
|
||||
$(call inherit-product, hardware/dolby/dolby.mk)
|
||||
|
||||
# DRM
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.drm-service.clearkey \
|
||||
@@ -179,14 +184,18 @@ PRODUCT_PACKAGES += \
|
||||
PRODUCT_PACKAGES += \
|
||||
fastbootd
|
||||
|
||||
# FastCharge
|
||||
PRODUCT_PACKAGES += \
|
||||
vendor.lineage.fastcharge@1.0-service.samsung
|
||||
|
||||
# Lineage Health
|
||||
PRODUCT_PACKAGES += \
|
||||
vendor.lineage.health-service.default
|
||||
|
||||
$(call soong_config_set,lineage_health,charging_control_charging_path,/sys/class/power_supply/battery/batt_slate_mode)
|
||||
$(call soong_config_set,lineage_health,charging_control_charging_enabled,0)
|
||||
$(call soong_config_set,lineage_health,charging_control_charging_disabled,1)
|
||||
$(call soong_config_set,lineage_health,charging_control_supports_bypass,false)
|
||||
$(call soong_config_set,lineage_health,fast_charge_node,/sys/class/sec/switch/afc_disable)
|
||||
$(call soong_config_set,lineage_health,fast_charge_value_none,1)
|
||||
$(call soong_config_set,lineage_health,fast_charge_value_fast_charge,0)
|
||||
|
||||
# Fingerprint
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.biometrics.fingerprint-service.samsung
|
||||
@@ -232,7 +241,7 @@ $(call soong_config_set,samsungVars,target_keymaster4_library,//vendor/samsung/s
|
||||
|
||||
# LiveDisplay
|
||||
PRODUCT_PACKAGES += \
|
||||
vendor.lineage.livedisplay@2.0-service.samsung-qcom.sm7325
|
||||
vendor.lineage.livedisplay@2.0-service.samsung-qcom
|
||||
|
||||
# Media
|
||||
PRODUCT_PACKAGES += \
|
||||
@@ -380,7 +389,7 @@ PRODUCT_PACKAGES += \
|
||||
|
||||
# Touch features
|
||||
PRODUCT_PACKAGES += \
|
||||
vendor.lineage.touch@1.0-service.samsung_sm7325
|
||||
vendor.lineage.touch-service.samsung
|
||||
|
||||
# Vendor service manager
|
||||
PRODUCT_PACKAGES += \
|
||||
@@ -397,6 +406,11 @@ PRODUCT_PACKAGES += \
|
||||
|
||||
PRODUCT_SOONG_NAMESPACES += vendor/qcom/opensource/usb/etc
|
||||
|
||||
# Samsung Ext Flash
|
||||
PRODUCT_PACKAGES += \
|
||||
vendor.samsung_ext.hardware.camera.flashlight-service \
|
||||
FlashControl
|
||||
|
||||
# Vibrator
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.vibrator-service.samsung
|
||||
@@ -447,6 +461,7 @@ PRODUCT_SOONG_NAMESPACES += \
|
||||
$(LOCAL_PATH) \
|
||||
hardware/google/interfaces \
|
||||
hardware/google/pixel \
|
||||
hardware/samsung-ext/interfaces \
|
||||
hardware/samsung
|
||||
|
||||
# Inherit proprietary blobs
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<manifest version="2.0" type="device" target-level="5">
|
||||
<manifest version="2.0" type="device" target-level="6">
|
||||
<kernel target-level="5"/>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.audio</name>
|
||||
<transport>hwbinder</transport>
|
||||
@@ -136,6 +137,43 @@
|
||||
<name>com.qualcomm.qti.uceservice</name>
|
||||
<transport>hwbinder</transport>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.lineage.livedisplay</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.0</version>
|
||||
<interface>
|
||||
<name>IAdaptiveBacklight</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IDisplayColorCalibration</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IDisplayModes</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>ISunlightEnhancement</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl">
|
||||
<name>vendor.lineage.touch</name>
|
||||
<version>1</version>
|
||||
<interface>
|
||||
<name>IGloveMode</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IHighTouchPollingRate</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>ITouchscreenGesture</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" override="true">
|
||||
<name>vendor.qti.data.factory</name>
|
||||
<transport>hwbinder</transport>
|
||||
@@ -358,38 +396,5 @@
|
||||
<fqname>@2.0::ISehChannel/imsd</fqname>
|
||||
<fqname>@2.0::ISehChannel/imsd2</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.lineage.livedisplay</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.0</version>
|
||||
<interface>
|
||||
<name>IAdaptiveBacklight</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IDisplayColorCalibration</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>ISunlightEnhancement</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@2.0::IAdaptiveBacklight/default</fqname>
|
||||
<fqname>@2.0::IDisplayColorCalibration/default</fqname>
|
||||
<fqname>@2.0::ISunlightEnhancement/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.lineage.touch</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IGloveMode</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>ITouchscreenGesture</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<kernel target-level="5"/>
|
||||
</manifest>
|
||||
@@ -290,4 +290,5 @@
|
||||
</MediaCodec>
|
||||
</Encoders>
|
||||
<Include href="media_codecs_google_c2.xml" />
|
||||
<Include href="media_codecs_dolby_audio.xml" />
|
||||
</MediaCodecs>
|
||||
|
||||
35
evolution.dependencies
Normal file
35
evolution.dependencies
Normal file
@@ -0,0 +1,35 @@
|
||||
[
|
||||
{
|
||||
"repository": "kernel_samsung_sm7325",
|
||||
"target_path": "kernel/samsung/sm7325",
|
||||
"branch": "vic"
|
||||
},
|
||||
{
|
||||
"remote": "github-non-los",
|
||||
"repository": "LineageOS/android_hardware_samsung",
|
||||
"target_path": "hardware/samsung",
|
||||
"branch": "lineage-22.2"
|
||||
},
|
||||
{
|
||||
"remote": "github-non-los",
|
||||
"repository": "LineageOS/android_hardware_samsung_nfc",
|
||||
"target_path": "hardware/samsung/nfc",
|
||||
"branch": "lineage-23.0"
|
||||
},
|
||||
{
|
||||
"repository": "vendor_samsung_sm7325-common",
|
||||
"target_path": "vendor/samsung/sm7325-common",
|
||||
"branch": "vic"
|
||||
},
|
||||
{
|
||||
"remote": "github-non-los",
|
||||
"repository": "anhdat1024/android_hardware_dolby",
|
||||
"target_path": "hardware/dolby",
|
||||
"branch": "16.0"
|
||||
},
|
||||
{
|
||||
"repository": "hardware_samsung-extra_interfaces",
|
||||
"target_path": "hardware/samsung-ext/interfaces",
|
||||
"branch": "vic"
|
||||
}
|
||||
]
|
||||
@@ -1,10 +0,0 @@
|
||||
[
|
||||
{
|
||||
"repository": "android_kernel_samsung_sm7325",
|
||||
"target_path": "kernel/samsung/sm7325"
|
||||
},
|
||||
{
|
||||
"repository": "android_hardware_samsung",
|
||||
"target_path": "hardware/samsung"
|
||||
}
|
||||
]
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <android-base/file.h>
|
||||
#include <android-base/strings.h>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "AdaptiveBacklight.h"
|
||||
|
||||
using android::base::ReadFileToString;
|
||||
using android::base::Trim;
|
||||
using android::base::WriteStringToFile;
|
||||
|
||||
namespace vendor {
|
||||
namespace lineage {
|
||||
namespace livedisplay {
|
||||
namespace V2_0 {
|
||||
namespace samsung {
|
||||
|
||||
static constexpr const char* kBacklightPath = "/sys/class/lcd/panel/alpm";
|
||||
|
||||
bool AdaptiveBacklight::isSupported() {
|
||||
std::fstream backlight(kBacklightPath, backlight.in | backlight.out);
|
||||
return backlight.good();
|
||||
}
|
||||
|
||||
// Methods from ::vendor::lineage::livedisplay::V2_0::IAdaptiveBacklight follow.
|
||||
Return<bool> AdaptiveBacklight::isEnabled() {
|
||||
std::string tmp;
|
||||
int32_t contents = 0;
|
||||
|
||||
if (ReadFileToString(kBacklightPath, &tmp)) {
|
||||
contents = std::stoi(Trim(tmp));
|
||||
}
|
||||
|
||||
return contents > 0;
|
||||
}
|
||||
|
||||
Return<bool> AdaptiveBacklight::setEnabled(bool enabled) {
|
||||
return WriteStringToFile(enabled ? "2" : "0", kBacklightPath, true);
|
||||
}
|
||||
|
||||
} // namespace samsung
|
||||
} // namespace V2_0
|
||||
} // namespace livedisplay
|
||||
} // namespace lineage
|
||||
} // namespace vendor
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H
|
||||
#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H
|
||||
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/lineage/livedisplay/2.0/IAdaptiveBacklight.h>
|
||||
|
||||
namespace vendor {
|
||||
namespace lineage {
|
||||
namespace livedisplay {
|
||||
namespace V2_0 {
|
||||
namespace samsung {
|
||||
|
||||
using ::android::hardware::hidl_array;
|
||||
using ::android::hardware::hidl_memory;
|
||||
using ::android::hardware::hidl_string;
|
||||
using ::android::hardware::hidl_vec;
|
||||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
using ::android::sp;
|
||||
|
||||
class AdaptiveBacklight : public IAdaptiveBacklight {
|
||||
public:
|
||||
bool isSupported();
|
||||
|
||||
// Methods from ::vendor::lineage::livedisplay::V2_0::IAdaptiveBacklight follow.
|
||||
Return<bool> isEnabled() override;
|
||||
Return<bool> setEnabled(bool enabled) override;
|
||||
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
};
|
||||
|
||||
} // namespace samsung
|
||||
} // namespace V2_0
|
||||
} // namespace livedisplay
|
||||
} // namespace lineage
|
||||
} // namespace vendor
|
||||
|
||||
#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H
|
||||
@@ -1,34 +0,0 @@
|
||||
// Copyright (C) 2019-2023 The LineageOS Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
cc_binary {
|
||||
name: "vendor.lineage.livedisplay@2.0-service.samsung-qcom.sm7325",
|
||||
defaults: ["hidl_defaults"],
|
||||
init_rc: ["vendor.lineage.livedisplay@2.0-service.samsung-qcom.sm7325.rc"],
|
||||
relative_install_path: "hw",
|
||||
srcs: [
|
||||
"AdaptiveBacklight.cpp",
|
||||
"SunlightEnhancement.cpp",
|
||||
"DisplayColorCalibration.cpp",
|
||||
"service.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libbinder",
|
||||
"libhidlbase",
|
||||
"libutils",
|
||||
"vendor.lineage.livedisplay@2.0",
|
||||
],
|
||||
vendor: true,
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <android-base/file.h>
|
||||
#include <android-base/strings.h>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "DisplayColorCalibration.h"
|
||||
|
||||
using android::base::ReadFileToString;
|
||||
using android::base::Split;
|
||||
using android::base::Trim;
|
||||
using android::base::WriteStringToFile;
|
||||
|
||||
namespace vendor {
|
||||
namespace lineage {
|
||||
namespace livedisplay {
|
||||
namespace V2_0 {
|
||||
namespace samsung {
|
||||
|
||||
static constexpr const char* kColorPath = "/sys/class/mdnie/mdnie/sensorRGB";
|
||||
|
||||
bool DisplayColorCalibration::isSupported() {
|
||||
std::fstream rgb(kColorPath, rgb.in | rgb.out);
|
||||
return rgb.good();
|
||||
}
|
||||
|
||||
Return<int32_t> DisplayColorCalibration::getMaxValue() {
|
||||
return 255;
|
||||
}
|
||||
|
||||
Return<int32_t> DisplayColorCalibration::getMinValue() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
Return<void> DisplayColorCalibration::getCalibration(getCalibration_cb resultCb) {
|
||||
std::vector<int32_t> rgb;
|
||||
std::string tmp;
|
||||
|
||||
if (ReadFileToString(kColorPath, &tmp)) {
|
||||
std::vector<std::string> colors = Split(Trim(tmp), " ");
|
||||
for (const std::string& color : colors) {
|
||||
rgb.push_back(std::stoi(color));
|
||||
}
|
||||
}
|
||||
|
||||
resultCb(rgb);
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<bool> DisplayColorCalibration::setCalibration(const hidl_vec<int32_t>& rgb) {
|
||||
std::string contents;
|
||||
for (const int32_t& color : rgb) {
|
||||
contents += std::to_string(color) + " ";
|
||||
}
|
||||
return WriteStringToFile(Trim(contents), kColorPath, true);
|
||||
}
|
||||
|
||||
} // namespace samsung
|
||||
} // namespace V2_0
|
||||
} // namespace livedisplay
|
||||
} // namespace lineage
|
||||
} // namespace vendor
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/lineage/livedisplay/2.0/IDisplayColorCalibration.h>
|
||||
|
||||
namespace vendor {
|
||||
namespace lineage {
|
||||
namespace livedisplay {
|
||||
namespace V2_0 {
|
||||
namespace samsung {
|
||||
|
||||
using ::android::hardware::hidl_array;
|
||||
using ::android::hardware::hidl_memory;
|
||||
using ::android::hardware::hidl_string;
|
||||
using ::android::hardware::hidl_vec;
|
||||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
using ::android::sp;
|
||||
|
||||
class DisplayColorCalibration : public IDisplayColorCalibration {
|
||||
public:
|
||||
bool isSupported();
|
||||
|
||||
// Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayColorCalibration follow.
|
||||
Return<int32_t> getMaxValue() override;
|
||||
Return<int32_t> getMinValue() override;
|
||||
Return<void> getCalibration(getCalibration_cb resultCb) override;
|
||||
Return<bool> setCalibration(const hidl_vec<int32_t>& rgb) override;
|
||||
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
};
|
||||
|
||||
} // namespace samsung
|
||||
} // namespace V2_0
|
||||
} // namespace livedisplay
|
||||
} // namespace lineage
|
||||
} // namespace vendor
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <android-base/file.h>
|
||||
#include <android-base/strings.h>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "SunlightEnhancement.h"
|
||||
|
||||
using android::base::ReadFileToString;
|
||||
using android::base::Trim;
|
||||
using android::base::WriteStringToFile;
|
||||
|
||||
namespace vendor {
|
||||
namespace lineage {
|
||||
namespace livedisplay {
|
||||
namespace V2_0 {
|
||||
namespace samsung {
|
||||
|
||||
static constexpr const char* kSREPath = "/sys/class/mdnie/mdnie/outdoor";
|
||||
|
||||
// Methods from ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement follow.
|
||||
bool SunlightEnhancement::isSupported() {
|
||||
std::fstream sre(kSREPath, sre.in | sre.out);
|
||||
|
||||
return sre.good();
|
||||
}
|
||||
|
||||
// Methods from ::vendor::lineage::livedisplay::V2_0::IAdaptiveBacklight follow.
|
||||
Return<bool> SunlightEnhancement::isEnabled() {
|
||||
std::string tmp;
|
||||
int32_t statusSRE = 0;
|
||||
if (ReadFileToString(kSREPath, &tmp)) {
|
||||
statusSRE = std::stoi(Trim(tmp));
|
||||
}
|
||||
|
||||
return statusSRE == 1;
|
||||
}
|
||||
|
||||
Return<bool> SunlightEnhancement::setEnabled(bool enabled) {
|
||||
return WriteStringToFile(enabled ? "1" : "0", kSREPath, true);
|
||||
}
|
||||
|
||||
} // namespace samsung
|
||||
} // namespace V2_0
|
||||
} // namespace livedisplay
|
||||
} // namespace lineage
|
||||
} // namespace vendor
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/lineage/livedisplay/2.0/ISunlightEnhancement.h>
|
||||
|
||||
namespace vendor {
|
||||
namespace lineage {
|
||||
namespace livedisplay {
|
||||
namespace V2_0 {
|
||||
namespace samsung {
|
||||
|
||||
using ::android::hardware::hidl_array;
|
||||
using ::android::hardware::hidl_memory;
|
||||
using ::android::hardware::hidl_string;
|
||||
using ::android::hardware::hidl_vec;
|
||||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
using ::android::sp;
|
||||
|
||||
class SunlightEnhancement : public ISunlightEnhancement {
|
||||
public:
|
||||
bool isSupported();
|
||||
|
||||
// Methods from ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement follow.
|
||||
Return<bool> isEnabled() override;
|
||||
Return<bool> setEnabled(bool enabled) override;
|
||||
};
|
||||
|
||||
} // namespace samsung
|
||||
} // namespace V2_0
|
||||
} // namespace livedisplay
|
||||
} // namespace lineage
|
||||
} // namespace vendor
|
||||
@@ -1,109 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef LIVES_IN_SYSTEM
|
||||
#define LOG_TAG "lineage.livedisplay@2.0-service.samsung-qcom.sm7325"
|
||||
#else
|
||||
#define LOG_TAG "vendor.lineage.livedisplay@2.0-service.samsung-qcom.sm7325"
|
||||
#endif
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <binder/ProcessState.h>
|
||||
#include <hidl/HidlTransportSupport.h>
|
||||
|
||||
#include "AdaptiveBacklight.h"
|
||||
#include "SunlightEnhancement.h"
|
||||
#include "DisplayColorCalibration.h"
|
||||
|
||||
using android::hardware::configureRpcThreadpool;
|
||||
using android::hardware::joinRpcThreadpool;
|
||||
using android::sp;
|
||||
using android::status_t;
|
||||
using android::OK;
|
||||
|
||||
using vendor::lineage::livedisplay::V2_0::samsung::AdaptiveBacklight;
|
||||
using vendor::lineage::livedisplay::V2_0::samsung::SunlightEnhancement;
|
||||
using vendor::lineage::livedisplay::V2_0::samsung::DisplayColorCalibration;
|
||||
|
||||
int main() {
|
||||
sp<AdaptiveBacklight> adaptiveBacklight;
|
||||
sp<SunlightEnhancement> sunlightEnhancement;
|
||||
sp<DisplayColorCalibration> displayColorCalibration;
|
||||
status_t status;
|
||||
|
||||
LOG(INFO) << "LiveDisplay HAL service is starting.";
|
||||
|
||||
adaptiveBacklight = new AdaptiveBacklight();
|
||||
if (adaptiveBacklight == nullptr) {
|
||||
LOG(ERROR)
|
||||
<< "Can not create an instance of LiveDisplay HAL AdaptiveBacklight Iface, exiting.";
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
sunlightEnhancement = new SunlightEnhancement();
|
||||
if (sunlightEnhancement == nullptr) {
|
||||
LOG(ERROR)
|
||||
<< "Can not create an instance of LiveDisplay HAL SunlightEnhancement Iface, exiting.";
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
displayColorCalibration = new DisplayColorCalibration();
|
||||
if (displayColorCalibration == nullptr) {
|
||||
LOG(ERROR) << "Can not create an instance of LiveDisplay HAL DisplayColorCalibration "
|
||||
"Iface, exiting.";
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
configureRpcThreadpool(1, true /*callerWillJoin*/);
|
||||
|
||||
if (adaptiveBacklight->isSupported()) {
|
||||
status = adaptiveBacklight->registerAsService();
|
||||
if (status != OK) {
|
||||
LOG(ERROR) << "Could not register service for LiveDisplay HAL AdaptiveBacklight Iface ("
|
||||
<< status << ")";
|
||||
goto shutdown;
|
||||
}
|
||||
}
|
||||
|
||||
if (sunlightEnhancement->isSupported()) {
|
||||
status = sunlightEnhancement->registerAsService();
|
||||
if (status != OK) {
|
||||
LOG(ERROR)
|
||||
<< "Could not register service for LiveDisplay HAL SunlightEnhancement Iface ("
|
||||
<< status << ")";
|
||||
goto shutdown;
|
||||
}
|
||||
}
|
||||
|
||||
if (displayColorCalibration->isSupported()) {
|
||||
status = displayColorCalibration->registerAsService();
|
||||
if (status != OK) {
|
||||
LOG(ERROR)
|
||||
<< "Could not register service for LiveDisplay HAL DisplayColorCalibration Iface ("
|
||||
<< status << ")";
|
||||
goto shutdown;
|
||||
}
|
||||
}
|
||||
|
||||
LOG(INFO) << "LiveDisplay HAL service is ready.";
|
||||
joinRpcThreadpool();
|
||||
// Should not pass this line
|
||||
|
||||
shutdown:
|
||||
// In normal operation, we don't expect the thread pool to shutdown
|
||||
LOG(ERROR) << "LiveDisplay HAL service is shutting down.";
|
||||
return 1;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
on post-fs-data
|
||||
mkdir /data/vendor/display 0770 system system
|
||||
|
||||
service vendor.livedisplay-hal-2-0-samsung-qcom.sm7325 /vendor/bin/hw/vendor.lineage.livedisplay@2.0-service.samsung-qcom.sm7325
|
||||
class late_start
|
||||
user system
|
||||
group system
|
||||
@@ -119,10 +119,8 @@
|
||||
|
||||
<!-- List supported color modes. -->
|
||||
<integer-array name="config_availableColorModes">
|
||||
<item>0</item> <!-- COLOR_MODE_NATURAL -->
|
||||
<item>1</item> <!-- COLOR_MODE_BOOSTED -->
|
||||
<item>2</item> <!-- COLOR_MODE_SATURATED -->
|
||||
<item>3</item> <!-- COLOR_MODE_AUTOMATIC -->
|
||||
<item>0</item> <!-- COLOR_MODE_NATURAL -->
|
||||
<item>256</item> <!-- COLOR_MODE_VENDOR -->
|
||||
</integer-array>
|
||||
|
||||
<!-- Screen brightness used to dim the screen while dozing in a very low power state.
|
||||
@@ -1347,4 +1345,7 @@
|
||||
|
||||
<!-- Whether the new Auto Selection Network UI should be shown -->
|
||||
<bool name="config_enableNewAutoSelectNetworkUI">true</bool>
|
||||
|
||||
<!-- Whether devices suports in-display fingerprint when screen is off -->
|
||||
<bool name="config_supportScreenOffUdfps">true</bool>
|
||||
</resources>
|
||||
|
||||
44
overlay/frameworks/base/core/res/res/values/dimens.xml
Normal file
44
overlay/frameworks/base/core/res/res/values/dimens.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2023, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<resources>
|
||||
|
||||
<!-- The default height of the status bar used in {@link SystemBarUtils#getStatusBarHeight} to
|
||||
calculate the status bar height. -->
|
||||
<dimen name="status_bar_height_default">100px</dimen>
|
||||
|
||||
<!-- Height of the status bar.
|
||||
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
|
||||
-->
|
||||
<dimen name="status_bar_height">100px</dimen>
|
||||
|
||||
<!-- Height of the status bar in portrait.
|
||||
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
|
||||
-->
|
||||
<dimen name="status_bar_height_portrait">100px</dimen>
|
||||
|
||||
<!-- Height of the status bar in landscape.
|
||||
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
|
||||
-->
|
||||
<dimen name="status_bar_height_landscape">100px</dimen>
|
||||
|
||||
<!-- Default paddings for content around the corners. -->
|
||||
<dimen name="rounded_corner_content_padding">50px</dimen>
|
||||
|
||||
</resources>
|
||||
@@ -24,5 +24,11 @@
|
||||
<bool name="doze_display_state_supported">true</bool>
|
||||
|
||||
<!-- the padding on the top of the statusbar (usually 0) -->
|
||||
<dimen name="status_bar_padding_top">6dp</dimen>
|
||||
<dimen name="status_bar_padding_top">7dp</dimen>
|
||||
|
||||
<!-- If not zero, limits the internal screen recorder's framerate to the set value. -->
|
||||
<integer name="config_screenRecorderMaxFramerate">60</integer>
|
||||
|
||||
<!-- Preferred max refresh rate at AOD & Ambient Display, if supported by the display. -->
|
||||
<integer name="config_aodMaxRefreshRate">60</integer>
|
||||
</resources>
|
||||
|
||||
@@ -21,5 +21,16 @@
|
||||
default that should be overridden by device-specific overlays. -->
|
||||
<dimen name="physical_power_button_center_screen_location_y">980px</dimen>
|
||||
|
||||
<dimen name="rounded_corner_content_padding">8dp</dimen>
|
||||
<!-- the padding on the start of the statusbar -->
|
||||
<dimen name="status_bar_padding_start">-1dp</dimen>
|
||||
|
||||
<!-- the padding on the end of the statusbar -->
|
||||
<dimen name="status_bar_padding_end">0dp</dimen>
|
||||
|
||||
<!-- QS padding controllers-->
|
||||
<dimen name="qs_panel_padding_top">100dp</dimen>
|
||||
|
||||
<!-- Margin on the left side of the carrier text on Keyguard -->
|
||||
<dimen name="keyguard_carrier_text_margin">12dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<!-- Defines the actions shown in advanced reboot submenu -->
|
||||
<string-array name="config_restartActionsList">
|
||||
<item>restart</item>
|
||||
<item>restart_systemui</item>
|
||||
<item>restart_recovery</item>
|
||||
<item>restart_download</item>
|
||||
</string-array>
|
||||
|
||||
@@ -37,4 +37,20 @@
|
||||
|
||||
<!-- Max network scan search time in seconds -->
|
||||
<integer name="config_network_scan_helper_max_search_time_sec">254</integer>
|
||||
|
||||
<!-- Display settings screen, Color mode options. Must be the same length and order as
|
||||
config_color_mode_options_values below. Only the values that also appear in
|
||||
frameworks/base/core/res/res/values/config.xml's config_availableColorModes are shown. -->
|
||||
<string-array name="config_color_mode_options_strings" translatable="false">
|
||||
<item>Natural</item>
|
||||
<item>Vivid</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Display settings screen, Color mode options. Must be the same length and order as
|
||||
config_color_mode_options_strings above. Only the values that also appear in
|
||||
frameworks/base/core/res/res/values/config.xml's config_availableColorModes are shown. -->
|
||||
<integer-array name="config_color_mode_options_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>256</item>
|
||||
</integer-array>
|
||||
</resources>
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
on early-init
|
||||
chmod 0660 /dev/goodix_fp
|
||||
chown system system /dev/goodix_fp
|
||||
|
||||
on init
|
||||
write /sys/class/sec/tsp/cmd "fod_enable,1,1,0"
|
||||
write /sys/class/sec/tsp/cmd "set_fod_rect,421,2018,659,2256"
|
||||
@@ -11,6 +7,9 @@ on boot
|
||||
chmod 0660 /dev/esfp0
|
||||
chown system system /dev/esfp0
|
||||
|
||||
chmod 0660 /dev/goodix_fp
|
||||
chown system system /dev/goodix_fp
|
||||
|
||||
chmod 0660 /dev/qbt2000_fd
|
||||
chmod 0660 /dev/qbt2000_ipc
|
||||
chmod 0660 /dev/qbtspi
|
||||
|
||||
@@ -66,6 +66,9 @@ on early-init
|
||||
|
||||
on init
|
||||
|
||||
# AFC permissions for fast charge
|
||||
chown system radio /sys/class/sec/switch/afc_disable
|
||||
|
||||
# Support legacy paths
|
||||
symlink /sdcard /mnt/sdcard
|
||||
symlink /sdcard /storage/sdcard0
|
||||
@@ -570,6 +573,11 @@ on property:vold.decrypt=trigger_restart_framework
|
||||
start qcom-c_main-sh
|
||||
start wcnss-service
|
||||
|
||||
on post-fs-data
|
||||
# Charge Bypass
|
||||
chown system system /sys/class/power_supply/battery
|
||||
chmod 0660 /sys/class/power_supply/battery
|
||||
|
||||
service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
|
||||
class core
|
||||
user vendor_qrtr
|
||||
@@ -908,8 +916,10 @@ service vendor.audio-hal /vendor/bin/hw/android.hardware.audio.service
|
||||
class hal
|
||||
user audioserver
|
||||
# media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
|
||||
group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock
|
||||
capabilities BLOCK_SUSPEND
|
||||
group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock context_hub
|
||||
capabilities BLOCK_SUSPEND SYS_NICE
|
||||
# setting RLIMIT_RTPRIO allows binder RT priority inheritance
|
||||
rlimit rtprio 10 10
|
||||
ioprio rt 4
|
||||
writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
|
||||
onrestart restart audioserver
|
||||
|
||||
@@ -111,6 +111,10 @@ on post-fs-data
|
||||
on early-boot
|
||||
start vendor.sensors
|
||||
|
||||
# Dolby
|
||||
mkdir /data/vendor/dolby 0770 media media
|
||||
mkdir /data/vendor/multimedia 0775 system system
|
||||
|
||||
on boot
|
||||
setprop vendor.powerhal.init 1
|
||||
|
||||
|
||||
@@ -79,6 +79,18 @@ on fs && property:ro.boot.rp=6 && property:ro.boot.em.model=SM-A528N
|
||||
mount none /vendor/firmware/wlan/a528n/rev6/wpss.b07 /vendor/firmware/wpss.b07 bind
|
||||
mount none /vendor/firmware/wlan/a528n/rev6/wpss.mdt /vendor/firmware/wpss.mdt bind
|
||||
|
||||
# bootloader revision 7, A528N (asia)
|
||||
on fs && property:ro.boot.rp=7 && property:ro.boot.em.model=SM-A528N
|
||||
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b00 /vendor/firmware/wpss.b00 bind
|
||||
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b01 /vendor/firmware/wpss.b01 bind
|
||||
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b02 /vendor/firmware/wpss.b02 bind
|
||||
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b03 /vendor/firmware/wpss.b03 bind
|
||||
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b04 /vendor/firmware/wpss.b04 bind
|
||||
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b05 /vendor/firmware/wpss.b05 bind
|
||||
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b06 /vendor/firmware/wpss.b06 bind
|
||||
mount none /vendor/firmware/wlan/a528n/rev7/wpss.b07 /vendor/firmware/wpss.b07 bind
|
||||
mount none /vendor/firmware/wlan/a528n/rev7/wpss.mdt /vendor/firmware/wpss.mdt bind
|
||||
|
||||
# bootloader revision 3, A528B (international)
|
||||
on fs && property:ro.boot.rp=3 && property:ro.boot.em.model=SM-A528B
|
||||
mount none /vendor/firmware/wlan/a528b/rev3/wpss.b01 /vendor/firmware/wpss.b01 bind
|
||||
@@ -317,6 +329,30 @@ on fs && property:ro.boot.rp=6 && property:ro.boot.em.model=SM-M526B
|
||||
mount none /vendor/firmware/wlan/m526b/rev6/wpss.b07 /vendor/firmware/wpss.b07 bind
|
||||
mount none /vendor/firmware/wlan/m526b/rev6/wpss.mdt /vendor/firmware/wpss.mdt bind
|
||||
|
||||
# bootloader revision 7, M526BR (international)
|
||||
on fs && property:ro.boot.rp=7 && property:ro.boot.em.model=SM-M526BR
|
||||
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b00 /vendor/firmware/wpss.b00 bind
|
||||
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b01 /vendor/firmware/wpss.b01 bind
|
||||
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b02 /vendor/firmware/wpss.b02 bind
|
||||
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b03 /vendor/firmware/wpss.b03 bind
|
||||
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b04 /vendor/firmware/wpss.b04 bind
|
||||
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b05 /vendor/firmware/wpss.b05 bind
|
||||
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b06 /vendor/firmware/wpss.b06 bind
|
||||
mount none /vendor/firmware/wlan/m526br/rev7/wpss.b07 /vendor/firmware/wpss.b07 bind
|
||||
mount none /vendor/firmware/wlan/m526br/rev7/wpss.mdt /vendor/firmware/wpss.mdt bind
|
||||
|
||||
# bootloader revision 7, M526B (america)
|
||||
on fs && property:ro.boot.rp=7 && property:ro.boot.em.model=SM-M526B
|
||||
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b00 /vendor/firmware/wpss.b00 bind
|
||||
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b01 /vendor/firmware/wpss.b01 bind
|
||||
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b02 /vendor/firmware/wpss.b02 bind
|
||||
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b03 /vendor/firmware/wpss.b03 bind
|
||||
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b04 /vendor/firmware/wpss.b04 bind
|
||||
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b05 /vendor/firmware/wpss.b05 bind
|
||||
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b06 /vendor/firmware/wpss.b06 bind
|
||||
mount none /vendor/firmware/wlan/m526b/rev7/wpss.b07 /vendor/firmware/wpss.b07 bind
|
||||
mount none /vendor/firmware/wlan/m526b/rev7/wpss.mdt /vendor/firmware/wpss.mdt bind
|
||||
|
||||
# bootloader revision 3, A736B
|
||||
on fs && property:ro.boot.rp=3 && property:ro.boot.em.model=SM-A736B
|
||||
mount none /vendor/firmware/wlan/rev3/wpss.b01 /vendor/firmware/wpss.b01 bind
|
||||
|
||||
67
sepolicy/private/devicesettings_app.te
Normal file
67
sepolicy/private/devicesettings_app.te
Normal file
@@ -0,0 +1,67 @@
|
||||
app_domain(devicesettings_app)
|
||||
|
||||
# Allow devicesettings_app to find *_service
|
||||
allow devicesettings_app {
|
||||
activity_service
|
||||
activity_task_service
|
||||
app_api_service
|
||||
audioserver_service
|
||||
audio_service
|
||||
autofill_service
|
||||
batterystats_service
|
||||
cameraserver_service
|
||||
cameraserver_service
|
||||
content_capture_service
|
||||
device_state_service
|
||||
drmserver_service
|
||||
game_service
|
||||
gpu_service
|
||||
hint_service
|
||||
media_session_service
|
||||
mediaextractor_service
|
||||
mediametrics_service
|
||||
mediaserver_service
|
||||
netstats_service
|
||||
permission_checker_service
|
||||
sensorservice_service
|
||||
statusbar_service
|
||||
surfaceflinger_service
|
||||
thermal_service
|
||||
trust_service
|
||||
voiceinteraction_service
|
||||
}:service_manager find;
|
||||
|
||||
# Allow devicesettings_app read and write /data/data subdirectory
|
||||
allow devicesettings_app system_app_data_file:dir create_dir_perms;
|
||||
allow devicesettings_app system_app_data_file:{ file lnk_file } create_file_perms;
|
||||
|
||||
# Allow binder communication with gpuservice
|
||||
binder_call(devicesettings_app, gpuservice)
|
||||
|
||||
# Allow devicesettings_app to get settingsdebug.instant.packages prop
|
||||
get_prop(devicesettings_app, settingslib_prop)
|
||||
|
||||
# Allow reading thermal sensor data
|
||||
r_dir_file(devicesettings_app, sysfs_thermal)
|
||||
allow devicesettings_app sysfs_thermal:file { read open };
|
||||
allow devicesettings_app sysfs:file { read open };
|
||||
|
||||
# Allow reading battery information for charging speed tile
|
||||
# Primary battery sysfs paths
|
||||
allow devicesettings_app sysfs_batteryinfo:file r_file_perms;
|
||||
allow devicesettings_app sysfs_power:file r_file_perms;
|
||||
allow devicesettings_app sysfs_battery:dir search;
|
||||
allow devicesettings_app sysfs_battery:file r_file_perms;
|
||||
|
||||
# Allow charging bypass to overwrite
|
||||
allow devicesettings_app sysfs_battery_writable:dir r_dir_perms;
|
||||
allow devicesettings_app sysfs_battery_writable:file { open read write getattr ioctl };
|
||||
|
||||
# Specific battery file access (fallback if contexts above don't work)
|
||||
allow devicesettings_app sysfs:file { read open getattr ioctl };
|
||||
|
||||
# Allow reading battery manager information
|
||||
allow devicesettings_app proc_stat:file r_file_perms;
|
||||
|
||||
# Allow Quick Settings tile service binding
|
||||
allow devicesettings_app system_server:binder { call transfer };
|
||||
2
sepolicy/private/file_contexts
Normal file
2
sepolicy/private/file_contexts
Normal file
@@ -0,0 +1,2 @@
|
||||
# Charging Bypass
|
||||
/sys/class/power_supply/battery/batt_slate_mode u:object_r:sysfs_battery_writable:s0
|
||||
@@ -0,0 +1,4 @@
|
||||
allow hal_samsung_camera_flashlight_default sysfs_camera:dir search;
|
||||
allow hal_samsung_camera_flashlight_default sysfs_camera:file rw_file_perms;
|
||||
allow hal_samsung_camera_flashlight_default sysfs_camera_writable:dir search;
|
||||
allow hal_samsung_camera_flashlight_default sysfs_camera_writable:file rw_file_perms;
|
||||
2
sepolicy/private/property_contexts
Normal file
2
sepolicy/private/property_contexts
Normal file
@@ -0,0 +1,2 @@
|
||||
# SettingsLib
|
||||
settingsdebug.instant.packages u:object_r:settingslib_prop:s0
|
||||
2
sepolicy/private/seapp_contexts
Normal file
2
sepolicy/private/seapp_contexts
Normal file
@@ -0,0 +1,2 @@
|
||||
# Parts
|
||||
user=system seinfo=platform name=org.lineageos.settings domain=devicesettings_app type=system_app_data_file levelFrom=all
|
||||
2
sepolicy/public/devicesettings_app.te
Normal file
2
sepolicy/public/devicesettings_app.te
Normal file
@@ -0,0 +1,2 @@
|
||||
type devicesettings_app, domain;
|
||||
typeattribute devicesettings_app mlstrustedsubject;
|
||||
@@ -1 +1,4 @@
|
||||
type sysfs_battery, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_battery_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_camera, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_camera_writable, sysfs_type, r_fs_type, fs_type;
|
||||
|
||||
2
sepolicy/public/property.te
Normal file
2
sepolicy/public/property.te
Normal file
@@ -0,0 +1,2 @@
|
||||
# SettingsLib
|
||||
system_public_prop(settingslib_prop)
|
||||
16
sepolicy/vendor/devicesettings_app.te
vendored
Normal file
16
sepolicy/vendor/devicesettings_app.te
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
allow devicesettings_app vendor_sysfs_graphics:dir search;
|
||||
allow devicesettings_app vendor_sysfs_graphics:file rw_file_perms;
|
||||
|
||||
allow devicesettings_app vendor_sysfs_kgsl:dir search;
|
||||
|
||||
allow devicesettings_app vendor_sysfs_kgsl:{ file lnk_file } rw_file_perms;
|
||||
|
||||
allow devicesettings_app property_socket:sock_file { read write getattr };
|
||||
allow devicesettings_app init:unix_stream_socket connectto;
|
||||
|
||||
allow devicesettings_app vendor_sysfs_battery_supply:dir search;
|
||||
allow devicesettings_app vendor_sysfs_battery_supply:file r_file_perms;
|
||||
|
||||
allow devicesettings_app proc_stat:file { read open getattr };
|
||||
|
||||
allow devicesettings_app vendor_sysfs_kgsl_gpuclk:file { read open getattr };
|
||||
3
sepolicy/vendor/file.te
vendored
3
sepolicy/vendor/file.te
vendored
@@ -1,5 +1,4 @@
|
||||
# SYSFS
|
||||
type sysfs_camera, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_fingerprint, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_iio, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_input, sysfs_type, r_fs_type, fs_type;
|
||||
@@ -13,8 +12,6 @@ type sysfs_wifi, sysfs_type, r_fs_type, fs_type;
|
||||
|
||||
type sysfs_audio_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_backlight_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_camera_writable, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_battery_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_lcd_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_power_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_sensors_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
|
||||
8
sepolicy/vendor/file_contexts
vendored
8
sepolicy/vendor/file_contexts
vendored
@@ -31,6 +31,9 @@
|
||||
# radio
|
||||
/dev/drb u:object_r:drb_device:s0
|
||||
|
||||
# Process and system statistics files
|
||||
/proc/stat u:object_r:proc_stat:s0
|
||||
|
||||
# EFS
|
||||
/efs/Battery(/.*)? u:object_r:battery_efs_file:s0
|
||||
/efs/biometrics(/.*)? u:object_r:biometrics_efs_file:s0
|
||||
@@ -58,10 +61,9 @@
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.power(@[0-9]\.[0-9])?-service\.pixel-libperfmgr u:object_r:hal_power_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.nfc@[0-9]\.[0-9]-service\.samsung u:object_r:hal_nfc_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/nxp\.android\.hardware\.nfc@[0-9]\.[0-9]-service u:object_r:hal_nfc_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.fastcharge@[0-9]\.[0-9]-service\.samsung u:object_r:hal_lineage_fastcharge_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch\@[0-9]\.[0-9]-service.samsung_sm7325 u:object_r:hal_lineage_touch_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch-service\.samsung u:object_r:hal_lineage_touch_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/secril_config_svc u:object_r:secril_config_svc_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service.samsung-qcom\.sm7325 u:object_r:hal_lineage_livedisplay_sysfs_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.samsung-qcom u:object_r:hal_lineage_livedisplay_qti_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android.hardware.biometrics.fingerprint-service.samsung u:object_r:hal_fingerprint_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor.samsung.hardware.thermal@1.0-service u:object_r:hal_thermal_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android.hardware.sensors-service.samsung-multihal u:object_r:hal_sensors_default_exec:s0
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# hal_lineage_fastcharge_default
|
||||
|
||||
set_prop(hal_lineage_fastcharge, vendor_fastcharge_prop)
|
||||
|
||||
allow hal_lineage_fastcharge_default sysfs_sec_switch:dir search;
|
||||
allow hal_lineage_fastcharge_default sysfs_sec_switch_writable:file rw_file_perms;
|
||||
@@ -1,2 +1,5 @@
|
||||
allow hal_lineage_health_default sysfs_sec_switch:dir search;
|
||||
allow hal_lineage_health_default sysfs_sec_switch_writable:file rw_file_perms;
|
||||
|
||||
rw_dir_file(hal_lineage_health_default, sysfs_battery_writable)
|
||||
r_dir_file(hal_lineage_health_default, sysfs_battery)
|
||||
7
sepolicy/vendor/hal_lineage_livedisplay_qti.te
vendored
Normal file
7
sepolicy/vendor/hal_lineage_livedisplay_qti.te
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# /sys/devices/virtual/lcd/panel
|
||||
allow hal_lineage_livedisplay_qti sysfs_lcd_writable:file { read write open };
|
||||
|
||||
# /sys/devices/virtual/mdnie/mdnie/
|
||||
allow hal_lineage_livedisplay_qti sysfs_mdnie_writable:dir search;
|
||||
allow hal_lineage_livedisplay_qti sysfs_mdnie_writable:file { read write open getattr };
|
||||
allow hal_lineage_livedisplay_qti vendor_sysfs_graphics:file write;
|
||||
10
sepolicy/vendor/hal_lineage_livedisplay_sysfs.te
vendored
10
sepolicy/vendor/hal_lineage_livedisplay_sysfs.te
vendored
@@ -1,10 +0,0 @@
|
||||
# /sys/devices/virtual/lcd/panel
|
||||
allow hal_lineage_livedisplay_sysfs sysfs_lcd_writable:file { read write open };
|
||||
|
||||
# /sys/devices/virtual/mdnie/mdnie/
|
||||
allow hal_lineage_livedisplay_sysfs sysfs_mdnie_writable:dir search;
|
||||
allow hal_lineage_livedisplay_sysfs sysfs_mdnie_writable:file { read write open getattr };
|
||||
allow hal_lineage_livedisplay_sysfs vendor_sysfs_graphics:file write;
|
||||
|
||||
allow hal_lineage_livedisplay_sysfs vendor_display_vendor_data_file:dir { write add_name search };
|
||||
allow hal_lineage_livedisplay_sysfs vendor_display_vendor_data_file:file { read write open create getattr };
|
||||
3
sepolicy/vendor/property.te
vendored
3
sepolicy/vendor/property.te
vendored
@@ -1,6 +1,3 @@
|
||||
# Fastcharge
|
||||
vendor_internal_prop(vendor_fastcharge_prop)
|
||||
|
||||
# NFC
|
||||
vendor_internal_prop(vendor_nfc_prop)
|
||||
|
||||
|
||||
3
sepolicy/vendor/property_contexts
vendored
3
sepolicy/vendor/property_contexts
vendored
@@ -6,9 +6,6 @@ vendor.bluetooth_fw_ver u:object_r:vendor_bluetooth_pro
|
||||
vendor.bluetooth_nv_ver u:object_r:vendor_bluetooth_prop:s0
|
||||
persist.vendor.bt. u:object_r:vendor_bluetooth_prop:s0
|
||||
|
||||
# fastcharge
|
||||
persist.vendor.sec.fastchg_enabled u:object_r:vendor_fastcharge_prop:s0
|
||||
|
||||
# NFC
|
||||
ro.vendor.nfc. u:object_r:vendor_nfc_prop:s0
|
||||
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
// Copyright (C) 2019 The LineageOS Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
cc_binary {
|
||||
name: "vendor.lineage.touch@1.0-service.samsung_sm7325",
|
||||
init_rc: ["vendor.lineage.touch@1.0-service.samsung_sm7325.rc"],
|
||||
defaults: ["hidl_defaults"],
|
||||
relative_install_path: "hw",
|
||||
// FIXME: this should be 'vendor: true' for modules that will eventually be
|
||||
// on AOSP.
|
||||
proprietary: true,
|
||||
local_include_dirs: ["include"],
|
||||
srcs: [
|
||||
"GloveMode.cpp",
|
||||
"TouchscreenGesture.cpp",
|
||||
"service.cpp"
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libbinder",
|
||||
"libhidlbase",
|
||||
"libutils",
|
||||
"vendor.lineage.touch@1.0",
|
||||
],
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "GloveMode.h"
|
||||
|
||||
namespace vendor {
|
||||
namespace lineage {
|
||||
namespace touch {
|
||||
namespace V1_0 {
|
||||
namespace samsung {
|
||||
|
||||
bool GloveMode::isSupported() {
|
||||
std::ifstream file(TSP_CMD_LIST_NODE);
|
||||
if (file.is_open()) {
|
||||
std::string line;
|
||||
while (getline(file, line)) {
|
||||
if (!line.compare("glove_mode")) return true;
|
||||
}
|
||||
file.close();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Methods from ::vendor::lineage::touch::V1_0::IGloveMode follow.
|
||||
Return<bool> GloveMode::isEnabled() {
|
||||
std::ifstream file(TSP_CMD_RESULT_NODE);
|
||||
if (file.is_open()) {
|
||||
std::string line;
|
||||
getline(file, line);
|
||||
if (!line.compare("glove_mode,1:OK")) return true;
|
||||
file.close();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Return<bool> GloveMode::setEnabled(bool enabled) {
|
||||
std::ofstream file(TSP_CMD_NODE);
|
||||
file << "glove_mode," << (enabled ? "1" : "0");
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace samsung
|
||||
} // namespace V1_0
|
||||
} // namespace touch
|
||||
} // namespace lineage
|
||||
} // namespace vendor
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/lineage/touch/1.0/IGloveMode.h>
|
||||
#include "samsung_touch.h"
|
||||
|
||||
namespace vendor {
|
||||
namespace lineage {
|
||||
namespace touch {
|
||||
namespace V1_0 {
|
||||
namespace samsung {
|
||||
|
||||
using ::android::hardware::hidl_array;
|
||||
using ::android::hardware::hidl_memory;
|
||||
using ::android::hardware::hidl_string;
|
||||
using ::android::hardware::hidl_vec;
|
||||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
using ::android::sp;
|
||||
|
||||
class GloveMode : public IGloveMode {
|
||||
public:
|
||||
GloveMode() = default;
|
||||
|
||||
bool isSupported();
|
||||
|
||||
// Methods from ::vendor::lineage::touch::V1_0::IGloveMode follow.
|
||||
Return<bool> isEnabled() override;
|
||||
Return<bool> setEnabled(bool enabled) override;
|
||||
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
};
|
||||
|
||||
} // namespace samsung
|
||||
} // namespace V1_0
|
||||
} // namespace touch
|
||||
} // namespace lineage
|
||||
} // namespace vendor
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "TouchscreenGesture.h"
|
||||
|
||||
namespace vendor {
|
||||
namespace lineage {
|
||||
namespace touch {
|
||||
namespace V1_0 {
|
||||
namespace samsung {
|
||||
|
||||
static constexpr const char* kTspPath = TSP_CMD_NODE;
|
||||
|
||||
const std::map<int32_t, TouchscreenGesture::GestureInfo> TouchscreenGesture::kGestureInfoMap = {
|
||||
// clang-format off
|
||||
{0, {0x1c7, "Single Tap"}},
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
bool TouchscreenGesture::isSupported() {
|
||||
std::ifstream file(kTspPath);
|
||||
return file.good();
|
||||
}
|
||||
|
||||
// Methods from ::vendor::lineage::touch::V1_0::ITouchscreenGesture follow.
|
||||
Return<void> TouchscreenGesture::getSupportedGestures(getSupportedGestures_cb resultCb) {
|
||||
std::vector<Gesture> gestures;
|
||||
|
||||
for (const auto& entry : kGestureInfoMap) {
|
||||
gestures.push_back({entry.first, entry.second.name, entry.second.keycode});
|
||||
}
|
||||
resultCb(gestures);
|
||||
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<bool> TouchscreenGesture::setGestureEnabled(
|
||||
const ::vendor::lineage::touch::V1_0::Gesture&, bool enabled) {
|
||||
std::fstream file(kTspPath);
|
||||
|
||||
file << "singletap_enable," << (enabled ? "1" : "0");
|
||||
|
||||
return !file.fail();
|
||||
}
|
||||
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
|
||||
} // namespace samsung
|
||||
} // namespace V1_0
|
||||
} // namespace touch
|
||||
} // namespace lineage
|
||||
} // namespace vendor
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/lineage/touch/1.0/ITouchscreenGesture.h>
|
||||
#include "samsung_touch.h"
|
||||
|
||||
namespace vendor {
|
||||
namespace lineage {
|
||||
namespace touch {
|
||||
namespace V1_0 {
|
||||
namespace samsung {
|
||||
|
||||
using ::android::hardware::hidl_array;
|
||||
using ::android::hardware::hidl_memory;
|
||||
using ::android::hardware::hidl_string;
|
||||
using ::android::hardware::hidl_vec;
|
||||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
using ::android::sp;
|
||||
|
||||
class TouchscreenGesture : public ITouchscreenGesture {
|
||||
public:
|
||||
bool isSupported();
|
||||
|
||||
// Methods from ::vendor::lineage::touch::V1_0::ITouchscreenGesture follow.
|
||||
Return<void> getSupportedGestures(getSupportedGestures_cb resultCb) override;
|
||||
Return<bool> setGestureEnabled(const ::vendor::lineage::touch::V1_0::Gesture& gesture,
|
||||
bool enabled) override;
|
||||
|
||||
private:
|
||||
typedef struct {
|
||||
int32_t keycode;
|
||||
const char* name;
|
||||
} GestureInfo;
|
||||
static const std::map<int32_t, GestureInfo> kGestureInfoMap; // id -> info
|
||||
};
|
||||
|
||||
// FIXME: most likely delete, this is only for passthrough implementations
|
||||
// extern "C" ITouchscreenGesture* HIDL_FETCH_ITouchscreenGesture(const char* name);
|
||||
|
||||
} // namespace samsung
|
||||
} // namespace V1_0
|
||||
} // namespace touch
|
||||
} // namespace lineage
|
||||
} // namespace vendor
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SAMSUNG_TOUCH_H
|
||||
#define SAMSUNG_TOUCH_H
|
||||
|
||||
/*
|
||||
* Board specific nodes
|
||||
*
|
||||
* If your kernel exposes these controls in another place, you can either
|
||||
* symlink to the locations given here, or override this header in your
|
||||
* device tree.
|
||||
*/
|
||||
|
||||
// For GloveMode
|
||||
#define TSP_CMD_LIST_NODE "/sys/class/sec/tsp/cmd_list"
|
||||
#define TSP_CMD_RESULT_NODE "/sys/class/sec/tsp/cmd_result"
|
||||
#define TSP_CMD_NODE "/sys/class/sec/tsp/cmd"
|
||||
|
||||
#endif // SAMSUNG_TOUCH_H
|
||||
@@ -1,82 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "vendor.lineage.touch@1.0-service.samsung_sm7325"
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <binder/ProcessState.h>
|
||||
#include <hidl/HidlTransportSupport.h>
|
||||
|
||||
#include "GloveMode.h"
|
||||
#include "TouchscreenGesture.h"
|
||||
|
||||
using android::hardware::configureRpcThreadpool;
|
||||
using android::hardware::joinRpcThreadpool;
|
||||
using android::sp;
|
||||
using android::status_t;
|
||||
using android::OK;
|
||||
|
||||
using ::vendor::lineage::touch::V1_0::samsung::GloveMode;
|
||||
using ::vendor::lineage::touch::V1_0::samsung::TouchscreenGesture;
|
||||
|
||||
int main() {
|
||||
sp<GloveMode> gloveMode;
|
||||
sp<TouchscreenGesture> touchscreenGesture;
|
||||
status_t status;
|
||||
|
||||
LOG(INFO) << "Touch HAL service is starting.";
|
||||
|
||||
gloveMode = new GloveMode();
|
||||
if (gloveMode == nullptr) {
|
||||
LOG(ERROR) << "Can not create an instance of Touch HAL GloveMode Iface, exiting.";
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
touchscreenGesture = new TouchscreenGesture();
|
||||
if (touchscreenGesture == nullptr) {
|
||||
LOG(ERROR) << "Can not create an instance of Touch HAL TouchscreenGesture Iface, exiting.";
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
configureRpcThreadpool(1, true /*callerWillJoin*/);
|
||||
|
||||
if (gloveMode->isSupported()) {
|
||||
status = gloveMode->registerAsService();
|
||||
if (status != OK) {
|
||||
LOG(ERROR) << "Could not register service for Touch HAL GloveMode Iface (" << status
|
||||
<< ")";
|
||||
goto shutdown;
|
||||
}
|
||||
}
|
||||
|
||||
if (touchscreenGesture->isSupported()) {
|
||||
status = touchscreenGesture->registerAsService();
|
||||
if (status != OK) {
|
||||
LOG(ERROR) << "Could not register service for Touch HAL TouchscreenGesture Iface ("
|
||||
<< status << ")";
|
||||
goto shutdown;
|
||||
}
|
||||
}
|
||||
|
||||
LOG(INFO) << "Touch HAL service is ready.";
|
||||
joinRpcThreadpool();
|
||||
// Should not pass this line
|
||||
|
||||
shutdown:
|
||||
// In normal operation, we don't expect the thread pool to shutdown
|
||||
LOG(ERROR) << "Touch HAL service is shutting down.";
|
||||
return 1;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
on early-init
|
||||
chown system radio /sys/class/sec/tsp/cmd
|
||||
chmod 0664 /sys/class/sec/tsp/cmd
|
||||
|
||||
service vendor.touch-hal-1-0 /vendor/bin/hw/vendor.lineage.touch@1.0-service.samsung_sm7325
|
||||
class hal
|
||||
user system
|
||||
group system
|
||||
@@ -21,8 +21,6 @@ audio.offload.video=true
|
||||
vendor.audio.offload.track.enable=true
|
||||
audio.deep_buffer.media=true
|
||||
vendor.audio.offload.multiaac.enable=true
|
||||
vendor.audio.dolby.ds2.enabled=false
|
||||
vendor.audio.dolby.ds2.hardbypass=false
|
||||
vendor.audio.offload.multiple.enabled=false
|
||||
vendor.audio.offload.passthrough=false
|
||||
vendor.voice.path.for.pcm.voip=true
|
||||
|
||||
Reference in New Issue
Block a user