Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ea813f3b3 | ||
|
|
d35856cc7f |
@@ -31,6 +31,9 @@ TARGET_KERNEL_SOURCE := kernel/xiaomi/msm8953
|
||||
TARGET_KERNEL_CONFIG := msm8953-perf_defconfig xiaomi/xiaomi.config
|
||||
TARGET_KERNEL_CLANG_VERSION := r530567
|
||||
|
||||
# ANT
|
||||
BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"
|
||||
|
||||
# Audio
|
||||
AUDIO_FEATURE_ENABLED_ANC_HEADSET := true
|
||||
AUDIO_FEATURE_ENABLED_ALAC_OFFLOAD := true
|
||||
|
||||
@@ -113,6 +113,11 @@
|
||||
<transport>hwbinder</transport>
|
||||
<fqname>@1.0::IDisplayPostproc/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.lineage.livedisplay</name>
|
||||
<transport>hwbinder</transport>
|
||||
<fqname>@2.0::IPictureAdjustment/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.qti.data.factory</name>
|
||||
<transport>hwbinder</transport>
|
||||
|
||||
10
msm8953.mk
10
msm8953.mk
@@ -50,6 +50,10 @@ PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml \
|
||||
frameworks/native/data/etc/android.software.print.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.print.xml
|
||||
|
||||
# ANT
|
||||
PRODUCT_PACKAGES += \
|
||||
AntHalService
|
||||
|
||||
# Audio
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.audio@6.0-impl \
|
||||
@@ -97,6 +101,10 @@ PRODUCT_PACKAGES += \
|
||||
PRODUCT_PACKAGES += \
|
||||
disable_configstore
|
||||
|
||||
# Consumer IR
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.ir-service.lineage
|
||||
|
||||
# Display
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.graphics.allocator@2.0-impl \
|
||||
@@ -189,7 +197,7 @@ PRODUCT_PACKAGES += \
|
||||
|
||||
# LiveDisplay
|
||||
PRODUCT_PACKAGES += \
|
||||
vendor.lineage.livedisplay-service.sdm
|
||||
vendor.lineage.livedisplay@2.0-service-sdm
|
||||
|
||||
# Media
|
||||
PRODUCT_COPY_FILES += \
|
||||
|
||||
@@ -167,8 +167,83 @@ vendor/lib64/vendor.qti.hardware.data.latency@1.0.so
|
||||
vendor/lib64/vendor.qti.hardware.data.qmi@1.0.so
|
||||
vendor/lib64/vendor.qti.latency@2.0.so
|
||||
|
||||
<<<<<<< HEAD
|
||||
# Charger
|
||||
vendor/bin/hvdcp_opti
|
||||
=======
|
||||
# Configstore
|
||||
vendor/bin/hw/vendor.qti.hardware.capabilityconfigstore@1.0-service
|
||||
vendor/etc/init/vendor.qti.hardware.capabilityconfigstore@1.0-service.rc
|
||||
vendor/lib64/hw/vendor.qti.hardware.capabilityconfigstore@1.0-impl.so
|
||||
|
||||
# Diag
|
||||
system_ext/lib64/libdiag_system.so
|
||||
system_ext/lib64/vendor.qti.diaghal@1.0.so
|
||||
vendor/bin/diag-router
|
||||
vendor/etc/init/vendor.qti.diag.rc
|
||||
vendor/etc/vintf/manifest/vendor.qti.diag.hal.service.xml
|
||||
vendor/lib/libdiag.so
|
||||
vendor/lib64/libdiag.so
|
||||
vendor/lib64/vendor.qti.diaghal@1.0.so
|
||||
|
||||
# Display (SDM) - from tundra T1SJS33.117-30-3-5
|
||||
vendor/etc/display/DPU660.xml|b26dd73e361546d89bf3d7082a471703dc6ac2cb
|
||||
vendor/etc/display/DPU670.xml|e5131a60ceff29ca5eb561eec7eddadef1d0486f
|
||||
vendor/etc/display/DPU720.xml|4e54e8712d65773eb87867bf64a4cb98ea9bb8c3
|
||||
vendor/etc/display/DPU7__.xml|c056f3cb9fa123ca3de5b2a9775c184dddf25b9d
|
||||
vendor/lib64/libdisplayqos.so|aa222f4c1a2d2fb60944c44f8a82621d6bc75184
|
||||
vendor/lib64/libdisplayskuutils.so|37e4d543c696a5c9f0c1b44fd7299a0bc7dba5e8
|
||||
vendor/lib64/libdpps.so|9caf32a0d3636af579ea6e1a6c5638a16ed19444
|
||||
vendor/lib64/libhdr_tm.so|7954c5cd5c0b23fe8d0609361c22d24c59f1448b
|
||||
vendor/lib64/libqrtrclient.so|2474a708487c269c04afffbf755fff1686c6011c
|
||||
vendor/lib64/libqseed3.so|d62c37baf259250cadfcff8734e82054ed87bb96
|
||||
vendor/lib64/librcmask.so|8feb479fe590b6aec282ce3342574d9113f80516
|
||||
vendor/lib64/libsdm-color.so|a83576915a146492d430711e273b9af9a95d4fed
|
||||
vendor/lib64/libsdm-colormgr-algo.so|5416a3b9b0735099c9b86f451f41386711787ea4
|
||||
vendor/lib64/libsdm-diag.so|393c9ad3e3ad3210515900627f65bf6e3633226e
|
||||
vendor/lib64/libsdm-disp-vndapis.so|dc3ff8c971bbcb0d1b9e5079324d1d1d05a1fd39
|
||||
vendor/lib64/libsdmextension.so|4c32026ff8cb1270081881d4def7a2ad05ad0b80
|
||||
vendor/lib64/libtinyxml2_1.so|11ceb3f1e7650c41621d47e5ec5567c8f466086e
|
||||
|
||||
# Display postprocessing
|
||||
vendor/bin/hw/vendor.display.color@1.0-service
|
||||
vendor/bin/ppd
|
||||
vendor/bin/qdcmss
|
||||
vendor/etc/init/qdcmss.rc
|
||||
vendor/etc/init/vendor.display.color@1.0-service.rc
|
||||
vendor/etc/SVIConfig.xml
|
||||
vendor/etc/qdcm_calib_data_xiaomi_k6s_38_0c_0a_fhd_dsc_video_dsi_panel.xml
|
||||
vendor/etc/snapdragon_color_libs_config.xml
|
||||
vendor/lib64/libdisp-aba.so
|
||||
vendor/lib64/libqdcm-mode-parser.so
|
||||
vendor/lib64/libsnapdragoncolor-manager.so
|
||||
vendor/lib64/libsnapdragoncolor-qdcm.so
|
||||
vendor/lib64/vendor.display.color@1.0.so
|
||||
vendor/lib64/vendor.display.color@1.1.so
|
||||
vendor/lib64/vendor.display.color@1.2.so
|
||||
vendor/lib64/vendor.display.color@1.3.so
|
||||
vendor/lib64/vendor.display.color@1.4.so
|
||||
vendor/lib64/vendor.display.color@1.5.so
|
||||
vendor/lib64/vendor.display.postproc@1.0.so
|
||||
|
||||
# Dolby
|
||||
vendor/bin/hw/vendor.dolby.hardware.dms@2.0-service
|
||||
vendor/etc/init/vendor.dolby.hardware.dms@2.0-service.rc
|
||||
vendor/etc/media_codecs_dolby_audio.xml
|
||||
vendor/etc/vintf/manifest/manifest_vendor.dolby.hardware.dms.xml
|
||||
vendor/lib/libdapparamstorage.so
|
||||
vendor/lib/libdeccfg.so
|
||||
vendor/lib/libstagefright_soft_ac4dec.so
|
||||
vendor/lib/libstagefright_soft_ddpdec.so
|
||||
vendor/lib/soundfx/libswdap.so|810d0e266e4a77f06cba72fe8bdde2e1ede4f9f9
|
||||
vendor/lib/soundfx/libswgamedap.so
|
||||
vendor/lib/soundfx/libswvqe.so
|
||||
vendor/lib/vendor.dolby.hardware.dms@2.0.so
|
||||
vendor/lib64/libdapparamstorage.so
|
||||
vendor/lib64/libdlbdsservice.so
|
||||
vendor/lib64/vendor.dolby.hardware.dms@2.0-impl.so
|
||||
vendor/lib64/vendor.dolby.hardware.dms@2.0.so
|
||||
>>>>>>> 24a1854 (veux: Move to Xiaomi IR AIDL)
|
||||
|
||||
# DPM
|
||||
product/bin/dpmd:system_ext/bin/dpmd
|
||||
|
||||
5
sepolicy/vendor/file_contexts
vendored
5
sepolicy/vendor/file_contexts
vendored
@@ -31,15 +31,12 @@
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.drm@1\.0-service\.widevine u:object_r:hal_drm_widevine_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.drm@1\.1-service\.clearkey u:object_r:hal_drm_clearkey_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.light-service\.xiaomi_msm8953 u:object_r:hal_light_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.xiaomi_8953 u:object_r:hal_lineage_touch_default_exec:s0
|
||||
|
||||
# Input devices
|
||||
/(vendor|system/vendor)/usr/idc(/.*)? u:object_r:vendor_idc_file:s0
|
||||
/(vendor|system/vendor)/usr/keylayout(/.*)? u:object_r:vendor_keylayout_file:s0
|
||||
|
||||
# Ir
|
||||
/dev/peel_ir u:object_r:lirc_device:s0
|
||||
/dev/spidev5\.1 u:object_r:lirc_device:s0
|
||||
|
||||
# Location
|
||||
/data/vendor/location/xtra/socket_hal_xtra u:object_r:location_socket:s0
|
||||
|
||||
|
||||
24
touch/Android.bp
Normal file
24
touch/Android.bp
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// Copyright (C) 2019-2021 The LineageOS Project
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
cc_binary {
|
||||
name: "vendor.lineage.touch@1.0-service.xiaomi_8953",
|
||||
init_rc: ["vendor.lineage.touch@1.0-service.xiaomi_8953.rc"],
|
||||
defaults: ["hidl_defaults"],
|
||||
vintf_fragments: ["vendor.lineage.touch@1.0-service.xiaomi_8953.xml"],
|
||||
relative_install_path: "hw",
|
||||
vendor: true,
|
||||
srcs: [
|
||||
"KeyDisabler.cpp",
|
||||
"service.cpp"
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libhidlbase",
|
||||
"libutils",
|
||||
"vendor.lineage.touch@1.0",
|
||||
],
|
||||
}
|
||||
64
touch/KeyDisabler.cpp
Normal file
64
touch/KeyDisabler.cpp
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* 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 <android-base/file.h>
|
||||
#include <android-base/logging.h>
|
||||
#include <android-base/strings.h>
|
||||
|
||||
#include "KeyDisabler.h"
|
||||
|
||||
namespace vendor {
|
||||
namespace lineage {
|
||||
namespace touch {
|
||||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
|
||||
constexpr const char kControlPath[] = "/proc/touchpanel/capacitive_keys_disable";
|
||||
|
||||
KeyDisabler::KeyDisabler() {
|
||||
mHasKeyDisabler = !access(kControlPath, F_OK);
|
||||
}
|
||||
|
||||
// Methods from ::vendor::lineage::touch::V1_0::IKeyDisabler follow.
|
||||
Return<bool> KeyDisabler::isEnabled() {
|
||||
std::string buf;
|
||||
|
||||
if (!mHasKeyDisabler) return false;
|
||||
|
||||
if (!android::base::ReadFileToString(kControlPath, &buf, true)) {
|
||||
LOG(ERROR) << "Failed to read " << kControlPath;
|
||||
return false;
|
||||
}
|
||||
|
||||
return std::stoi(android::base::Trim(buf)) == 1;
|
||||
}
|
||||
|
||||
Return<bool> KeyDisabler::setEnabled(bool enabled) {
|
||||
if (!mHasKeyDisabler) return false;
|
||||
|
||||
if (!android::base::WriteStringToFile((enabled ? "1" : "0"), kControlPath, true)) {
|
||||
LOG(ERROR) << "Failed to write " << kControlPath;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace touch
|
||||
} // namespace lineage
|
||||
} // namespace vendor
|
||||
48
touch/KeyDisabler.h
Normal file
48
touch/KeyDisabler.h
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef VENDOR_LINEAGE_TOUCH_V1_0_KEYDISABLER_H
|
||||
#define VENDOR_LINEAGE_TOUCH_V1_0_KEYDISABLER_H
|
||||
|
||||
#include <vendor/lineage/touch/1.0/IKeyDisabler.h>
|
||||
|
||||
namespace vendor {
|
||||
namespace lineage {
|
||||
namespace touch {
|
||||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
|
||||
using ::android::hardware::Return;
|
||||
|
||||
class KeyDisabler : public IKeyDisabler {
|
||||
public:
|
||||
KeyDisabler();
|
||||
|
||||
// Methods from ::vendor::lineage::touch::V1_0::IKeyDisabler follow.
|
||||
Return<bool> isEnabled() override;
|
||||
Return<bool> setEnabled(bool enabled) override;
|
||||
|
||||
private:
|
||||
bool mHasKeyDisabler;
|
||||
};
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace touch
|
||||
} // namespace lineage
|
||||
} // namespace vendor
|
||||
|
||||
#endif // VENDOR_LINEAGE_TOUCH_V1_0_KEYDISABLER_H
|
||||
62
touch/service.cpp
Normal file
62
touch/service.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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.xiaomi_8953"
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <hidl/HidlTransportSupport.h>
|
||||
|
||||
#include "KeyDisabler.h"
|
||||
|
||||
using android::OK;
|
||||
using android::sp;
|
||||
using android::status_t;
|
||||
using android::hardware::configureRpcThreadpool;
|
||||
using android::hardware::joinRpcThreadpool;
|
||||
|
||||
using ::vendor::lineage::touch::V1_0::IKeyDisabler;
|
||||
using ::vendor::lineage::touch::V1_0::implementation::KeyDisabler;
|
||||
|
||||
int main() {
|
||||
sp<KeyDisabler> keyDisabler;
|
||||
status_t status;
|
||||
|
||||
LOG(INFO) << "Touch HAL service is starting.";
|
||||
|
||||
keyDisabler = new KeyDisabler();
|
||||
if (keyDisabler == nullptr) {
|
||||
LOG(ERROR) << "Can not create an instance of Touch HAL KeyDisabler Iface, exiting.";
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
configureRpcThreadpool(1, true /*callerWillJoin*/);
|
||||
|
||||
status = keyDisabler->registerAsService();
|
||||
if (status != OK) {
|
||||
LOG(ERROR) << "Could not register service for Touch HAL KeyDisabler 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;
|
||||
}
|
||||
4
touch/vendor.lineage.touch@1.0-service.xiaomi_8953.rc
Normal file
4
touch/vendor.lineage.touch@1.0-service.xiaomi_8953.rc
Normal file
@@ -0,0 +1,4 @@
|
||||
service vendor.touch-hal-1-0-xiaomi_8953 /vendor/bin/hw/vendor.lineage.touch@1.0-service.xiaomi_8953
|
||||
class hal
|
||||
user system
|
||||
group system
|
||||
11
touch/vendor.lineage.touch@1.0-service.xiaomi_8953.xml
Normal file
11
touch/vendor.lineage.touch@1.0-service.xiaomi_8953.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<manifest version="1.0" type="device">
|
||||
<hal format="hidl">
|
||||
<name>vendor.lineage.touch</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IKeyDisabler</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</manifest>
|
||||
Reference in New Issue
Block a user