├── system_ext.prop ├── configs ├── hals.conf ├── gps │ ├── gps.conf │ ├── lowi.conf │ └── flp.conf ├── public.libraries.txt ├── media_codecs_vendor_audio.xml ├── privapp-permissions-hotword.xml └── msm_irqbalance.conf ├── sensors ├── .clang-format ├── als_correction_service.rc ├── android.hardware.sensors@2.0-service-multihal.rc ├── android.hardware.sensors@2.0-multihal.xml ├── include │ ├── AlsCorrection.h │ └── AsyncScreenCaptureListener.h └── service.cpp ├── sepolicy ├── vendor │ ├── domain.te │ ├── vendor_time_daemon.te │ ├── priv_app.te │ ├── vendor_sensors.te │ ├── hal_power_stats_default.te │ ├── platform_app.te │ ├── property.te │ ├── hal_bluetooth_default.te │ ├── init.te │ ├── system_server.te │ ├── vendor_wcnss_service.te │ ├── app.te │ ├── vendor_rmt_storage.te │ ├── hal_power_default.te │ ├── radio.te │ ├── hwservice.te │ ├── hal_lineage_touch_default.te │ ├── device.te │ ├── hal_cameraHIDL_default.te │ ├── hal_param.te │ ├── hal_hdcpkey.te │ ├── opf.te │ ├── hal_cameraHIDL.te │ ├── rild.te │ ├── hal_hdcpkey_default.te │ ├── attributes │ ├── kernel.te │ ├── hal_lineage_livedisplay_qti.te │ ├── vendor_qti_init_shell.te │ ├── tri-state-key-calibrate.te │ ├── vl53l1_daemon_main.te │ ├── dashd.te │ ├── hal_graphics_composer_default.te │ ├── hal_ifaa_default.te │ ├── hal_param_default.te │ ├── hal_nfc_default.te │ ├── wifi-mac-generator.te │ ├── file.te │ ├── vendor_init.te │ ├── hal_camera_default.te │ ├── hal_audio_default.te │ ├── hwservice_contexts │ ├── hal_fingerprint_default.te │ └── property_contexts ├── private │ ├── recovery.te │ ├── system_server.te │ ├── file_contexts │ ├── property_contexts │ ├── seapp_contexts │ ├── keyhandler_app.te │ ├── camera_helper_app.te │ └── als_correction_service.te └── public │ ├── als_correction_service.te │ ├── property.te │ └── file.te ├── Android.bp ├── KeyHandler ├── proguard.flags ├── tri-state-key-calibrate.rc ├── tri-state-key-calibrate.sh ├── Android.bp ├── src │ └── org │ │ └── lineageos │ │ └── settings │ │ └── device │ │ ├── BootCompletedReceiver.kt │ │ └── ButtonSettingsActivity.kt └── res │ ├── values │ ├── arrays.xml │ └── strings.xml │ └── xml │ └── button_panel.xml ├── camera_helper ├── proguard.flags ├── Android.mk ├── src │ └── org │ │ └── lineageos │ │ └── camerahelper │ │ └── BootCompletedReceiver.java ├── res │ ├── values │ │ └── strings.xml │ ├── values-in │ │ └── strings.xml │ ├── values-zh-rCN │ │ └── strings.xml │ ├── values-zh-rTW │ │ └── strings.xml │ ├── values-ja │ │ └── strings.xml │ ├── values-ko │ │ └── strings.xml │ ├── values-th │ │ └── strings.xml │ ├── values-ast-rES │ │ └── strings.xml │ ├── values-fi │ │ └── strings.xml │ ├── values-ar │ │ └── strings.xml │ ├── values-cy │ │ └── strings.xml │ ├── values-ka │ │ └── strings.xml │ ├── values-pl │ │ └── strings.xml │ ├── values-tr │ │ └── strings.xml │ ├── values-fr │ │ └── strings.xml │ ├── values-fy-rNL │ │ └── strings.xml │ ├── values-gl │ │ └── strings.xml │ ├── values-et │ │ └── strings.xml │ ├── values-az │ │ └── strings.xml │ ├── values-sq │ │ └── strings.xml │ ├── values-bg │ │ └── strings.xml │ ├── values-ca │ │ └── strings.xml │ ├── values-en-rAU │ │ └── strings.xml │ ├── values-en-rCA │ │ └── strings.xml │ ├── values-en-rGB │ │ └── strings.xml │ ├── values-en-rIN │ │ └── strings.xml │ ├── values-sl │ │ └── strings.xml │ ├── values-es │ │ └── strings.xml │ ├── values-nl │ │ └── strings.xml │ ├── values-cs │ │ └── strings.xml │ ├── values-pt-rPT │ │ └── strings.xml │ ├── values-pt-rBR │ │ └── strings.xml │ ├── values-ro │ │ └── strings.xml │ ├── values-ru │ │ └── strings.xml │ ├── values-sk │ │ └── strings.xml │ ├── values-de │ │ └── strings.xml │ ├── values-it │ │ └── strings.xml │ ├── values-hu │ │ └── strings.xml │ ├── values-el │ │ └── strings.xml │ └── values-gd │ │ └── strings.xml └── AndroidManifest.xml ├── wifi ├── p2p_supplicant_overlay.conf └── wpa_supplicant_overlay.conf ├── oneplus-fwk ├── Android.bp └── src │ └── android │ ├── os │ └── OPDiagnoseManager.java │ └── util │ └── OpFeatures.java ├── interfaces ├── oneplus │ ├── fingerprint │ │ └── extension │ │ │ └── 1.0 │ │ │ ├── types.hal │ │ │ ├── IVendorFingerprintExtensionsCallback.hal │ │ │ ├── Android.bp │ │ │ └── IVendorFingerprintExtensions.hal │ └── hardware │ │ ├── drmkey │ │ └── 1.0 │ │ │ ├── IOneplusDrmKey.hal │ │ │ └── Android.bp │ │ └── camera │ │ └── 1.0 │ │ ├── Android.bp │ │ └── IOnePlusCameraProvider.hal ├── Android.bp ├── goodix │ └── hardware │ │ └── biometrics │ │ └── fingerprint │ │ └── 2.1 │ │ ├── IGoodixFingerprintDaemonCallback.hal │ │ ├── IGoodixFingerprintDaemon.hal │ │ └── Android.bp └── update-makefiles.sh ├── wifi-mac-generator ├── Android.bp ├── wifi-mac-generator.rc └── wifi-mac-generator.sh ├── rootdir ├── etc │ ├── init.oem_ftm.rc │ ├── init.recovery.qcom.rc │ ├── vendor.oem_ftm.rc │ ├── init.qti.ufs.rc │ └── vendor.oem_ftm_svc_disable.rc └── bin │ ├── init.qti.qcv.sh │ ├── init.mdm.sh │ ├── init.qcom.efs.sync.sh │ ├── init.crda.sh │ └── init.qcom.sensors.sh ├── rro_overlays └── WifiResCommon │ ├── Android.bp │ ├── res │ └── values │ │ ├── integers.xml │ │ └── strings.xml │ └── AndroidManifest.xml ├── product.prop ├── vibrator ├── vendor.qti.hardware.vibrator.service.oneplus.rc ├── Android.bp └── vendor.qti.hardware.vibrator.service.oneplus.xml ├── doze ├── proguard.flags ├── Android.bp ├── res │ └── values │ │ ├── config.xml │ │ └── arrays.xml └── src │ └── org │ └── lineageos │ └── settings │ └── doze │ ├── BootCompletedReceiver.kt │ ├── DozeSettingsActivity.kt │ └── PocketSensor.kt ├── livedisplay ├── .clang-format ├── vendor.lineage.livedisplay@2.1-service.oneplus_msmnile.xml ├── vendor.lineage.livedisplay@2.1-service.oneplus_msmnile.rc ├── include │ └── livedisplay │ │ └── oneplus │ │ ├── AntiFlicker.h │ │ └── SunlightEnhancement.h ├── AntiFlicker.cpp ├── SunlightEnhancement.cpp ├── DisplayModes.h └── Android.bp ├── touch ├── lineage.touch@1.0-service.oneplus.xml ├── vendor.lineage.touch@1.0-service.oneplus.xml ├── lineage.touch@1.0-service.oneplus.rc ├── vendor.lineage.touch@1.0-service.oneplus.rc ├── service.cpp ├── include │ └── touch │ │ └── oneplus │ │ ├── TouchscreenGestureConfig.h │ │ └── TouchscreenGesture.h ├── TouchscreenGesture.cpp └── Android.bp ├── aosp.dependencies ├── seccomp └── mediacodec.policy ├── fingerprint ├── android.hardware.biometrics.fingerprint@2.3-service.oneplus.xml ├── android.hardware.biometrics.fingerprint@2.3-service.oneplus.rc ├── Android.bp ├── UdfpsExtension.cpp ├── properties.cpp └── service.cpp ├── overlay ├── packages │ ├── apps │ │ └── Settings │ │ │ └── res │ │ │ └── values │ │ │ └── dimens.xml │ └── services │ │ └── Telephony │ │ └── res │ │ └── values │ │ └── config.xml └── frameworks │ └── base │ └── packages │ └── SystemUI │ └── res │ └── values │ └── config.xml ├── bootctrl └── Android.bp ├── gpt-utils └── Android.bp ├── shims ├── Android.bp └── libril_shim.cpp ├── audio └── bluetooth_hearing_aid_audio_policy_configuration.xml ├── init └── Android.bp ├── bluetooth └── include │ └── bdroid_buildcfg.h ├── overlay-aosp ├── frameworks │ └── base │ │ └── packages │ │ └── SystemUI │ │ └── res │ │ └── values │ │ └── config.xml └── packages │ └── apps │ └── Settings │ └── res │ └── values │ └── config.xml ├── setup-makefiles.sh ├── system.prop ├── keylayout ├── gpio-keys.kl └── gf_input.kl └── odm.prop /system_ext.prop: -------------------------------------------------------------------------------- 1 | persist.vendor.dpm.feature=11 2 | -------------------------------------------------------------------------------- /configs/hals.conf: -------------------------------------------------------------------------------- 1 | sensors.oneplus.so 2 | sensors.ssc.so -------------------------------------------------------------------------------- /sensors/.clang-format: -------------------------------------------------------------------------------- 1 | ../../../build/soong/scripts/system-clang-format -------------------------------------------------------------------------------- /sepolicy/vendor/domain.te: -------------------------------------------------------------------------------- 1 | allow domain opf_file:file r_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/private/recovery.te: -------------------------------------------------------------------------------- 1 | get_prop(recovery, fastbootd_available_prop) 2 | -------------------------------------------------------------------------------- /Android.bp: -------------------------------------------------------------------------------- 1 | soong_namespace { 2 | imports: ["hardware/qcom-caf/bootctrl"], 3 | } 4 | -------------------------------------------------------------------------------- /KeyHandler/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class org.lineageos.settings.device.* { 2 | *; 3 | } 4 | -------------------------------------------------------------------------------- /camera_helper/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class org.lineageos.camerahelper.* { 2 | *; 3 | } 4 | -------------------------------------------------------------------------------- /sepolicy/public/als_correction_service.te: -------------------------------------------------------------------------------- 1 | type als_correction_service, domain, coredomain; 2 | -------------------------------------------------------------------------------- /sepolicy/private/system_server.te: -------------------------------------------------------------------------------- 1 | allow system_server sysfs_motor:file { w_file_perms getattr }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_time_daemon.te: -------------------------------------------------------------------------------- 1 | allow vendor_time_daemon self:capability { setgid setuid }; 2 | -------------------------------------------------------------------------------- /configs/gps/gps.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PixelExperience-Devices/device_oneplus_sm8150-common/HEAD/configs/gps/gps.conf -------------------------------------------------------------------------------- /sepolicy/public/property.te: -------------------------------------------------------------------------------- 1 | system_internal_prop(fastbootd_available_prop) 2 | system_public_prop(vendor_sensors_als_prop) 3 | -------------------------------------------------------------------------------- /sepolicy/private/file_contexts: -------------------------------------------------------------------------------- 1 | # Binaries 2 | /system/bin/als_correction_service u:object_r:als_correction_service_exec:s0 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/priv_app.te: -------------------------------------------------------------------------------- 1 | allow priv_app hal_ifaa_hwservice:hwservice_manager find; 2 | binder_call(priv_app, hal_ifaa_default) 3 | -------------------------------------------------------------------------------- /wifi/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_no_group_iface=1 3 | persistent_reconnect=1 4 | bss_max_count=400 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_sensors.te: -------------------------------------------------------------------------------- 1 | # Allow vendor_sensors to get vendor_sensors_prop 2 | get_prop(vendor_sensors, vendor_sensors_prop) 3 | -------------------------------------------------------------------------------- /sepolicy/public/file.te: -------------------------------------------------------------------------------- 1 | # persist 2 | type persist_engineer_file, file_type; 3 | 4 | # sysfs 5 | type sysfs_motor, sysfs_type, fs_type; 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_power_stats_default.te: -------------------------------------------------------------------------------- 1 | allow hal_power_stats_default sysfs:dir open; 2 | allow hal_power_stats_default sysfs:dir read; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/platform_app.te: -------------------------------------------------------------------------------- 1 | allow platform_app hal_ifaa_hwservice:hwservice_manager find; 2 | binder_call(platform_app, hal_ifaa_default) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/property.te: -------------------------------------------------------------------------------- 1 | vendor_internal_prop(vendor_memplus_prop) 2 | vendor_internal_prop(vendor_nfc_prop) 3 | vendor_internal_prop(vendor_oem_dump_prop) 4 | -------------------------------------------------------------------------------- /oneplus-fwk/Android.bp: -------------------------------------------------------------------------------- 1 | java_library { 2 | name: "oneplus-fwk", 3 | installable: true, 4 | 5 | srcs: [ 6 | "src/**/*.java", 7 | ], 8 | } 9 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_bluetooth_default.te: -------------------------------------------------------------------------------- 1 | # Allow hal_bluetooth_default to read files in vendor_data_file 2 | r_dir_file(hal_bluetooth_default, vendor_data_file) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/init.te: -------------------------------------------------------------------------------- 1 | # Allow init to create vl53l1_socket 2 | allow init vl53l1_socket:sock_file create_file_perms; 3 | 4 | allow init adsprpcd_file:file mounton; -------------------------------------------------------------------------------- /sepolicy/vendor/system_server.te: -------------------------------------------------------------------------------- 1 | # Allow system_server to read Fast Charging status 2 | allow system_server vendor_sysfs_battery_supply:file { getattr open read }; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_wcnss_service.te: -------------------------------------------------------------------------------- 1 | # Allow vendor_wcnss_service to read files in sysfs_project_info 2 | r_dir_file(vendor_wcnss_service, sysfs_project_info) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/app.te: -------------------------------------------------------------------------------- 1 | allow { appdomain -isolated_app } adsprpcd_file:dir r_dir_perms; 2 | allow { appdomain -isolated_app } public_adsprpcd_file:file r_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_rmt_storage.te: -------------------------------------------------------------------------------- 1 | # Allow vendor_rmt_storage to read and write to oem_block_device 2 | allow vendor_rmt_storage oem_block_device:blk_file rw_file_perms; 3 | -------------------------------------------------------------------------------- /interfaces/oneplus/fingerprint/extension/1.0/types.hal: -------------------------------------------------------------------------------- 1 | package vendor.oneplus.fingerprint.extension@1.0; 2 | 3 | struct FpTest { 4 | string name; 5 | int32_t cmdId; 6 | }; 7 | -------------------------------------------------------------------------------- /wifi-mac-generator/Android.bp: -------------------------------------------------------------------------------- 1 | sh_binary { 2 | name: "wifi-mac-generator", 3 | init_rc: ["wifi-mac-generator.rc"], 4 | src: "wifi-mac-generator.sh", 5 | vendor: true, 6 | } 7 | -------------------------------------------------------------------------------- /rootdir/etc/init.oem_ftm.rc: -------------------------------------------------------------------------------- 1 | #factory load rc 2 | 3 | import /vendor/etc/init/hw/vendor.oem_ftm_svc_disable.rc 4 | import /system/etc/init/hw/init.rc 5 | import /vendor/etc/init/hw/vendor.oem_ftm.rc 6 | -------------------------------------------------------------------------------- /rro_overlays/WifiResCommon/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "WifiResCommon", 3 | theme: "WifiResCommon", 4 | sdk_version: "current", 5 | product_specific: true 6 | } 7 | -------------------------------------------------------------------------------- /product.prop: -------------------------------------------------------------------------------- 1 | # Audio 2 | audio.sys.noisy.broadcast.delay=500 3 | audio.sys.mute.latency.factor=2 4 | audio.sys.routing.latency=0 5 | audio.offload.min.duration.secs=30 6 | audio.sys.offload.pstimeout.secs=3 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_power_default.te: -------------------------------------------------------------------------------- 1 | # Allow hal_power_default to write to proc_touchpanel 2 | allow hal_power_default proc_touchpanel:dir search; 3 | allow hal_power_default proc_touchpanel:file w_file_perms; 4 | -------------------------------------------------------------------------------- /vibrator/vendor.qti.hardware.vibrator.service.oneplus.rc: -------------------------------------------------------------------------------- 1 | service vendor.qti.vibrator /vendor/bin/hw/vendor.qti.hardware.vibrator.service.oneplus 2 | class hal 3 | user system 4 | group system input 5 | -------------------------------------------------------------------------------- /sensors/als_correction_service.rc: -------------------------------------------------------------------------------- 1 | service als_correction_service /system_ext/bin/als_correction_service 2 | class hal 3 | user system 4 | group system 5 | writepid /dev/cpuset/system-background/tasks 6 | -------------------------------------------------------------------------------- /sepolicy/private/property_contexts: -------------------------------------------------------------------------------- 1 | # Fastbootd 2 | ro.fastbootd.available u:object_r:fastbootd_available_prop:s0 3 | 4 | # Sensors 5 | vendor.sensors.als_correction. u:object_r:vendor_sensors_als_prop:s0 6 | -------------------------------------------------------------------------------- /configs/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libnpu.so 2 | libhta_hexagon_runtime.so 3 | libqti-perfd-client.so 4 | libadsprpc.so 5 | libcdsprpc.so 6 | libsdsprpc.so 7 | libfastcvopt.so 8 | liblistensoundmodel2.so 9 | libOpenCL.so 10 | -------------------------------------------------------------------------------- /rootdir/etc/init.recovery.qcom.rc: -------------------------------------------------------------------------------- 1 | on fs 2 | wait /dev/block/platform/soc/${ro.boot.bootdevice} 3 | symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice 4 | 5 | on init 6 | setprop sys.usb.configfs 1 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/radio.te: -------------------------------------------------------------------------------- 1 | binder_call(radio, vendor_cnd) 2 | 3 | allow radio vendor_hal_datafactory_hwservice:hwservice_manager find; 4 | allow radio vendor_hal_iwlan_hwservice:hwservice_manager find; 5 | 6 | get_prop(radio, vendor_ims_prop) 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice.te: -------------------------------------------------------------------------------- 1 | type hal_cameraHIDL_hwservice, hwservice_manager_type; 2 | type hal_hdcpkey_hwservice, hwservice_manager_type; 3 | type hal_ifaa_hwservice, hwservice_manager_type; 4 | type hal_param_hwservice, hwservice_manager_type; 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_lineage_touch_default.te: -------------------------------------------------------------------------------- 1 | # Allow hal_lineage_touch_default to read and write to proc_touchpanel 2 | allow hal_lineage_touch_default proc_touchpanel:dir search; 3 | allow hal_lineage_touch_default proc_touchpanel:file rw_file_perms; 4 | -------------------------------------------------------------------------------- /sepolicy/private/seapp_contexts: -------------------------------------------------------------------------------- 1 | user=system seinfo=platform name=org.lineageos.camerahelper domain=camera_helper_app type=system_app_data_file 2 | user=system seinfo=platform name=org.lineageos.settings.device domain=keyhandler_app type=system_app_data_file 3 | -------------------------------------------------------------------------------- /doze/proguard.flags: -------------------------------------------------------------------------------- 1 | -keepclasseswithmembers class * { 2 | public (android.content.Context, android.util.AttributeSet); 3 | } 4 | 5 | -keep class ** extends androidx.preference.PreferenceFragment 6 | -keep class org.lineageos.settings.doze.* { 7 | *; 8 | } 9 | -------------------------------------------------------------------------------- /interfaces/oneplus/fingerprint/extension/1.0/IVendorFingerprintExtensionsCallback.hal: -------------------------------------------------------------------------------- 1 | package vendor.oneplus.fingerprint.extension@1.0; 2 | 3 | interface IVendorFingerprintExtensionsCallback { 4 | oneway onResult(int32_t cmdId, int32_t result, string info); 5 | }; 6 | -------------------------------------------------------------------------------- /wifi-mac-generator/wifi-mac-generator.rc: -------------------------------------------------------------------------------- 1 | service vendor.wifi-mac-generator /vendor/bin/wifi-mac-generator 2 | class main 3 | user wifi 4 | group wifi 5 | oneshot 6 | disabled 7 | 8 | on post-fs-data 9 | start vendor.wifi-mac-generator 10 | -------------------------------------------------------------------------------- /sepolicy/vendor/device.te: -------------------------------------------------------------------------------- 1 | type dash_device, dev_type; 2 | type fingerprintd_device, dev_type; 3 | type oem_block_device, dev_type; 4 | type param_block_device, dev_type; 5 | type param_device, dev_type; 6 | type ultrasound_device, dev_type; 7 | type vl53l1_device, dev_type; 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_cameraHIDL_default.te: -------------------------------------------------------------------------------- 1 | type hal_cameraHIDL_default, domain; 2 | hal_server_domain(hal_cameraHIDL_default, hal_cameraHIDL) 3 | 4 | type hal_cameraHIDL_default_exec, exec_type, vendor_file_type, file_type; 5 | init_daemon_domain(hal_cameraHIDL_default) 6 | -------------------------------------------------------------------------------- /interfaces/Android.bp: -------------------------------------------------------------------------------- 1 | hidl_package_root { 2 | name: "vendor.goodix", 3 | path: "device/oneplus/sm8150-common/interfaces/goodix", 4 | } 5 | 6 | hidl_package_root { 7 | name: "vendor.oneplus", 8 | path: "device/oneplus/sm8150-common/interfaces/oneplus", 9 | } 10 | -------------------------------------------------------------------------------- /KeyHandler/tri-state-key-calibrate.rc: -------------------------------------------------------------------------------- 1 | service vendor.tri-state-key-calibrate /vendor/bin/tri-state-key-calibrate 2 | class main 3 | user system 4 | group system 5 | oneshot 6 | disabled 7 | 8 | on post-fs-data 9 | start vendor.tri-state-key-calibrate 10 | -------------------------------------------------------------------------------- /rro_overlays/WifiResCommon/res/values/integers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 32 5 | 6 | -------------------------------------------------------------------------------- /wifi/wpa_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_disabled=1 3 | tdls_external_control=1 4 | wowlan_triggers=magic_pkt 5 | bss_max_count=400 6 | interworking=1 7 | config_methods=virtual_display virtual_push_button keypad 8 | driver_param="no_rrm=1 use_p2p_group_interface=1" 9 | -------------------------------------------------------------------------------- /interfaces/goodix/hardware/biometrics/fingerprint/2.1/IGoodixFingerprintDaemonCallback.hal: -------------------------------------------------------------------------------- 1 | package vendor.goodix.hardware.biometrics.fingerprint@2.1; 2 | 3 | interface IGoodixFingerprintDaemonCallback { 4 | onDaemonMessage(int64_t devId, int32_t msgId, int32_t cmdId, vec msgData); 5 | }; 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_param.te: -------------------------------------------------------------------------------- 1 | # HwBinder IPC from client to server, and callbacks 2 | binder_call(hal_param_client, hal_param_server) 3 | binder_call(hal_param_server, hal_param_client) 4 | 5 | add_hwservice(hal_param_server, hal_param_hwservice) 6 | allow hal_param_client hal_param_hwservice:hwservice_manager find; 7 | -------------------------------------------------------------------------------- /livedisplay/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: Google 2 | AccessModifierOffset: -2 3 | AllowShortFunctionsOnASingleLine: Inline 4 | ColumnLimit: 100 5 | CommentPragmas: NOLINT:.* 6 | DerivePointerAlignment: false 7 | IndentWidth: 4 8 | PointerAlignment: Left 9 | TabWidth: 4 10 | UseTab: Never 11 | PenaltyExcessCharacter: 32 12 | -------------------------------------------------------------------------------- /interfaces/update-makefiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source $ANDROID_BUILD_TOP/system/tools/hidl/update-makefiles-helper.sh 4 | 5 | do_makefiles_update \ 6 | "vendor.goodix:device/oneplus/sm8150-common/interfaces/goodix" 7 | 8 | do_makefiles_update \ 9 | "vendor.oneplus:device/oneplus/sm8150-common/interfaces/oneplus" 10 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_hdcpkey.te: -------------------------------------------------------------------------------- 1 | # HwBinder IPC from client to server, and callbacks 2 | binder_call(hal_hdcpkey_client, hal_hdcpkey_server) 3 | binder_call(hal_hdcpkey_server, hal_hdcpkey_client) 4 | 5 | add_hwservice(hal_hdcpkey_server, hal_hdcpkey_hwservice) 6 | allow hal_hdcpkey_client hal_hdcpkey_hwservice:hwservice_manager find; 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/opf.te: -------------------------------------------------------------------------------- 1 | type opf, domain; 2 | type opf_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(opf) 5 | 6 | type_transition opf device:file opf_file; 7 | 8 | allow opf device:dir create_dir_perms; 9 | allow opf device:file create_file_perms; 10 | 11 | allow opf opf_file:file create_file_perms; 12 | -------------------------------------------------------------------------------- /interfaces/oneplus/hardware/drmkey/1.0/IOneplusDrmKey.hal: -------------------------------------------------------------------------------- 1 | package vendor.oneplus.hardware.drmkey@1.0; 2 | 3 | interface IOneplusDrmKey { 4 | installKeybox(string keybox) generates (int32_t status); 5 | verifyKeybox() generates (int32_t status); 6 | sendCommand(string command, string value) generates (int32_t status, string value); 7 | }; 8 | -------------------------------------------------------------------------------- /sensors/android.hardware.sensors@2.0-service-multihal.rc: -------------------------------------------------------------------------------- 1 | service vendor.sensors-hal-2-0-multihal /vendor/bin/hw/android.hardware.sensors@2.0-service.multihal 2 | class hal 3 | user system 4 | group system wakelock context_hub input 5 | writepid /dev/cpuset/system-background/tasks 6 | capabilities BLOCK_SUSPEND 7 | rlimit rtprio 10 10 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_cameraHIDL.te: -------------------------------------------------------------------------------- 1 | # HwBinder IPC from client to server, and callbacks 2 | binder_call(hal_cameraHIDL_client, hal_cameraHIDL_server) 3 | binder_call(hal_cameraHIDL_server, hal_cameraHIDL_client) 4 | 5 | add_hwservice(hal_cameraHIDL_server, hal_cameraHIDL_hwservice) 6 | allow hal_cameraHIDL_client hal_cameraHIDL_hwservice:hwservice_manager find; 7 | -------------------------------------------------------------------------------- /KeyHandler/tri-state-key-calibrate.sh: -------------------------------------------------------------------------------- 1 | #!/vendor/bin/sh 2 | if [[ -f /mnt/vendor/persist/engineermode/tri_state_hall_data ]]; then 3 | CALIBRATION_DATA="$(cat /mnt/vendor/persist/engineermode/tri_state_hall_data)" 4 | CALIBRATION_DATA="${CALIBRATION_DATA//;/,}" 5 | echo -n $CALIBRATION_DATA > /sys/devices/platform/soc/soc:tri_state_key/hall_data_calib 6 | fi 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/rild.te: -------------------------------------------------------------------------------- 1 | # Allow rild to read, write and create files in vendor_data_file 2 | allow rild vendor_data_file:dir rw_dir_perms; 3 | allow rild vendor_data_file:file create_file_perms; 4 | 5 | # Allow rild to read, write and create files in wifi_nv_data_file 6 | allow rild wifi_nv_data_file:dir rw_dir_perms; 7 | allow rild wifi_nv_data_file:file create_file_perms; 8 | 9 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_hdcpkey_default.te: -------------------------------------------------------------------------------- 1 | type hal_hdcpkey_default, domain; 2 | hal_server_domain(hal_hdcpkey_default, hal_hdcpkey) 3 | 4 | type hal_hdcpkey_default_exec, exec_type, vendor_file_type, file_type; 5 | init_daemon_domain(hal_hdcpkey_default) 6 | 7 | # Allow hal_hdcpkey_default to read and write to param_block_device 8 | allow hal_hdcpkey_default param_block_device:blk_file rw_file_perms; 9 | -------------------------------------------------------------------------------- /sensors/android.hardware.sensors@2.0-multihal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.hardware.sensors 4 | hwbinder 5 | 2.0 6 | 7 | ISensors 8 | default 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /touch/lineage.touch@1.0-service.oneplus.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | vendor.lineage.touch 4 | hwbinder 5 | 1.0 6 | 7 | ITouchscreenGesture 8 | default 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /interfaces/oneplus/hardware/drmkey/1.0/Android.bp: -------------------------------------------------------------------------------- 1 | // This file is autogenerated by hidl-gen -Landroidbp. 2 | 3 | hidl_interface { 4 | name: "vendor.oneplus.hardware.drmkey@1.0", 5 | root: "vendor.oneplus", 6 | system_ext_specific: true, 7 | srcs: [ 8 | "IOneplusDrmKey.hal", 9 | ], 10 | interfaces: [ 11 | "android.hidl.base@1.0", 12 | ], 13 | gen_java: true, 14 | } 15 | -------------------------------------------------------------------------------- /touch/vendor.lineage.touch@1.0-service.oneplus.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | vendor.lineage.touch 4 | hwbinder 5 | 1.0 6 | 7 | ITouchscreenGesture 8 | default 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /interfaces/oneplus/hardware/camera/1.0/Android.bp: -------------------------------------------------------------------------------- 1 | // This file is autogenerated by hidl-gen -Landroidbp. 2 | 3 | hidl_interface { 4 | name: "vendor.oneplus.hardware.camera@1.0", 5 | root: "vendor.oneplus", 6 | system_ext_specific: true, 7 | srcs: [ 8 | "IOnePlusCameraProvider.hal", 9 | ], 10 | interfaces: [ 11 | "android.hidl.base@1.0", 12 | ], 13 | gen_java: true, 14 | } 15 | -------------------------------------------------------------------------------- /rro_overlays/WifiResCommon/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /aosp.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository" : "kernel_oneplus_sm8150", 4 | "target_path" : "kernel/oneplus/sm8150", 5 | "branch" : "fourteen", 6 | "remote" : "pixel-devices" 7 | }, 8 | { 9 | "repository" : "vendor_oneplus_sm8150-common", 10 | "target_path" : "vendor/oneplus/sm8150-common", 11 | "branch" : "fourteen", 12 | "remote" : "pixel-devices-blobs" 13 | } 14 | ] -------------------------------------------------------------------------------- /configs/media_codecs_vendor_audio.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sepolicy/vendor/attributes: -------------------------------------------------------------------------------- 1 | # HALs 2 | attribute hal_cameraHIDL; 3 | attribute hal_cameraHIDL_client; 4 | attribute hal_cameraHIDL_server; 5 | 6 | attribute hal_hdcpkey; 7 | attribute hal_hdcpkey_client; 8 | attribute hal_hdcpkey_server; 9 | 10 | attribute hal_ifaa; 11 | attribute hal_ifaa_client; 12 | attribute hal_ifaa_server; 13 | 14 | attribute hal_param; 15 | attribute hal_param_client; 16 | attribute hal_param_server; 17 | -------------------------------------------------------------------------------- /interfaces/goodix/hardware/biometrics/fingerprint/2.1/IGoodixFingerprintDaemon.hal: -------------------------------------------------------------------------------- 1 | package vendor.goodix.hardware.biometrics.fingerprint@2.1; 2 | 3 | import vendor.goodix.hardware.biometrics.fingerprint@2.1::IGoodixFingerprintDaemonCallback; 4 | 5 | interface IGoodixFingerprintDaemon { 6 | setNotify(IGoodixFingerprintDaemonCallback Callback); 7 | sendCommand(int32_t cmd, vec data) generates (int32_t resultCode, vec data); 8 | }; 9 | -------------------------------------------------------------------------------- /seccomp/mediacodec.policy: -------------------------------------------------------------------------------- 1 | # device specific syscalls 2 | # extension of services/mediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy 3 | pselect6: 1 4 | eventfd2: 1 5 | sendto: 1 6 | recvfrom: 1 7 | _llseek: 1 8 | sysinfo: 1 9 | getcwd: 1 10 | getdents64: 1 11 | ARM_cacheflush: 1 12 | inotify_init1: 1 13 | inotify_add_watch: 1 14 | inotify_rm_watch: 1 15 | uname: 1 16 | ueventd: 1 17 | timer_create: 1 18 | timer_settime: 1 19 | rt_sigtimedwait: 1 20 | -------------------------------------------------------------------------------- /fingerprint/android.hardware.biometrics.fingerprint@2.3-service.oneplus.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.hardware.biometrics.fingerprint 4 | hwbinder 5 | 2.3 6 | 7 | IBiometricsFingerprint 8 | default 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 8dp 11 | 80% 12 | 13 | -------------------------------------------------------------------------------- /sepolicy/vendor/kernel.te: -------------------------------------------------------------------------------- 1 | allow kernel self:system syslog_read; 2 | 3 | # Allow kernel to read kmsg_device 4 | allow kernel kmsg_device:chr_file r_file_perms; 5 | 6 | # Allow kernel to search in block_device 7 | allow kernel block_device:dir search; 8 | 9 | # Allow kernel to read and write to oem_block_device 10 | allow kernel oem_block_device:blk_file rw_file_perms; 11 | 12 | # Allow kernel to read and write to param_block_device 13 | allow kernel param_block_device:blk_file rw_file_perms; 14 | -------------------------------------------------------------------------------- /interfaces/goodix/hardware/biometrics/fingerprint/2.1/Android.bp: -------------------------------------------------------------------------------- 1 | // This file is autogenerated by hidl-gen -Landroidbp. 2 | 3 | hidl_interface { 4 | name: "vendor.goodix.hardware.biometrics.fingerprint@2.1", 5 | root: "vendor.goodix", 6 | system_ext_specific: true, 7 | srcs: [ 8 | "IGoodixFingerprintDaemon.hal", 9 | "IGoodixFingerprintDaemonCallback.hal", 10 | ], 11 | interfaces: [ 12 | "android.hidl.base@1.0", 13 | ], 14 | gen_java: true, 15 | } 16 | -------------------------------------------------------------------------------- /interfaces/oneplus/fingerprint/extension/1.0/Android.bp: -------------------------------------------------------------------------------- 1 | // This file is autogenerated by hidl-gen -Landroidbp. 2 | 3 | hidl_interface { 4 | name: "vendor.oneplus.fingerprint.extension@1.0", 5 | root: "vendor.oneplus", 6 | system_ext_specific: true, 7 | srcs: [ 8 | "types.hal", 9 | "IVendorFingerprintExtensions.hal", 10 | "IVendorFingerprintExtensionsCallback.hal", 11 | ], 12 | interfaces: [ 13 | "android.hidl.base@1.0", 14 | ], 15 | gen_java: true, 16 | } 17 | -------------------------------------------------------------------------------- /camera_helper/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE_TAGS := optional 6 | 7 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 8 | 9 | LOCAL_PACKAGE_NAME := OnePlusCameraHelper 10 | LOCAL_CERTIFICATE := platform 11 | LOCAL_PRIVATE_PLATFORM_APIS := true 12 | LOCAL_PRIVILEGED_MODULE := true 13 | 14 | LOCAL_USE_AAPT2 := true 15 | 16 | LOCAL_RESOURCE_DIR := \ 17 | $(LOCAL_PATH)/res 18 | 19 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags 20 | 21 | include $(BUILD_PACKAGE) 22 | -------------------------------------------------------------------------------- /sepolicy/private/keyhandler_app.te: -------------------------------------------------------------------------------- 1 | type keyhandler_app, domain; 2 | 3 | app_domain(keyhandler_app) 4 | 5 | allow keyhandler_app self:netlink_kobject_uevent_socket { read bind setopt create }; 6 | 7 | # Allow keyhandler_app to find app_api_service 8 | allow keyhandler_app app_api_service:service_manager find; 9 | 10 | # Allow keyhandler_app read and write /data/data subdirectory 11 | allow keyhandler_app system_app_data_file:dir create_dir_perms; 12 | allow keyhandler_app system_app_data_file:{ file lnk_file } create_file_perms; 13 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_lineage_livedisplay_qti.te: -------------------------------------------------------------------------------- 1 | # Allow hal_lineage_livedisplay_qti to write to DisplayMode nodes 2 | allow hal_lineage_livedisplay_qti vendor_sysfs_graphics:dir r_dir_perms; 3 | allow hal_lineage_livedisplay_qti sysfs_livedisplay_tuneable:file rw_file_perms; 4 | 5 | # Allow hal_lineage_livedisplay_qti to store files under /data/vendor/display and access them 6 | allow hal_lineage_livedisplay_qti vendor_display_vendor_data_file:dir rw_dir_perms; 7 | allow hal_lineage_livedisplay_qti vendor_display_vendor_data_file:file create_file_perms; 8 | -------------------------------------------------------------------------------- /doze/Android.bp: -------------------------------------------------------------------------------- 1 | android_app { 2 | name: "OnePlusDoze", 3 | defaults: ["SettingsLibDefaults"], 4 | 5 | srcs: ["src/**/*.kt"], 6 | resource_dirs: ["res"], 7 | 8 | certificate: "platform", 9 | platform_apis: true, 10 | system_ext_specific: true, 11 | 12 | static_libs: [ 13 | "androidx.core_core", 14 | "androidx.preference_preference", 15 | "org.pixelexperience.settings.resources", 16 | ], 17 | 18 | optimize: { 19 | proguard_flags_files: ["proguard.flags"], 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_qti_init_shell.te: -------------------------------------------------------------------------------- 1 | # Allow vendor_qti_init_shell to write to sysfs_fsc 2 | allow vendor_qti_init_shell sysfs_fsc:file w_file_perms; 3 | 4 | # Allow vendor_qti_init_shell to write to vendor_sysfs_scsi_host 5 | allow vendor_qti_init_shell vendor_sysfs_scsi_host:file w_file_perms; 6 | 7 | # Allow vendor_qti_init_shell to get vendor_memplus_prop 8 | get_prop(vendor_qti_init_shell, vendor_memplus_prop) 9 | 10 | # Allow vendor_qti_init_shell to get vendor_oem_dump_prop 11 | set_prop(vendor_qti_init_shell, vendor_oem_dump_prop) 12 | -------------------------------------------------------------------------------- /bootctrl/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2018 The Android Open Source Project 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | 6 | cc_library { 7 | name: "bootctrl.msmnile", 8 | defaults: ["bootctrl_hal_defaults"], 9 | static_libs: ["libgptutils.oneplus_msmnile"], 10 | } 11 | 12 | cc_library_shared { 13 | name: "android.hardware.boot@1.2-impl-qti", 14 | stem: "android.hardware.boot@1.0-impl-1.2-qti", 15 | defaults: ["android.hardware.boot@1.2-impl-qti_defaults"], 16 | static_libs: ["libgptutils.oneplus_msmnile"], 17 | } 18 | -------------------------------------------------------------------------------- /rro_overlays/WifiResCommon/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /sepolicy/vendor/tri-state-key-calibrate.te: -------------------------------------------------------------------------------- 1 | type tri-state-key-calibrate, domain; 2 | type tri-state-key-calibrate_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(tri-state-key-calibrate) 5 | 6 | allow tri-state-key-calibrate vendor_shell_exec:file rx_file_perms; 7 | allow tri-state-key-calibrate vendor_toolbox_exec:file rx_file_perms; 8 | 9 | allow tri-state-key-calibrate sysfs_tri_state_key:file w_file_perms; 10 | 11 | allow tri-state-key-calibrate mnt_vendor_file:dir search; 12 | 13 | r_dir_file(tri-state-key-calibrate, persist_engineer_file) 14 | -------------------------------------------------------------------------------- /sepolicy/vendor/vl53l1_daemon_main.te: -------------------------------------------------------------------------------- 1 | type vl53l1_daemon_main, domain; 2 | type vl53l1_daemon_main_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(vl53l1_daemon_main) 5 | 6 | allow vl53l1_daemon_main self:{ 7 | netlink_generic_socket 8 | netlink_iscsi_socket 9 | netlink_kobject_uevent_socket 10 | netlink_socket 11 | } create_socket_perms_no_ioctl; 12 | 13 | # Allow vl53l1_daemon_main to read and write to sysfs_vl53l1 14 | allow vl53l1_daemon_main sysfs_vl53l1:dir search; 15 | allow vl53l1_daemon_main sysfs_vl53l1:file rw_file_perms; 16 | -------------------------------------------------------------------------------- /doze/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | oneplus.sensor.op_motion_detect 9 | 10 | 11 | 12 | 1.0 13 | 0.0 14 | 15 | -------------------------------------------------------------------------------- /sepolicy/vendor/dashd.te: -------------------------------------------------------------------------------- 1 | type dashd, domain; 2 | type dashd_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(dashd) 5 | 6 | # Allow dashd to read and write to dash_device 7 | allow dashd dash_device:chr_file rw_file_perms; 8 | 9 | # Allow dashd to read and write to kmsg_device 10 | allow dashd kmsg_device:chr_file rw_file_perms; 11 | 12 | # Allow dashd to read files in vendor_sysfs_battery_supply 13 | r_dir_file(dashd, vendor_sysfs_battery_supply) 14 | 15 | # Allow dashd to read files in vendor_sysfs_usb_supply 16 | r_dir_file(dashd, vendor_sysfs_usb_supply) 17 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_graphics_composer_default.te: -------------------------------------------------------------------------------- 1 | # Allow access to the HALs 2 | hal_client_domain(hal_graphics_composer_default, hal_sensors) 3 | 4 | # Allow hal_graphics_composer_default to call hal_sensors_default via binder 5 | binder_call(hal_graphics_composer_default, hal_sensors_default) 6 | 7 | # Allow hal_graphics_composer_default to find hal_sensors_hwservice 8 | allow hal_graphics_composer_default hal_sensors_hwservice:hwservice_manager find; 9 | 10 | # Allow hal_graphics_composer_default to read the motor sysfs nodes 11 | r_dir_file(hal_graphics_composer_default, sysfs_motor) 12 | -------------------------------------------------------------------------------- /KeyHandler/Android.bp: -------------------------------------------------------------------------------- 1 | android_app { 2 | name: "KeyHandler", 3 | 4 | srcs: ["src/**/*.kt"], 5 | resource_dirs: ["res"], 6 | 7 | certificate: "platform", 8 | platform_apis: true, 9 | system_ext_specific: true, 10 | 11 | static_libs: [ 12 | "org.pixelexperience.settings.resources", 13 | ], 14 | 15 | optimize: { 16 | proguard_flags_files: ["proguard.flags"], 17 | }, 18 | } 19 | 20 | sh_binary { 21 | name: "tri-state-key-calibrate", 22 | init_rc: ["tri-state-key-calibrate.rc"], 23 | src: "tri-state-key-calibrate.sh", 24 | vendor: true, 25 | } 26 | -------------------------------------------------------------------------------- /gpt-utils/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2018 The Android Open Source Project 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | 6 | cc_library { 7 | name: "libgptutils.oneplus_msmnile", 8 | vendor: true, 9 | recovery_available: true, 10 | shared_libs: [ 11 | "libcutils", 12 | "liblog", 13 | "libz", 14 | ], 15 | cflags: [ 16 | "-Wall", 17 | "-Werror", 18 | ], 19 | srcs: [ 20 | "gpt-utils.cpp", 21 | ], 22 | owner: "qti", 23 | header_libs: [ 24 | "generated_kernel_headers", 25 | ], 26 | export_include_dirs: ["."], 27 | } 28 | -------------------------------------------------------------------------------- /configs/privapp-permissions-hotword.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_ifaa_default.te: -------------------------------------------------------------------------------- 1 | type hal_ifaa_default, domain; 2 | type hal_ifaa_default_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(hal_ifaa_default) 5 | 6 | hwbinder_use(hal_ifaa_default) 7 | add_hwservice(hal_ifaa_default, hal_ifaa_hwservice) 8 | 9 | allow hal_ifaa_default tee_device:chr_file { rw_file_perms }; 10 | allow hal_ifaa_default ion_device:chr_file { r_file_perms }; 11 | r_dir_file(hal_ifaa_default, firmware_file) 12 | 13 | allow hal_ifaa_default vendor_hal_perf_hwservice:hwservice_manager { find }; 14 | binder_call(hal_ifaa_default, vendor_hal_perf_default) 15 | 16 | get_prop(hal_ifaa_default, hwservicemanager_prop) 17 | -------------------------------------------------------------------------------- /doze/src/org/lineageos/settings/doze/BootCompletedReceiver.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package org.lineageos.settings.doze 7 | 8 | import android.content.BroadcastReceiver 9 | import android.content.Context 10 | import android.content.Intent 11 | import android.util.Log 12 | 13 | class BootCompletedReceiver : BroadcastReceiver() { 14 | override fun onReceive(context: Context, intent: Intent) { 15 | Log.d(TAG, "Starting") 16 | Utils.checkDozeService(context) 17 | } 18 | 19 | companion object { 20 | private const val TAG = "OnePlusDoze" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /KeyHandler/src/org/lineageos/settings/device/BootCompletedReceiver.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package org.lineageos.settings.device 7 | 8 | import android.content.BroadcastReceiver 9 | import android.content.Context 10 | import android.content.Intent 11 | import android.util.Log 12 | 13 | class BootCompletedReceiver : BroadcastReceiver() { 14 | override fun onReceive(context: Context, intent: Intent) { 15 | Log.d(TAG, "Starting") 16 | context.startService(Intent(context, KeyHandler::class.java)) 17 | } 18 | 19 | companion object { 20 | private const val TAG = "KeyHandler" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_param_default.te: -------------------------------------------------------------------------------- 1 | type hal_param_default, domain; 2 | hal_server_domain(hal_param_default, hal_param) 3 | 4 | type hal_param_default_exec, exec_type, vendor_file_type, file_type; 5 | init_daemon_domain(hal_param_default) 6 | 7 | allow hal_param_default self:qipcrtr_socket create_socket_perms_no_ioctl; 8 | 9 | # Allow hal_param_default search in block_device 10 | allow hal_param_default block_device:dir search; 11 | 12 | # Allow hal_param_default to read and write to param_block_device 13 | allow hal_param_default param_block_device:blk_file rw_file_perms; 14 | 15 | # Allow hal_param_default to read and write to param_device 16 | allow hal_param_default param_device:chr_file rw_file_perms; 17 | -------------------------------------------------------------------------------- /interfaces/oneplus/hardware/camera/1.0/IOnePlusCameraProvider.hal: -------------------------------------------------------------------------------- 1 | package vendor.oneplus.hardware.camera@1.0; 2 | 3 | interface IOnePlusCameraProvider { 4 | setCameraId(int32_t name) generates (bool status); 5 | setPackageName(string name) generates (bool status); 6 | getPackageName() generates (string cameraDeviceNames); 7 | file_access(string path) generates (bool status); 8 | file_delete(string path) generates (bool status); 9 | file_open(string path) generates (int32_t fd); 10 | file_write(int32_t fd, vec buffer, int32_t size) generates (bool status2); 11 | file_read(int32_t fd, int32_t size) generates (bool status, vec buffer, int32_t size); 12 | file_close(int32_t fd) generates (bool status); 13 | }; 14 | -------------------------------------------------------------------------------- /KeyHandler/src/org/lineageos/settings/device/ButtonSettingsActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package org.lineageos.settings.device 7 | 8 | import android.os.Bundle 9 | 10 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity 11 | import com.android.settingslib.widget.R 12 | 13 | class ButtonSettingsActivity : CollapsingToolbarBaseActivity() { 14 | public override fun onCreate(savedInstanceState: Bundle?) { 15 | super.onCreate(savedInstanceState) 16 | fragmentManager.beginTransaction().replace( 17 | com.android.settingslib.widget.R.id.content_frame, 18 | ButtonSettingsFragment() 19 | ).commit() 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /livedisplay/vendor.lineage.livedisplay@2.1-service.oneplus_msmnile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | vendor.lineage.livedisplay 4 | hwbinder 5 | 2.1 6 | 7 | IAntiFlicker 8 | default 9 | 10 | 11 | IDisplayModes 12 | default 13 | 14 | 15 | ISunlightEnhancement 16 | default 17 | 18 | @2.0::IPictureAdjustment/default 19 | 20 | 21 | -------------------------------------------------------------------------------- /shims/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2021 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_library { 17 | name: "libril_shim", 18 | srcs: ["libril_shim.cpp"], 19 | vendor: true 20 | } 21 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_nfc_default.te: -------------------------------------------------------------------------------- 1 | # Allow access to the HALs 2 | hal_client_domain(hal_nfc_default, hal_secure_element) 3 | 4 | # Allow hal_nfc_default to find hal_secure_element_hwservice 5 | allow hal_nfc_default hal_secure_element_hwservice:hwservice_manager find; 6 | 7 | # Allow hal_nfc_default to read and write to proc_touchpanel 8 | allow hal_nfc_default proc_touchpanel:dir search; 9 | allow hal_nfc_default proc_touchpanel:file rw_file_perms; 10 | 11 | # Allow hal_nfc_default to read, write and create files in vendor_nfc_vendor_data_file 12 | allow hal_nfc_default vendor_nfc_vendor_data_file:dir search; 13 | allow hal_nfc_default vendor_nfc_vendor_data_file:file create_file_perms; 14 | 15 | # Allow hal_nfc_default to get vendor_nfc_prop 16 | get_prop(hal_nfc_default, vendor_nfc_prop) 17 | -------------------------------------------------------------------------------- /camera_helper/src/org/lineageos/camerahelper/BootCompletedReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | package org.lineageos.camerahelper; 8 | 9 | import android.content.BroadcastReceiver; 10 | import android.content.Context; 11 | import android.content.Intent; 12 | import android.util.Log; 13 | 14 | public class BootCompletedReceiver extends BroadcastReceiver { 15 | private static final String TAG = "OnePlusCameraHelper"; 16 | 17 | @Override 18 | public void onReceive(final Context context, Intent intent) { 19 | Log.d(TAG, "Starting"); 20 | context.startService(new Intent(context, CameraMotorService.class)); 21 | context.startService(new Intent(context, FallSensorService.class)); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /rootdir/bin/init.qti.qcv.sh: -------------------------------------------------------------------------------- 1 | #! /vendor/bin/sh 2 | #============================================================================= 3 | # Copyright (c) 2020 Qualcomm Technologies, Inc. 4 | # All Rights Reserved. 5 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 6 | #============================================================================= 7 | 8 | soc_id=`cat /sys/devices/soc0/soc_id` 2> /dev/null 9 | 10 | # Store soc_id in ro.vendor.qti.soc_id 11 | setprop ro.vendor.qti.soc_id $soc_id 12 | 13 | # For chipsets in QCV family, convert soc_id to soc_name 14 | # and store it in ro.vendor.qti.soc_name. 15 | if [ "$soc_id" -eq 415 ] || [ "$soc_id" -eq 439 ] || [ "$soc_id" -eq 456 ]; then 16 | setprop ro.vendor.qti.soc_name lahaina 17 | elif [ "$soc_id" -eq 450 ]; then 18 | setprop ro.vendor.qti.soc_name shima 19 | fi 20 | -------------------------------------------------------------------------------- /doze/src/org/lineageos/settings/doze/DozeSettingsActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021-2022 The LineageOS Project 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package org.lineageos.settings.doze 7 | 8 | import android.os.Bundle 9 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity 10 | import com.android.settingslib.widget.R 11 | 12 | class DozeSettingsActivity : CollapsingToolbarBaseActivity() { 13 | override fun onCreate(savedInstanceState: Bundle?) { 14 | super.onCreate(savedInstanceState) 15 | fragmentManager 16 | .beginTransaction() 17 | .replace(com.android.settingslib.widget.R.id.content_frame, DozeSettingsFragment(), TAG) 18 | .commit() 19 | } 20 | 21 | companion object { 22 | private const val TAG = "DozeSettingsActivity" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /interfaces/oneplus/fingerprint/extension/1.0/IVendorFingerprintExtensions.hal: -------------------------------------------------------------------------------- 1 | package vendor.oneplus.fingerprint.extension@1.0; 2 | 3 | import vendor.oneplus.fingerprint.extension@1.0::types; 4 | import vendor.oneplus.fingerprint.extension@1.0::IVendorFingerprintExtensionsCallback; 5 | 6 | interface IVendorFingerprintExtensions { 7 | updateStatus(int32_t status) generates (int32_t debugErrno); 8 | getStatus() generates (int32_t debugErrno2); 9 | getEngTest() generates (vec FpTests); 10 | setEngCallback(IVendorFingerprintExtensionsCallback Callback) generates (int32_t debugErrno); 11 | startEngTest(int32_t cmdId) generates (int32_t debugErrno); 12 | stopEngTest(int32_t cmdId) generates (int32_t debugErrno); 13 | stopAllEngTest() generates (int32_t debugErrno2); 14 | setParam(int32_t level) generates (int32_t debugErrno); 15 | }; 16 | -------------------------------------------------------------------------------- /sepolicy/vendor/wifi-mac-generator.te: -------------------------------------------------------------------------------- 1 | type wifi-mac-generator, domain; 2 | type wifi-mac-generator_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(wifi-mac-generator) 5 | 6 | # Allow wifi-mac-generator to read and execute vendor_shell_exec 7 | allow wifi-mac-generator vendor_shell_exec:file rx_file_perms; 8 | 9 | # Allow wifi-mac-generator to read and execute vendor_toolbox_exec 10 | allow wifi-mac-generator vendor_toolbox_exec:file rx_file_perms; 11 | 12 | # Allow wifi-mac-generator to read vendor_data_file 13 | r_dir_file(wifi-mac-generator, vendor_data_file) 14 | 15 | # Allow wifi-mac-generator to read wifi_nv_data_file 16 | r_dir_file(wifi-mac-generator, wifi_nv_data_file) 17 | 18 | # Allow wifi-mac-generator to read and write to mnt_vendor_file 19 | allow wifi-mac-generator mnt_vendor_file:dir search; 20 | allow wifi-mac-generator mnt_vendor_file:file rw_file_perms; 21 | -------------------------------------------------------------------------------- /audio/bluetooth_hearing_aid_audio_policy_configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /oneplus-fwk/src/android/os/OPDiagnoseManager.java: -------------------------------------------------------------------------------- 1 | package android.os; 2 | 3 | public final class OPDiagnoseManager { 4 | 5 | private static String LOG_TAG = OPDiagnoseManager.class.getSimpleName(); 6 | 7 | public boolean addIssueCount(int type, int count) { 8 | return true; 9 | } 10 | 11 | public boolean setIssueNumber(int type, int count) { 12 | return true; 13 | } 14 | 15 | public boolean writeDiagData(int type, String issueDesc) { 16 | return true; 17 | } 18 | 19 | public boolean setDiagData(int type, String issueDesc, int count) { 20 | return true; 21 | } 22 | 23 | public boolean saveDiagLog(int type) { 24 | return true; 25 | } 26 | 27 | public boolean saveQxdmLog(int type, String mask_type) { 28 | return true; 29 | } 30 | 31 | public boolean readDiagData(int type) { 32 | return true; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /sepolicy/vendor/file.te: -------------------------------------------------------------------------------- 1 | # data 2 | type fpc_images_file, file_type, core_data_file_type, data_file_type; 3 | type wifi_nv_data_file, file_type, data_file_type; 4 | 5 | # persist 6 | type persist_camera_file, file_type; 7 | 8 | # proc 9 | type proc_sensor, fs_type, proc_type; 10 | type proc_touchpanel, fs_type, proc_type; 11 | type proc_ultrasound, fs_type, proc_type; 12 | 13 | # rootfs 14 | type op1_file, file_type; 15 | type op2_file, file_type; 16 | type opf_file, file_type; 17 | type public_adsprpcd_file, file_type; 18 | 19 | # sockets 20 | type vl53l1_socket, file_type; 21 | 22 | # sysfs 23 | type sysfs_aod, sysfs_type, fs_type; 24 | type sysfs_dtb_model, sysfs_type, fs_type; 25 | type sysfs_fod, sysfs_type, fs_type; 26 | type sysfs_fpc, sysfs_type, fs_type; 27 | type sysfs_fsc, sysfs_type, fs_type; 28 | type sysfs_project_info, sysfs_type, fs_type; 29 | type sysfs_tri_state_key, sysfs_type, fs_type; 30 | type sysfs_vl53l1, sysfs_type, fs_type; 31 | -------------------------------------------------------------------------------- /init/Android.bp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 The LineageOS Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | cc_library_static { 16 | name: "libinit_oneplus-sm8150", 17 | recovery_available: true, 18 | srcs: ["init_oneplus-sm8150.cpp"], 19 | whole_static_libs: ["libbase"], 20 | include_dirs: [ 21 | "system/core/init", 22 | "system/libbase/include" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /KeyHandler/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | @string/alert_slider_mode_normal 9 | @string/alert_slider_mode_vibration 10 | @string/alert_slider_mode_silent 11 | @string/alert_slider_mode_dnd_priority_only 12 | @string/alert_slider_mode_dnd_total_silence 13 | @string/alert_slider_mode_dnd_alarms_only 14 | 15 | 16 | 17 | 2 18 | 1 19 | 0 20 | 3 21 | 4 22 | 5 23 | 24 | 25 | -------------------------------------------------------------------------------- /fingerprint/android.hardware.biometrics.fingerprint@2.3-service.oneplus.rc: -------------------------------------------------------------------------------- 1 | service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.3-service.oneplus 2 | # "class hal" causes a race condition on some devices due to files created 3 | # in /data. As a workaround, postpone startup until later in boot once 4 | # /data is mounted. 5 | class late_start 6 | user system 7 | group system input uhid 8 | priority -20 9 | 10 | on boot 11 | chown system system /sys/class/drm/card0-DSI-1/auth_status 12 | chmod 0666 /sys/class/drm/card0-DSI-1/auth_status 13 | chown system system /sys/class/drm/card0-DSI-1/notify_dim 14 | chmod 0666 /sys/class/drm/card0-DSI-1/notify_dim 15 | chown system system /sys/class/drm/card0-DSI-1/notify_fppress 16 | chmod 0666 /sys/class/drm/card0-DSI-1/notify_fppress 17 | chown system system /sys/class/drm/card0-DSI-1/power_status 18 | chmod 0666 /sys/class/drm/card0-DSI-1/power_status 19 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_init.te: -------------------------------------------------------------------------------- 1 | typeattribute vendor_init data_between_core_and_vendor_violators; 2 | 3 | # Allow vendor_init to read and write to ion_device 4 | allow vendor_init ion_device:chr_file rw_file_perms; 5 | 6 | # Allow vendor_init to read and write to tee_device 7 | allow vendor_init tee_device:chr_file rw_file_perms; 8 | 9 | # Allow vendor_init to write to sysfs_ssr_toggl 10 | allow vendor_init vendor_sysfs_ssr_toggle:file w_file_perms; 11 | 12 | # Allow init to create fpc_images_file 13 | allow vendor_init fpc_images_file:dir create_dir_perms; 14 | 15 | # Allow init to create nfc_data_file 16 | allow vendor_init nfc_data_file:dir create_dir_perms; 17 | 18 | # Allow init to create tmpfs 19 | allow vendor_init tmpfs:dir create_dir_perms; 20 | 21 | # Allow vendor_init to set vendor_disable_spu_prop 22 | set_prop(vendor_init, vendor_disable_spu_prop) 23 | 24 | # Allow vendor_init to set vendor_tee_listener_prop 25 | get_prop(vendor_init, vendor_tee_listener_prop) 26 | -------------------------------------------------------------------------------- /configs/gps/lowi.conf: -------------------------------------------------------------------------------- 1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | # 3 | # LOWI Config file - default 4 | # 5 | # GENERAL DESCRIPTION 6 | # This file contains the config params for LOWI 7 | # 8 | # Copyright (c) 2019 Qualcomm Technologies, Inc. 9 | # All Rights Reserved. 10 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 11 | # 12 | # 2012-2013 Qualcomm Atheros, Inc. 13 | # All Rights Reserved. 14 | # Qualcomm Atheros Confidential and Proprietary. 15 | # 16 | # Export of this technology or software is regulated by the U.S. Government. 17 | # Diversion contrary to U.S. law prohibited. 18 | #=============================================================================*/ 19 | 20 | # X86 ONLY - UBUNTU: 21 | # Copy this file in the same directory where the executable is 22 | 23 | # Log level 24 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 25 | LOWI_LOG_LEVEL = 3 26 | LOWI_USE_LOWI_LP = 0 27 | 28 | -------------------------------------------------------------------------------- /sepolicy/private/camera_helper_app.te: -------------------------------------------------------------------------------- 1 | type camera_helper_app, domain; 2 | 3 | app_domain(camera_helper_app) 4 | 5 | # Allow camera_helper_app to find app_api_service 6 | allow camera_helper_app app_api_service:service_manager find; 7 | 8 | # Allow camera_helper_app to find cameraserver_service 9 | allow camera_helper_app cameraserver_service:service_manager find; 10 | 11 | # Allow camera_helper_app read and write /data/data subdirectory 12 | allow camera_helper_app system_app_data_file:dir create_dir_perms; 13 | allow camera_helper_app system_app_data_file:{ file lnk_file } create_file_perms; 14 | 15 | # Allow camera_helper_app to read and write to sysfs_motor 16 | allow camera_helper_app sysfs_motor:dir search; 17 | allow camera_helper_app sysfs_motor:file rw_file_perms; 18 | 19 | # Allow camera_helper_app to search in mnt_vendor_file 20 | allow camera_helper_app mnt_vendor_file:dir search; 21 | 22 | # Allow camera_helper_app to read persist_engineer_file 23 | r_dir_file(camera_helper_app, persist_engineer_file) 24 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_camera_default.te: -------------------------------------------------------------------------------- 1 | # Binder calls to hal_cameraHIDL 2 | binder_call(hal_camera_default, hal_cameraHIDL) 3 | 4 | # Allow hal_camera_default to find hal_cameraHIDL_hwservice 5 | allow hal_camera_default hal_cameraHIDL_hwservice:hwservice_manager find; 6 | 7 | # Persist files 8 | allow hal_camera_default { mnt_vendor_file persist_camera_file }:dir w_dir_perms; 9 | allow hal_camera_default { mnt_vendor_file persist_camera_file }:file create_file_perms; 10 | 11 | # Range device 12 | allow hal_camera_default vl53l1_device:chr_file rw_file_perms; 13 | 14 | # Model detection 15 | allow hal_camera_default sysfs_dtb_model:file r_file_perms; 16 | 17 | # Properties 18 | set_prop(hal_camera_default, vendor_camera_prop) 19 | 20 | # Allow camera to read over /dev/adsprpc-smd-secure 21 | allow hal_camera_default vendor_xdsp_device:chr_file r_file_perms; 22 | 23 | # Laser AF 24 | allow hal_camera_default input_device:chr_file {ioctl read open}; 25 | allow hal_camera_default input_device:dir {read open search}; 26 | -------------------------------------------------------------------------------- /camera_helper/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Close 8 | Raise the camera 9 | Retry 10 | Warning 11 | 12 | Free fall detected 13 | Front facing camera has been lowered in order to protect it. Would you like to use front camera again? 14 | 15 | The front facing camera cannot retract, please ensure there is no obstruction 16 | 17 | The front facing camera cannot pop up, please ensure there is no obstruction 18 | 19 | Pressing down the front facing camera can damage the motor. Please avoid doing so. 20 | 21 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | true 25 | 26 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_audio_default.te: -------------------------------------------------------------------------------- 1 | # Allow access to the HALs 2 | hal_client_domain(hal_audio_default, hal_sensors) 3 | 4 | # Allow binder communication with hal_param_default 5 | binder_call(hal_audio_default, hal_param_default) 6 | 7 | # Allow binder communication with hal_sensors_default 8 | binder_call(hal_audio_default, hal_sensors_default) 9 | 10 | # Allow hal_audio_default to find hal_param_hwservice 11 | allow hal_audio_default hal_param_hwservice:hwservice_manager find; 12 | 13 | # Allow hal_audio_default to find hal_sensors_hwservice 14 | allow hal_audio_default hal_sensors_hwservice:hwservice_manager find; 15 | 16 | # Allow hal_audio_default to read audio_device 17 | allow hal_audio_default audio_device:dir r_dir_perms; 18 | 19 | # Allow hal_audio_default to read and write to ultrasound_device 20 | allow hal_audio_default ultrasound_device:chr_file rw_file_perms; 21 | 22 | # Allow hal_audio_default to read files in mnt_vendor_file 23 | r_dir_file(hal_audio_default, mnt_vendor_file) 24 | 25 | get_prop(hal_audio_default, telephony_config_prop) 26 | get_prop(hal_audio_default, vendor_bluetooth_prop) 27 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice_contexts: -------------------------------------------------------------------------------- 1 | vendor.nxp.eventprocessor::INxpEseEvtProcessor u:object_r:hal_secure_element_hwservice:s0 2 | vendor.nxp.nxpese::INxpEse u:object_r:hal_secure_element_hwservice:s0 3 | vendor.nxp.nxpnfc::INxpNfc u:object_r:hal_nfc_hwservice:s0 4 | vendor.oneplus.camera.CameraMDMHIDL::IOnePlusCameraMDM u:object_r:hal_cameraHIDL_hwservice:s0 5 | vendor.oneplus.fingerprint.extension::IVendorFingerprintExtensions u:object_r:hal_fingerprint_hwservice:s0 6 | vendor.oneplus.hardware.camera::IOnePlusCameraProvider u:object_r:hal_cameraHIDL_hwservice:s0 7 | vendor.oneplus.hardware.CameraMDMHIDL::IOnePlusCameraMDM u:object_r:hal_cameraHIDL_hwservice:s0 8 | vendor.oneplus.hardware.hdcpkey::IOneplusHdcpKey u:object_r:hal_hdcpkey_hwservice:s0 9 | vendor.oneplus.hardware.ifaa::IOneplusIfaa u:object_r:hal_ifaa_hwservice:s0 10 | vendor.oneplus.hardware.param::IOneplusParam u:object_r:hal_param_hwservice:s0 11 | -------------------------------------------------------------------------------- /vibrator/Android.bp: -------------------------------------------------------------------------------- 1 | Common_CFlags = ["-Wall"] 2 | Common_CFlags += ["-Werror"] 3 | 4 | cc_library_shared { 5 | name: "vendor.qti.hardware.vibrator.impl.oneplus", 6 | vendor: true, 7 | cflags: Common_CFlags, 8 | srcs: [ 9 | "Vibrator.cpp", 10 | ], 11 | shared_libs: [ 12 | "libcutils", 13 | "libutils", 14 | "liblog", 15 | "libqtivibratoreffect", 16 | "libbinder_ndk", 17 | "android.hardware.vibrator-V1-ndk", 18 | ], 19 | export_include_dirs: ["include"], 20 | } 21 | 22 | cc_binary { 23 | name: "vendor.qti.hardware.vibrator.service.oneplus", 24 | vendor: true, 25 | relative_install_path: "hw", 26 | init_rc: ["vendor.qti.hardware.vibrator.service.oneplus.rc"], 27 | vintf_fragments: [ 28 | "vendor.qti.hardware.vibrator.service.oneplus.xml", 29 | ], 30 | cflags: Common_CFlags, 31 | srcs: [ 32 | "service.cpp", 33 | ], 34 | shared_libs: [ 35 | "libcutils", 36 | "libutils", 37 | "libbase", 38 | "libbinder_ndk", 39 | "android.hardware.vibrator-V1-ndk", 40 | "vendor.qti.hardware.vibrator.impl.oneplus", 41 | ], 42 | } 43 | -------------------------------------------------------------------------------- /sensors/include/AlsCorrection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | namespace android { 20 | namespace hardware { 21 | namespace sensors { 22 | namespace V2_1 { 23 | namespace implementation { 24 | 25 | static constexpr int SENSOR_TYPE_QTI_HARDWARE_LIGHT = 33171030; 26 | 27 | class AlsCorrection { 28 | public: 29 | static void init(); 30 | static void correct(float& light); 31 | }; 32 | 33 | } // namespace implementation 34 | } // namespace V2_1 35 | } // namespace sensors 36 | } // namespace hardware 37 | } // namespace android 38 | -------------------------------------------------------------------------------- /KeyHandler/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | Alert slider 9 | Action 10 | Top position 11 | Middle position 12 | Bottom position 13 | Silent 14 | Normal 15 | Vibration 16 | Priority only 17 | Total silence 18 | Alarms only 19 | Mute media 20 | Mute media when switching to silent 21 | 22 | -------------------------------------------------------------------------------- /shims/libril_shim.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | typedef void (*qcril_other_init_t)(); 20 | typedef void (*oem_qmi_access_func_t)(); 21 | 22 | extern "C" void qcril_other_init() { 23 | static auto qcril_other_init_orig = reinterpret_cast( 24 | dlsym(RTLD_NEXT, "qcril_other_init")); 25 | static auto oem_qmi_access_func_orig = reinterpret_cast( 26 | dlsym(RTLD_NEXT, "_Z19oem_qmi_access_funcv")); 27 | 28 | oem_qmi_access_func_orig(); 29 | qcril_other_init_orig(); 30 | } 31 | -------------------------------------------------------------------------------- /fingerprint/Android.bp: -------------------------------------------------------------------------------- 1 | cc_binary { 2 | name: "android.hardware.biometrics.fingerprint@2.3-service.oneplus", 3 | defaults: ["hidl_defaults"], 4 | init_rc: ["android.hardware.biometrics.fingerprint@2.3-service.oneplus.rc"], 5 | vintf_fragments: ["android.hardware.biometrics.fingerprint@2.3-service.oneplus.xml"], 6 | vendor: true, 7 | relative_install_path: "hw", 8 | srcs: [ 9 | "BiometricsFingerprint.cpp", 10 | "properties.cpp", 11 | "service.cpp", 12 | ], 13 | 14 | shared_libs: [ 15 | "libcutils", 16 | "liblog", 17 | "libhidlbase", 18 | "libhardware", 19 | "libutils", 20 | "android.hardware.biometrics.fingerprint@2.1", 21 | "android.hardware.biometrics.fingerprint@2.2", 22 | "android.hardware.biometrics.fingerprint@2.3", 23 | "vendor.oneplus.fingerprint.extension@1.0", 24 | ], 25 | } 26 | 27 | cc_library_static { 28 | name: "libudfps_extension.oneplus", 29 | srcs: ["UdfpsExtension.cpp"], 30 | include_dirs: [ 31 | "frameworks/native/services/surfaceflinger/CompositionEngine/include", 32 | ], 33 | header_libs: [ 34 | "generated_kernel_headers", 35 | ], 36 | } 37 | -------------------------------------------------------------------------------- /touch/lineage.touch@1.0-service.oneplus.rc: -------------------------------------------------------------------------------- 1 | on boot 2 | chmod 0660 /proc/touchpanel/double_swipe_enable 3 | chmod 0660 /proc/touchpanel/down_arrow_enable 4 | chmod 0660 /proc/touchpanel/left_arrow_enable 5 | chmod 0660 /proc/touchpanel/letter_m_enable 6 | chmod 0660 /proc/touchpanel/letter_o_enable 7 | chmod 0660 /proc/touchpanel/letter_s_enable 8 | chmod 0660 /proc/touchpanel/letter_w_enable 9 | chmod 0660 /proc/touchpanel/right_arrow_enable 10 | chmod 0660 /proc/touchpanel/single_tap_enable 11 | chown system system /proc/touchpanel/double_swipe_enable 12 | chown system system /proc/touchpanel/down_arrow_enable 13 | chown system system /proc/touchpanel/left_arrow_enable 14 | chown system system /proc/touchpanel/letter_m_enable 15 | chown system system /proc/touchpanel/letter_o_enable 16 | chown system system /proc/touchpanel/letter_s_enable 17 | chown system system /proc/touchpanel/letter_w_enable 18 | chown system system /proc/touchpanel/right_arrow_enable 19 | chown system system /proc/touchpanel/single_tap_enable 20 | 21 | service touch-hal-1-0 /system_ext/bin/hw/lineage.touch@1.0-service.oneplus 22 | class hal 23 | user system 24 | group system 25 | -------------------------------------------------------------------------------- /bluetooth/include/bdroid_buildcfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2013, The Linux Foundation. All rights reserved. 4 | * Not a Contribution, Apache license notifications and license are retained 5 | * for attribution purposes only. 6 | * 7 | * Copyright (C) 2012 The Android Open Source Project 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #ifndef _BDROID_BUILDCFG_H 23 | #define _BDROID_BUILDCFG_H 24 | // Disables read remote device feature 25 | #define BTM_WBS_INCLUDED TRUE 26 | #define BTIF_HF_WBS_PREFERRED TRUE 27 | 28 | #define BLE_VND_INCLUDED TRUE 29 | // skips conn update at conn completion 30 | #define BT_CLEAN_TURN_ON_DISABLED 1 31 | #endif 32 | -------------------------------------------------------------------------------- /fingerprint/UdfpsExtension.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #if __has_include() 20 | #include 21 | #elif __has_include() 22 | #include 23 | #endif 24 | 25 | uint32_t getUdfpsZOrder(uint32_t z, bool touched) { 26 | #ifdef FOD_PRESSED_LAYER_ZORDER 27 | return touched ? z | FOD_PRESSED_LAYER_ZORDER : z; 28 | #else 29 | return touched ? 0xfc8 : z; 30 | #endif 31 | } 32 | 33 | uint64_t getUdfpsUsageBits(uint64_t usageBits, bool) { 34 | return usageBits; 35 | } 36 | -------------------------------------------------------------------------------- /touch/vendor.lineage.touch@1.0-service.oneplus.rc: -------------------------------------------------------------------------------- 1 | on boot 2 | chmod 0660 /proc/touchpanel/double_swipe_enable 3 | chmod 0660 /proc/touchpanel/down_arrow_enable 4 | chmod 0660 /proc/touchpanel/left_arrow_enable 5 | chmod 0660 /proc/touchpanel/letter_m_enable 6 | chmod 0660 /proc/touchpanel/letter_o_enable 7 | chmod 0660 /proc/touchpanel/letter_s_enable 8 | chmod 0660 /proc/touchpanel/letter_w_enable 9 | chmod 0660 /proc/touchpanel/right_arrow_enable 10 | chmod 0660 /proc/touchpanel/single_tap_enable 11 | chown system system /proc/touchpanel/double_swipe_enable 12 | chown system system /proc/touchpanel/down_arrow_enable 13 | chown system system /proc/touchpanel/left_arrow_enable 14 | chown system system /proc/touchpanel/letter_m_enable 15 | chown system system /proc/touchpanel/letter_o_enable 16 | chown system system /proc/touchpanel/letter_s_enable 17 | chown system system /proc/touchpanel/letter_w_enable 18 | chown system system /proc/touchpanel/right_arrow_enable 19 | chown system system /proc/touchpanel/single_tap_enable 20 | 21 | service vendor.touch-hal-1-0 /vendor/bin/hw/vendor.lineage.touch@1.0-service.oneplus 22 | class hal 23 | user system 24 | group system 25 | -------------------------------------------------------------------------------- /doze/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | @string/disabled 21 | @string/pick_up_gesture_summary 22 | @string/pick_up_wake_gesture_summary 23 | 24 | 25 | 26 | 0 27 | 1 28 | 2 29 | 30 | 31 | -------------------------------------------------------------------------------- /camera_helper/res/values-in/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Tutup 19 | Keluarkan kamera 20 | Coba lagi 21 | Peringatan 22 | Tidak dapat mengeluarkan kamera depan, pastikan tidak ada yang menghalangi. 23 | Menekan kamera depan dapat merusak motor kamera. Harap hindari melakukannya. 24 | 25 | -------------------------------------------------------------------------------- /rootdir/etc/vendor.oem_ftm.rc: -------------------------------------------------------------------------------- 1 | on post-fs-data 2 | chmod 0666 /dev/block/sda6 3 | chmod 0666 /dev/param 4 | 5 | service wcnss-service-f /system/bin/wcnss_service -f 6 | class main 7 | user root 8 | group system wifi radio 9 | oneshot 10 | disabled 11 | 12 | service factory /vendor/bin/factory 13 | class late_start 14 | disabled 15 | 16 | service ftm_power_config /vendor/bin/sh /vendor/etc/init/hw/ftm_power_config.sh 17 | class late_start 18 | user root 19 | disabled 20 | oneshot 21 | 22 | on oem_ftm 23 | chmod 0666 /sys/module/sysctl/parameters/oem_en_chg_prk_lv 24 | chmod 0666 /sys/class/drm/card0-DSI-1/panel_serial_number_AT 25 | chown system system /vendor/bin/factory 26 | chmod 0755 /vendor/bin/factory 27 | chown system system /vendor/bin/ptt_socket_app 28 | chmod 0755 /vendor/bin/ptt_socket_app 29 | write /sys/class/power_supply/battery/charging_enabled 0 30 | start qcom-sh 31 | start vendor.qmuxd 32 | start ptt_ffbm 33 | start ftm_power_config 34 | start cnss-daemon 35 | start qcom-c_main-sh 36 | write /dev/kmsg "factory boot mode is:${ro.vendor.factory.mode}" 37 | start vendor.mdm_launcher 38 | 39 | on property:ro.vendor.factory.mode=ftm 40 | start factory 41 | -------------------------------------------------------------------------------- /overlay-aosp/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 25 | true 26 | 40 27 | 28 | 29 | true 30 | 31 | 32 | -------------------------------------------------------------------------------- /camera_helper/res/values-zh-rCN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 关闭 19 | 抬起相机 20 | 重试 21 | 警告 22 | 检测到自由落体 23 | 为了保护前置相机,已命令相机收回。您是否要再次使用前置相机? 24 | 前置相机无法收回,请确保没有任何阻挡。 25 | 前置摄像头无法弹出,请确保没有任何阻挡。 26 | 强行按下前置摄像头可能会导致电机损坏,请不要这样做。 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-zh-rTW/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 關閉 19 | 抬起相機 20 | 重試 21 | 警告 22 | 檢測到自由落體 23 | 為了保護前置相機,已指令相機收回。您是否要再次使用前置相機? 24 | 前置鏡頭無法收回,請確保沒有任何阻擋。 25 | 前置鏡頭無法彈出,請確保沒有任何阻擋。 26 | 強行按下前置鏡頭可能會導致電機損壞,請不要這樣做。 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-ja/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 閉じる 19 | カメラを上げる 20 | 再試行 21 | 警告 22 | 落下を検出しました 23 | 保護のためフロントカメラを下げました。もう一度フロントカメラを使用しますか? 24 | フロントカメラを収納できません。妨げとなる物がないか確認してください。 25 | フロントカメラを上げられません。妨げとなる物がないか確認してください。 26 | フロントカメラの押し込みはモーターに損傷を与える可能性があります。お控えください。 27 | 28 | -------------------------------------------------------------------------------- /setup-makefiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017-2020 The LineageOS Project 5 | # 6 | # SPDX-License-Identifier: Apache-2.0 7 | # 8 | 9 | set -e 10 | 11 | # Load extract_utils and do some sanity checks 12 | MY_DIR="${BASH_SOURCE%/*}" 13 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi 14 | 15 | ANDROID_ROOT="${MY_DIR}/../../.." 16 | 17 | HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh" 18 | if [ ! -f "${HELPER}" ]; then 19 | echo "Unable to find helper script at ${HELPER}" 20 | exit 1 21 | fi 22 | source "${HELPER}" 23 | 24 | # Initialize the helper for common 25 | setup_vendor "${DEVICE_COMMON}" "${VENDOR_COMMON:-$VENDOR}" "${ANDROID_ROOT}" true 26 | 27 | # Warning headers and guards 28 | write_headers "guacamole guacamoleb guacamoleg hotdog hotdogb" 29 | 30 | # The standard common blobs 31 | write_makefiles "${MY_DIR}/proprietary-files.txt" true 32 | 33 | # Finish 34 | write_footers 35 | 36 | if [ -s "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" ]; then 37 | # Reinitialize the helper for device 38 | setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false 39 | 40 | # Warning headers and guards 41 | write_headers 42 | 43 | # The standard device blobs 44 | write_makefiles "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" true 45 | 46 | # Finish 47 | write_footers 48 | fi 49 | -------------------------------------------------------------------------------- /camera_helper/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /camera_helper/res/values-ko/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 닫기 19 | 카메라 올리기 20 | 재시도 21 | 주의 22 | 자유 낙하가 감지됨 23 | 전면 카메라를 보호하기 위해 카메라를 닫았습니다. 전면 카메라를 다시 사용하시겠습니까? 24 | 전면 카메라를 닫을 수 없습니다. 방해물이 없는지 확인해 주세요. 25 | 전면 카메라를 열 수 없습니다. 방해물이 없는지 확인해 주세요. 26 | 전면 카메라를 강제로 닫으면 모듈이 손상될 수 있습니다. 이러한 행위를 자제해 주세요. 27 | 28 | -------------------------------------------------------------------------------- /fingerprint/properties.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2022 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "android.hardware.biometrics.fingerprint@2.3-service.oneplus" 18 | #define LOG_VERBOSE "android.hardware.biometrics.fingerprint@2.3-service.oneplus" 19 | 20 | #include 21 | 22 | #include 23 | #include 24 | 25 | extern "C" int property_get(const char *key, char *value, const char *default_value) { 26 | static auto property_get_orig = reinterpret_cast( 27 | dlsym(RTLD_NEXT, "property_get")); 28 | 29 | if (strcmp(key, "vendor.boot.verifiedbootstate") == 0) { 30 | ALOGV("Returning orange for vendor.boot.verifiedbootstate"); 31 | return strlen(strcpy(value, "orange")); 32 | } 33 | 34 | return property_get_orig(key, value, default_value); 35 | } 36 | -------------------------------------------------------------------------------- /oneplus-fwk/src/android/util/OpFeatures.java: -------------------------------------------------------------------------------- 1 | package android.util; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.File; 5 | import java.io.FileReader; 6 | import java.io.IOException; 7 | import java.util.BitSet; 8 | 9 | public final class OpFeatures { 10 | 11 | private static String LOG_TAG = OpFeatures.class.getSimpleName(); 12 | 13 | private static final BitSet sFeatures = new BitSet(); 14 | 15 | static { 16 | File file = new File("/odm/etc/odm_feature_list"); 17 | 18 | try (BufferedReader br = new BufferedReader(new FileReader(file))) { 19 | for (String line = br.readLine(); line != null; line = br.readLine()) { 20 | String[] values = line.split(" "); 21 | if (values.length == 4 && values[3].equals("true")) { 22 | String id = values[0].replaceAll("[^0-9]", ""); 23 | if (id.length() != 0) { 24 | sFeatures.set(Integer.parseInt(id)); 25 | } 26 | } 27 | } 28 | } catch (IOException e) { 29 | Log.e(LOG_TAG, "Failed to read odm feature list file", e); 30 | } 31 | } 32 | 33 | public static boolean isSupport(int... features) { 34 | for (int feature : features) { 35 | if (feature < 0 || !sFeatures.get(feature)) { 36 | return false; 37 | } 38 | } 39 | return true; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /livedisplay/vendor.lineage.livedisplay@2.1-service.oneplus_msmnile.rc: -------------------------------------------------------------------------------- 1 | on init 2 | chown system graphics /sys/class/drm/card0-DSI-1/dimlayer_bl_en 3 | chown system graphics /sys/class/drm/card0-DSI-1/hbm 4 | chown system graphics /sys/class/drm/card0-DSI-1/native_display_customer_p3_mode 5 | chown system graphics /sys/class/drm/card0-DSI-1/native_display_customer_srgb_mode 6 | chown system graphics /sys/class/drm/card0-DSI-1/native_display_loading_effect_mode 7 | chown system graphics /sys/class/drm/card0-DSI-1/native_display_p3_mode 8 | chown system graphics /sys/class/drm/card0-DSI-1/native_display_srgb_color_mode 9 | chown system graphics /sys/class/drm/card0-DSI-1/native_display_wide_color_mode 10 | chmod 0666 /sys/class/drm/card0-DSI-1/dimlayer_bl_en 11 | chmod 0666 /sys/class/drm/card0-DSI-1/hbm 12 | chmod 0666 /sys/class/drm/card0-DSI-1/native_display_customer_p3_mode 13 | chmod 0666 /sys/class/drm/card0-DSI-1/native_display_customer_srgb_mode 14 | chmod 0666 /sys/class/drm/card0-DSI-1/native_display_loading_effect_mode 15 | chmod 0666 /sys/class/drm/card0-DSI-1/native_display_p3_mode 16 | chmod 0666 /sys/class/drm/card0-DSI-1/native_display_srgb_color_mode 17 | chmod 0666 /sys/class/drm/card0-DSI-1/native_display_wide_color_mode 18 | 19 | service vendor.livedisplay-hal-2-1 /vendor/bin/hw/vendor.lineage.livedisplay@2.1-service.oneplus_msmnile 20 | class late_start 21 | user system 22 | group system 23 | -------------------------------------------------------------------------------- /sepolicy/private/als_correction_service.te: -------------------------------------------------------------------------------- 1 | type als_correction_service_exec, system_file_type, exec_type, file_type; 2 | 3 | init_daemon_domain(als_correction_service) 4 | 5 | typeattribute als_correction_service system_writes_vendor_properties_violators; 6 | 7 | # Allow access to the HALs 8 | hal_client_domain(als_correction_service, hal_graphics_allocator) 9 | 10 | # Allow als_correction_service to use binder service 11 | binder_use(als_correction_service) 12 | 13 | # Allow binder communication with surfaceflinger 14 | binder_call(als_correction_service, surfaceflinger) 15 | 16 | # Allow als_correction_service to find hal_graphics_allocator_hwservice 17 | allow als_correction_service hal_graphics_allocator_hwservice:hwservice_manager find; 18 | 19 | # Allow als_correction_service to find hal_graphics_mapper_hwservice 20 | allow als_correction_service hal_graphics_mapper_hwservice:hwservice_manager find; 21 | 22 | # Allow als_correction_service to find surfaceflinger_service 23 | allow als_correction_service surfaceflinger_service:service_manager find; 24 | 25 | # Allow als_correction_service to load same_process_hal_file 26 | allow als_correction_service same_process_hal_file:file r_file_perms; 27 | 28 | # Allow als_correction_service to read and write to ion_device 29 | allow als_correction_service ion_device:chr_file rw_file_perms; 30 | 31 | # Allow als_correction_service to get vendor_sensors_als_prop 32 | set_prop(als_correction_service, vendor_sensors_als_prop) 33 | -------------------------------------------------------------------------------- /livedisplay/include/livedisplay/oneplus/AntiFlicker.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021-2022 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | namespace vendor { 24 | namespace lineage { 25 | namespace livedisplay { 26 | namespace V2_1 { 27 | namespace implementation { 28 | 29 | using ::android::hardware::Return; 30 | using ::android::hardware::Void; 31 | using ::android::sp; 32 | 33 | class AntiFlicker : public IAntiFlicker { 34 | public: 35 | // Methods from ::vendor::lineage::livedisplay::V2_1::IAntiFlicker follow. 36 | Return isEnabled() override; 37 | Return setEnabled(bool enabled) override; 38 | }; 39 | 40 | } // namespace implementation 41 | } // namespace V2_1 42 | } // namespace livedisplay 43 | } // namespace lineage 44 | } // namespace vendor 45 | -------------------------------------------------------------------------------- /sensors/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include "HalProxy.h" 22 | 23 | using android::hardware::configureRpcThreadpool; 24 | using android::hardware::joinRpcThreadpool; 25 | using android::hardware::sensors::V2_0::ISensors; 26 | using android::hardware::sensors::V2_1::implementation::HalProxyV2_0; 27 | 28 | int main(int /* argc */, char** /* argv */) { 29 | configureRpcThreadpool(1, true); 30 | 31 | android::sp halProxy = new HalProxyV2_0(); 32 | if (halProxy->registerAsService() != ::android::OK) { 33 | ALOGE("Failed to register Sensors HAL instance"); 34 | return -1; 35 | } 36 | 37 | joinRpcThreadpool(); 38 | return 1; // joinRpcThreadpool shouldn't exit 39 | } 40 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_fingerprint_default.te: -------------------------------------------------------------------------------- 1 | allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl; 2 | 3 | # Allow binder communication with vendor_hal_perf_default 4 | binder_call(hal_fingerprint_default, vendor_hal_perf_default) 5 | 6 | # Allow hal_fingerprint_default to find vendor_hal_perf_hwservice 7 | allow hal_fingerprint_default vendor_hal_perf_hwservice:hwservice_manager find; 8 | 9 | # Allow hal_fingerprint_default to read and write to fingerprintd_device 10 | allow hal_fingerprint_default fingerprintd_device:chr_file rw_file_perms; 11 | 12 | # Allow hal_fingerprint_default to read and write to vendor_qdsp_device 13 | allow hal_fingerprint_default vendor_qdsp_device:chr_file rw_file_perms; 14 | 15 | # Allow hal_fingerprint_default to read and write to tee_device 16 | allow hal_fingerprint_default tee_device:chr_file rw_file_perms; 17 | 18 | # Allow hal_fingerprint_default to read and write to vendor_xdsp_device 19 | allow hal_fingerprint_default vendor_xdsp_device:chr_file rw_file_perms; 20 | 21 | # Allow hal_fingerprint_default to read and write to proc_touchpanel 22 | allow hal_fingerprint_default proc_touchpanel:dir search; 23 | allow hal_fingerprint_default proc_touchpanel:file rw_file_perms; 24 | 25 | # Allow hal_fingerprint_default access to sysfs nodes 26 | allow hal_fingerprint_default sysfs_fod:file rw_file_perms; 27 | allow hal_fingerprint_default sysfs_aod:file r_file_perms; 28 | 29 | # Allow hal_fingerprint_default to get vendor_adsprpc_prop 30 | get_prop(hal_fingerprint_default, vendor_adsprpc_prop) 31 | -------------------------------------------------------------------------------- /livedisplay/include/livedisplay/oneplus/SunlightEnhancement.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019-2022 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | namespace vendor { 24 | namespace lineage { 25 | namespace livedisplay { 26 | namespace V2_1 { 27 | namespace implementation { 28 | 29 | using ::android::hardware::Return; 30 | using ::android::hardware::Void; 31 | using ::android::sp; 32 | 33 | class SunlightEnhancement : public ISunlightEnhancement { 34 | public: 35 | // Methods from ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement follow. 36 | Return isEnabled() override; 37 | Return setEnabled(bool enabled) override; 38 | }; 39 | 40 | } // namespace implementation 41 | } // namespace V2_1 42 | } // namespace livedisplay 43 | } // namespace lineage 44 | } // namespace vendor 45 | -------------------------------------------------------------------------------- /wifi-mac-generator/wifi-mac-generator.sh: -------------------------------------------------------------------------------- 1 | #!/vendor/bin/sh 2 | WLAN_MAC_VENDOR_PREFIX="C0EEFB" 3 | WLAN_MAC_PERSIST_PATH="/mnt/vendor/persist/wlan_mac.bin" 4 | 5 | function wait_for_file() { 6 | retries=0 7 | 8 | while [ ! -f "${1}" ]; do 9 | retries=$((retries + 1)) 10 | 11 | if [ "${retries}" -eq 10 ]; then 12 | return 1 13 | fi 14 | 15 | sleep 1 16 | done 17 | 18 | return 0 19 | } 20 | 21 | if [[ ! -f "${WLAN_MAC_PERSIST_PATH}" ]] || [[ ! -s "${WLAN_MAC_PERSIST_PATH}" ]]; then 22 | MAC_0_PATH="/data/vendor/oemnvitems/4678_0" 23 | 24 | if ! wait_for_file "${MAC_0_PATH}"; then 25 | MAC_0="${WLAN_MAC_VENDOR_PREFIX}`xxd -l 3 -p /dev/urandom | tr '[:lower:]' '[:upper:]'`" 26 | else 27 | MAC_0=`xxd -p "${MAC_0_PATH}" | grep -o '..' | tac | tr -d '\n' | tr '[:lower:]' '[:upper:]'` 28 | fi 29 | 30 | MAC_1_PATH="/data/vendor/oemnvitems/4678_1" 31 | 32 | if ! wait_for_file "${MAC_1_PATH}"; then 33 | MAC_1="${WLAN_MAC_VENDOR_PREFIX}`xxd -l 3 -p /dev/urandom | tr '[:lower:]' '[:upper:]'`" 34 | else 35 | MAC_1=`xxd -p "${MAC_1_PATH}" | grep -o '..' | tac | tr -d '\n' | tr '[:lower:]' '[:upper:]'` 36 | fi 37 | 38 | echo "Intf0MacAddress=${MAC_0}" > "${WLAN_MAC_PERSIST_PATH}" 39 | echo "Intf1MacAddress=${MAC_1}" >> "${WLAN_MAC_PERSIST_PATH}" 40 | echo "Intf2MacAddress=000AF58989FD" >> "${WLAN_MAC_PERSIST_PATH}" 41 | echo "Intf3MacAddress=000AF58989FC" >> "${WLAN_MAC_PERSIST_PATH}" 42 | echo "END" >> "${WLAN_MAC_PERSIST_PATH}" 43 | fi 44 | -------------------------------------------------------------------------------- /camera_helper/res/values-th/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | ปิด 19 | ยกกล้องขึ้น 20 | ลองอีกครั้ง 21 | คำเตือน 22 | พบการตกอิสระ 23 | กล้องหน้าถูกดึงกลับเพื่อที่จะป้องกันการชำรุด คุณต้องการใช้กล้องหน้าอีกครั้งหรือไม่ 24 | กล้องหน้าไม่สามารถดึงกลับได้โปรดตรวจสอบให้แน่ใจว่าไม่มีสิ่งกีดขวาง 25 | กล้องหน้าไม่สามารถแสดงขึ้นมาได้โปรดตรวจสอบให้แน่ใจว่าไม่มีสิ่งกีดขวาง 26 | การกดกล้องหน้าลงไปอาจทำให้มอเตอร์เสียหายได้ โปรดหลีกเลี่ยงการทำเช่นนั้น 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-ast-rES/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Zarrar 19 | Xubir la cámara 20 | Retentar 21 | Alvertencia 22 | Cayida llibre detectada 23 | Guardóse la cámara d\'alantre pa protexela. ¿Quies volver usala? 24 | Nun se pue guardar la cámara d\'alantre, asegúrate de que nun ta torgada 25 | Nun se pue sacar la cámara d\'alantre, asegúrate de que nun ta torgada 26 | Primir na cámara d\'alantre pue dañar el so motor. Evita facelo. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-fi/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Sulje 19 | Nosta kamera 20 | Yritä uudelleen 21 | Varoitus 22 | Vapaapudotus havaittu 23 | Etukamera on laskettu suojaakseen sitä. Haluaisitko käyttää sitä uudelleen? 24 | Etukameraa ei voida vetää sisään, varmista että esteitä ei ole. 25 | Etukameraa ei voida nostaa, varmista että tiellä ei ole esteitä. 26 | Painamalla etukameran alas voit vahingoittaa moottoria. Vältä tekemästä sitä. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-ar/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | إغلاق 19 | ارفع الكاميرا 20 | إعادة المحاولة 21 | تحذير 22 | تم الكشف عن سقوط حر 23 | تم خفض الكاميرا الأمامية من أجل حمايتها. هل ترغب في استخدام الكاميرا الأمامية مرة أخرى؟ 24 | لا يمكن سحب الكاميرا الأمامية، يرجى التأكد من عدم وجود عوائق 25 | لا تستطيع الكاميرا الأمامية الظهور، يرجى التأكد من عدم وجود عوائق 26 | قد يؤدي الضغط على الكاميرا الأمامية إلى إتلاف المحرك. يرجى تجنب القيام بذلك. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-cy/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Cau 19 | Codi\'r camera 20 | Ceisio eto 21 | Rhybudd 22 | Synhwyrwyd syrthio/cwympo 23 | Gostyngwyd y camera blaen er mwyn ei warchod. Hoffet ddefnyddio\'r camera blaen eto? 24 | Ni all y camera blaen tynnu\'n ôl. Sicrha nad oes unrhyw rwystr. 25 | Ni all y camera blaen codi allan. Sicrha nad oes unrhyw rwystr. 26 | Gall wthio\'r camera blaen i lawr achosi difrod i\'r motor. Paid â gwneud! 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-ka/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | დახურვა 19 | კამერის ამოწევა 20 | გამეორება 21 | გაფრთხილება 22 | შემჩნეულია თავისუფალი ვარდნა 23 | წინა კამერა დაწეულია უსაფრთხოებისთვის. გსურთ, მისი კვლავ გამოყენება? 24 | წინა კამერა ვერ ჩადის, გთხოვთ გადაამოწმოთ, რამე ხომ არ აბრკოლებს 25 | წინა კამერა ვერ ამოდის, გთხოვთ გადაამოწმოთ, რამე ხომ არ აბრკოლებს 26 | წინა კამერაზე დაწოლამ, შესაძლოა დააზიანოს ძრავა. გთხოვთ, აირიდოთ მსგავსი რამ. 27 | 28 | -------------------------------------------------------------------------------- /system.prop: -------------------------------------------------------------------------------- 1 | # Audio 2 | persist.vendor.audio.hac.enable=false 3 | ro.audio.monitorRotation=true 4 | 5 | # Bluetooth 6 | bt.max.hfpclient.connections=1 7 | vendor.bluetooth.soc=cherokee 8 | 9 | # CNE 10 | persist.vendor.cne.feature=1 11 | 12 | # CoreSight STM 13 | persist.debug.coresight.config=stm-events 14 | 15 | # GPS 16 | persist.vendor.overlay.izat.optin=rro 17 | 18 | # Graphics 19 | debug.sf.enable_hwc_vds=1 20 | vendor.display.enable_rotator_ui=1 21 | 22 | # IO Prefetcher 23 | vendor.iop.enable_uxe=1 24 | 25 | # Media 26 | av.offload.enable=true 27 | media.settings.xml=/vendor/etc/media_profiles_vendor.xml 28 | vendor.swvdec.log.level=1 29 | vendor.vidc.debug.level=1 30 | 31 | # Memory optimizations 32 | ro.vendor.qti.sys.fw.bservice_age=5000 33 | ro.vendor.qti.sys.fw.bservice_enable=true 34 | ro.vendor.qti.sys.fw.bservice_limit=8 35 | 36 | # Netflix 37 | ro.netflix.bsp_rev=Q855-16947-1 38 | 39 | # OnePlus 40 | ro.vendor.product.manufacturer.db=OP_PHONE 41 | ro.vendor.product.device.db=OP_DEVICE 42 | 43 | # Perf 44 | ro.vendor.qti.sys.fw.bg_apps_limit=60 45 | 46 | # Radio 47 | DEVICE_PROVISIONED=1 48 | persist.vendor.data.mode=concurrent 49 | ril.subscription.types=NV,RUIM 50 | ro.telephony.default_network=22,22 51 | ro.vendor.use_data_netmgrd=true 52 | telephony.lteOnCdmaDevice=1,1 53 | 54 | # RCS 55 | persist.rcs.supported=0 56 | 57 | # Sensors 58 | persist.vendor.naruto.light.support=true 59 | persist.vendor.sensors.enable.mag_filter=true 60 | 61 | # WiFi 62 | config.disable_rtt=true 63 | 64 | # WiFi Display 65 | persist.debug.wfd.enable=1 66 | persist.sys.wfd.virtual=0 67 | -------------------------------------------------------------------------------- /camera_helper/res/values-pl/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Zamknij 19 | Wysuń aparat 20 | Ponów 21 | Ostrzeżenie 22 | Wykryto upadek 23 | Przedni aparat został schowany w celu jego ochrony. Czy chcesz użyć aparatu ponownie? 24 | Nie można schować przedniego aparatu. Upewnij się, że nic go nie blokuje 25 | Nie można wysunąć przedniego aparatu. Upewnij się, że nic go nie blokuje 26 | Wciskanie przedniego aparatu może uszkodzić mechanizm. Proszę tego nie robić. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-tr/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Kapat 19 | Kamerayı çıkart 20 | Tekrar dene 21 | Uyarı 22 | Serbest düşme tespit edildi 23 | Koruma amaçlı öne bakan kamera indirildi. Ön kamerayı tekrar kullanmak ister misiniz? 24 | Öne bakan kamera geri çekilemez, lütfen bir engel olmadığından emin olun 25 | Öne bakan kamera açılmıyor, lütfen engel olmadığından emin olun 26 | Öne bakan kameraya bastırmak, motora zarar verebilir. Lütfen bunu yapmaktan kaçının. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-fr/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Fermer 19 | Déployer la caméra 20 | Réessayer 21 | Attention 22 | Chute libre détectée 23 | La caméra avant a été repliée par mesure de protection. Voulez-vous l\'utiliser à nouveau ? 24 | La caméra avant ne peut être repliée, vérifiez l\'absence de blocage 25 | La caméra avant ne peut être déployée, vérifiez l\'absence de blocage 26 | Appuyer sur la caméra avant peut abîmer le mécanisme. Évitez d\'appuyer dessus. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-fy-rNL/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Slute 19 | Kamera omheech 20 | Opnij 21 | Warskôging 22 | Frije fal detektearre 23 | De frontkamera waard ynlûkt om him te beskermjen. Wolle jo de frontkamera wer brûke? 24 | De frontkamera kin net ynlutsen wurde, soargje derfoar dat der gjin obstakels binne 25 | De frontkamera kin net útlûkt wurde, soargje derfoar dat der gjin obstakels binne 26 | It yndrukken fan de frontkamera kin de motor skansearje. Mij dit. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-gl/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Pechar 19 | Subir a cámara 20 | Tentar de novo 21 | Atención 22 | Caída libre detectada 23 | Ocultouse a cámara frontal para protexela. Queres empregala de novo? 24 | Non é posíbel ocultar a cámara frontal, por favor verifica que non hai nada obstruíndoa 25 | Non é posíbel abrir a cámara frontal, por favor verifica que non hai nada obstruíndoa 26 | Premer a cámara frontal pode danar o motor, por favor non o fagas. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-et/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Sulge 19 | Tõsta kaamerat 20 | Proovi uuesti 21 | Hoiatus 22 | Kukkumine tuvastatud 23 | Esikaamera on selle kaitsmiseks alandatud. Kas soovite uuesti esikaamerat kasutada? 24 | Esikaamera ei saa tagasi tõmbuda, palun veenduge et miski seda ei takistaks 25 | Esikaamera ei saa üles tulla, palun veenduge et miski seda ei takistaks 26 | Esikaamera allasurumine võib selle mootorit kahjustada. Palun vältige kaamera surumist. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-az/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Bağla 19 | Kameranı qaldır 20 | Yenidən sına 21 | Xəbərdarlıq 22 | Sərbəst düşmə aşkarlandı 23 | Qorumaq məqsədilə ön kamera endirildi. Ön kameranı yenidən istifadə etmək istəyirsiniz? 24 | Ön kamera geri götürülə bilmədi, zəhmət olmasa heç bir maneə olmadığına əmin olun 25 | Ön kamera açıla bilmədi, zəhmət olmasa heç bir maneə olmadığına əmin olun 26 | Ön kameraya basmaq, mühərriki zədələyə bilər. Zəhmət olmasa bunu etməyin. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-sq/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Mbyll 19 | Nxirr kamerën 20 | Provo përsëri 21 | Paralajmërim 22 | U kap një rrënie e lirë 23 | Kamera përpara u ul për ta mbrojtur atë. Dëshiron të përdorësh sërish kamerën përpara? 24 | Kamera përballë nuk po tërhiqet, ju lutem sigurohuni që nuk ka pengesa 25 | Kamera përballë nuk mund të dalë, ju lutem sigurohuni që nuk ka pengesa 26 | Futja me forcë e kamerës para mund të dëmtojë motorin. Ju lutem mos e beni këtë veprim. 27 | 28 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 22 | 24 | 25 | 26 | org.codeaurora.ims 27 | 28 | 29 | org.codeaurora.ims 30 | 31 | -------------------------------------------------------------------------------- /camera_helper/res/values-bg/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Затвори 19 | Повдигане на камерата 20 | Повтори 21 | Внимание 22 | Открито е свободно падане 23 | Предната камера беше спусната, за да я защити. Искате ли да използвате предната камера отново? 24 | Предната камера не може да се прибере, моля уверете се, че няма препятствия 25 | Предната камера не може да се покоже, моля уверете се, че няма препятствия 26 | Натискането на предната камера може да повреди двигателя. Моля, избягвайте това. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-ca/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Tanca 19 | Aixeca la càmera 20 | Torna-ho a provar 21 | Advertència 22 | Caiguda lliure detectada 23 | La càmera frontal s\'ha baixat per protegir-la. Us agradaria tornar a fer servir la càmera frontal? 24 | La càmera frontal no es pot retreure, assegureu-vos que no hi hagi cap obstacle 25 | La càmera frontal no es pot obrir, assegureu-vos que no hi hagi cap obstacle 26 | Pressionar la càmera frontal pot danyar el motor. Eviteu fer-ho. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-en-rAU/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Close 19 | Raise the camera 20 | Retry 21 | Warning 22 | Free fall detected 23 | Front facing camera has been lowered in order to protect it. Would you like to use front camera again? 24 | The front facing camera cannot retract, please ensure there is no obstruction 25 | The front facing camera cannot pop up, please ensure there is no obstruction 26 | Pressing down the front facing camera can damage the motor. Please avoid doing so. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-en-rCA/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Close 19 | Raise the camera 20 | Retry 21 | Warning 22 | Free fall detected 23 | Front facing camera has been lowered in order to protect it. Would you like to use front camera again? 24 | The front facing camera cannot retract, please ensure there is no obstruction 25 | The front facing camera cannot pop up, please ensure there is no obstruction 26 | Pressing down the front facing camera can damage the motor. Please avoid doing so. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-en-rGB/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Close 19 | Raise the camera 20 | Retry 21 | Warning 22 | Free fall detected 23 | Front facing camera has been lowered in order to protect it. Would you like to use front camera again? 24 | The front facing camera cannot retract, please ensure there is no obstruction 25 | The front facing camera cannot pop up, please ensure there is no obstruction 26 | Pressing down the front facing camera can damage the motor. Please avoid doing so. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-en-rIN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Close 19 | Raise the camera 20 | Retry 21 | Warning 22 | Free fall detected 23 | Front facing camera has been lowered in order to protect it. Would you like to use front camera again? 24 | The front facing camera cannot retract, please ensure there is no obstruction 25 | The front facing camera cannot pop up, please ensure there is no obstruction 26 | Pressing down the front facing camera can damage the motor. Please avoid doing so. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-sl/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Zapri 19 | Privzdigni fotoaparat 20 | Poskusi znova 21 | Opozorilo 22 | Zaznan prosti pad 23 | Sprednji fotoaparat je bil spuščen z namenom, da se ga zaščiti. Želite ponovno uporabiti sprednji fotoaparat? 24 | Sprednjega fotoaparata ni mogoče spustiti, prepričajte se, da ni ovire 25 | Sprednjega fotoaparata ni mogoče privzdigniti, prepričajte se, da ni ovire 26 | Pritisk na sprednji fotoaparat lahko poškoduje motor. Izogibajte se temu. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-es/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Cerrar 19 | Elevar la cámara 20 | Reintentar 21 | Advertencia 22 | Caída libre detectada 23 | Se ha bajado la cámara frontal para protegerla. ¿Quiere usar la cámara frontal de nuevo? 24 | No se puede retraer la cámara frontal, por favor, asegúrate de que no hay obstrucción 25 | No se puede sacar la cámara frontal, por favor, asegúrate de que no hay obstrucción 26 | Presionar la cámara frontal puede dañar el motor. Por favor, evite hacerlo. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-nl/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Sluiten 19 | Camera omhoog 20 | Opnieuw 21 | Let op 22 | Vrije val gedetecteerd 23 | De frontcamera werd ingeschoven om hem te beschermen. Wil je de frontcamera weer gebruiken? 24 | De frontcamera kan niet worden ingetrokken, zorg ervoor dat er geen obstakels zijn 25 | De frontcamera kan niet worden uitgeschoven, zorg ervoor dat er geen obstakels zijn 26 | Het indrukken van de frontcamera kan de motor beschadigen. Vermijd dit alsjeblieft. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-cs/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Zavřít 19 | Vysunout fotoaparát 20 | Opakovat 21 | Varování 22 | Zjištěný pád 23 | Čelní fotoaparát byl zasunut z důvodu jeho ochrany. Přejete si jej znovu použít? 24 | Čelní fotoaparát nelze zasunout. Ujistěte se, že zasunutí nebrání mechanická překážka 25 | Čelní fotoaparát nelze vysunout. Ujistěte se, že vysunutí nebrání mechanická překážka 26 | Stlačováním modulu čelního fotoaparátu může dojít k poškození motorku. Vyvarujte se toho, prosím. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-pt-rPT/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Fechar 19 | Subir a câmara 20 | Tentar novamente 21 | Aviso 22 | Queda livre detetada 23 | A câmara frontal foi baixada para a proteger. Gostaria de usar a câmara frontal novamente? 24 | A câmara frontal não consegue baixar. Por favor, certifique-se de que não há obstrução 25 | A câmara frontal não consegue subir. Por favor, certifique-se de que não há obstrução 26 | Pressionar a câmara frontal pode danificar o motor. Por favor, evite fazê-lo. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-pt-rBR/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Fechar 19 | Acessar a câmera 20 | Tentar novamente 21 | Aviso 22 | Queda livre detectada 23 | A câmera frontal foi retraída para protegê-la. Gostaria de usar a câmera frontal novamente? 24 | A câmera frontal não pôde ser retraída. Por favor, certifique-se de que não há obstruções. 25 | A câmera frontal não pôde ser ejetada. Por favor, certifique-se de que não há obstruções. 26 | Pressionar a câmera frontal pode danificar o motor. Por favor, evite fazê-lo. 27 | 28 | -------------------------------------------------------------------------------- /touch/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "vendor.lineage.touch@1.0-service.oneplus" 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | using ::vendor::lineage::touch::V1_0::ITouchscreenGesture; 25 | using ::vendor::lineage::touch::V1_0::implementation::TouchscreenGesture; 26 | 27 | int main() { 28 | android::sp gestureService = new TouchscreenGesture(); 29 | 30 | android::hardware::configureRpcThreadpool(1, true /*callerWillJoin*/); 31 | 32 | if (gestureService->registerAsService() != android::OK) { 33 | LOG(ERROR) << "Cannot register touchscreen gesture HAL service."; 34 | return 1; 35 | } 36 | 37 | LOG(INFO) << "Touchscreen HAL service ready."; 38 | 39 | android::hardware::joinRpcThreadpool(); 40 | 41 | LOG(ERROR) << "Touchscreen HAL service failed to join thread pool."; 42 | return 1; 43 | } 44 | -------------------------------------------------------------------------------- /camera_helper/res/values-ro/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Închide 19 | Ridicare cameră 20 | Reîncercați 21 | Atenție 22 | Cădere liberă detectată 23 | Camera frontală a fost ascunsă pentru a fi protejată. Ați dori să o utilizați din nou? 24 | Camera frontală nu s-a putut retrage, vă rugăm să vă asigurați că nu este nicio obstrucție 25 | Camera frontală nu a putut fi ridicată, vă rugăm să vă asigurați că nu este nicio obstrucție 26 | Apăsarea pe camera frontală poate distruge motorul. Vă rugăm să evitați să faceți acest lucru. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-ru/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Закрыть 19 | Поднять камеру 20 | Повторить 21 | Предупреждение 22 | Обнаружено свободное падение 23 | Фронтальная камера была опущена для ее защиты. Хотите снова использовать фронтальную камеру? 24 | Невозможно убрать фронтальную камеру. Пожалуйста, убедитесь, что нет препятствий 25 | Невозможно выдвинуть фронтальную камеру. Пожалуйста, убедитесь, что нет препятствий 26 | Нажатие на фронтальную камеру может привести к повреждению двигателя. Пожалуйста, избегайте этого. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-sk/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Zavrieť 19 | Vysunúť fotoaparát 20 | Skúsiť znovu 21 | Varovanie 22 | Zistený voľný pád 23 | Predný fotoaparát bol zasunutý, aby sa nepoškodil. Prajete si ho znova použiť? 24 | Predný fotoaparát sa nemôže zasunúť. Prosím skontrolujte, či zasunutiu nebráni mechanická prekážka 25 | Predný fotoaparát sa nemôže vysunúť, prosím skontrolujte, či vysunutiu nebráni mechanická prekážka 26 | Tlačením mechanizmu predného fotoaparátu môžete poškodiť motor. Prosím vyvarujte sa toho. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-de/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Schließen 19 | Kamera ausfahren 20 | Wiederholen 21 | Warnung 22 | Sturz erkannt 23 | Frontkamera wurde eingefahren, um sie zu schützen. Möchtest du die Frontkamera erneut verwenden? 24 | Die Frontkamera kann nicht eingefahren werden, bitte stelle sicher, dass keine Hindernisse vorhanden sind 25 | Die Frontkamera kann nicht ausfahren, bitte stelle sicher, dass keine Hindernisse vorhanden sind 26 | Das Herunterdrücken der Frontkamera kann den Motor beschädigen. Bitte vermeide dies. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-it/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Chiudi 19 | Solleva la camera 20 | Riprova 21 | Attenzione 22 | Caduta rilevata 23 | La fotocamera frontale è stata abbassata per proteggerla. Vuoi usare nuovamente la fotocamera frontale? 24 | La fotocamera frontale non riesce a ritrarsi, assicurati che non ci sia alcuna ostruzione 25 | La fotocamera frontale non riesce a sollevarsi, assicurati che non ci sia alcuna ostruzione 26 | Tenere premuta la fotocamera frontale può danneggiare il motorino. Si prega di evitare di farlo. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-hu/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Bezárás 19 | Kameraemelés 20 | Próbálja újra 21 | Figyelmeztetés 22 | Érzékelt szabadesés 23 | Az előlapi kamera eltakarásra került annak védelme érdekében. Szeretné újra használni az előlapi kamerát? 24 | Ha a kamera nem képes magától visszahúzódni, kérjük, ellenőrizze nem akadályozza-e valami 25 | Ha a kamera nem képes magától felnyílni, kérjük, ellenőrizze nem akadályozza-e valami 26 | A kamera motorját tönkreteheti a kamera mechanikus lenyomása. Kérjük, ne nyomja be kézzel a kamerát. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-el/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Κλείσιμο 19 | Ανύψωση κάμερας 20 | Επανάληψη 21 | Προσοχή 22 | Εντοπίστηκε ελεύθερη πτώση 23 | Η μπροστινή κάμερα έχει αποσυρθεί για να προστατευθεί. Θα θέλατε να χρησιμοποιήσετε ξανά την μπροστινή κάμερα; 24 | Η μπροστινή κάμερα δεν μπορεί να αποσυρθεί, βεβαιωθείτε ότι δεν υπάρχει εμπόδιο 25 | Η μπροστινή κάμερα δεν μπορεί να ανυψωθεί, βεβαιωθείτε ότι δεν υπάρχει εμπόδιο 26 | Μπορεί να προκληθεί βλάβη εάν ασκείτε πίεση προς τα κάτω στην μπροστινή κάμερα. Παρακαλώ αποφύγετε να το κάνετε αυτό. 27 | 28 | -------------------------------------------------------------------------------- /camera_helper/res/values-gd/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Dùin 19 | Tog an camara 20 | Feuch ris a-rithist 21 | Rabhadh 22 | Mhothaich sinn do thuiteam saor 23 | Chaidh camara a’ bheulaibh ìsleachadh gus a dhìon. A bheil thu airson camara a’ bheulaibh a chleachdadh a-rithist? 24 | Cha ghabh camara a’ bheulaibh a tharraing a-steach, dèan cinnteach nach eil dad ’ga bhacadh 25 | Cha ghabh camara a’ bheulaibh a shìneadh a-mach, dèan cinnteach nach eil dad ’ga bhacadh 26 | Ma nì thu brùthadh air camara a’ bheulaibh, nì sin cron air a’ mhotar. Na dèan seo. 27 | 28 | -------------------------------------------------------------------------------- /sensors/include/AsyncScreenCaptureListener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2022 Project Kaleidoscope 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | namespace android { 23 | 24 | using gui::ScreenCaptureResults; 25 | 26 | typedef std::function CaptureCallback; 27 | 28 | struct AsyncScreenCaptureListener : gui::BnScreenCaptureListener { 29 | public: 30 | AsyncScreenCaptureListener(CaptureCallback callback, int timeout) 31 | : callback(callback), timeout(timeout) {} 32 | 33 | binder::Status onScreenCaptureCompleted(const ScreenCaptureResults& captureResults) override { 34 | if (captureResults.fenceResult.ok()) { 35 | if (captureResults.fenceResult.value()->wait(timeout) == OK) { 36 | callback(captureResults); 37 | } 38 | } 39 | return binder::Status::ok(); 40 | } 41 | 42 | private: 43 | CaptureCallback callback; 44 | int timeout; 45 | }; 46 | 47 | } // namespace android 48 | -------------------------------------------------------------------------------- /livedisplay/AntiFlicker.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "AntiFlickerService" 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | namespace vendor { 24 | namespace lineage { 25 | namespace livedisplay { 26 | namespace V2_1 { 27 | namespace implementation { 28 | 29 | static constexpr const char* kDcDimmingPath = 30 | "/sys/class/drm/card0-DSI-1/dimlayer_bl_en"; 31 | 32 | Return AntiFlicker::isEnabled() { 33 | std::ifstream file(kDcDimmingPath); 34 | int result = -1; 35 | file >> result; 36 | LOG(DEBUG) << "Got result " << result << " fail " << file.fail(); 37 | return !file.fail() && result > 0; 38 | } 39 | 40 | Return AntiFlicker::setEnabled(bool enabled) { 41 | std::ofstream file(kDcDimmingPath); 42 | file << (enabled ? "1" : "0"); 43 | LOG(DEBUG) << "setEnabled fail " << file.fail(); 44 | return !file.fail(); 45 | } 46 | 47 | } // namespace implementation 48 | } // namespace V2_1 49 | } // namespace livedisplay 50 | } // namespace lineage 51 | } // namespace vendor 52 | -------------------------------------------------------------------------------- /livedisplay/SunlightEnhancement.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019-2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "SunlightEnhancementService" 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | namespace vendor { 24 | namespace lineage { 25 | namespace livedisplay { 26 | namespace V2_1 { 27 | namespace implementation { 28 | 29 | static constexpr const char* kHbmPath = 30 | "/sys/class/drm/card0-DSI-1/hbm"; 31 | 32 | Return SunlightEnhancement::isEnabled() { 33 | std::ifstream file(kHbmPath); 34 | int result = -1; 35 | file >> result; 36 | LOG(DEBUG) << "Got result " << result << " fail " << file.fail(); 37 | return !file.fail() && result > 0; 38 | } 39 | 40 | Return SunlightEnhancement::setEnabled(bool enabled) { 41 | std::ofstream file(kHbmPath); 42 | file << (enabled ? "5" : "0"); 43 | LOG(DEBUG) << "setEnabled fail " << file.fail(); 44 | return !file.fail(); 45 | } 46 | 47 | } // namespace implementation 48 | } // namespace V2_1 49 | } // namespace livedisplay 50 | } // namespace lineage 51 | } // namespace vendor 52 | -------------------------------------------------------------------------------- /keylayout/gpio-keys.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | key 115 VOLUME_UP 29 | key 114 VOLUME_DOWN 30 | key 102 HOME 31 | key 528 FOCUS 32 | key 766 CAMERA 33 | -------------------------------------------------------------------------------- /configs/msm_irqbalance.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # 28 | # 29 | 30 | PRIO=1,1,1,1,0,0,0,0 31 | #arch_timer, arm-pmu, arch_mem_timer, msm_drm, kgsl-3d0 32 | IGNORED_IRQ=19,21,38,115,332 33 | -------------------------------------------------------------------------------- /rootdir/etc/init.qti.ufs.rc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011-2016, 2018-2020 The Linux Foundation. All rights reserved. 2 | # # 3 | # # Redistribution and use in source and binary forms, with or without 4 | # # modification, are permitted provided that the following conditions are 5 | # # met: 6 | # # * Redistributions of source code must retain the above copyright 7 | # # notice, this list of conditions and the following disclaimer. 8 | # # * Redistributions in binary form must reproduce the above 9 | # # copyright notice, this list of conditions and the following 10 | # # disclaimer in the documentation and/or other materials provided 11 | # # with the distribution. 12 | # # * Neither the name of The Linux Foundation nor the names of its 13 | # # contributors may be used to endorse or promote products derived 14 | # # from this software without specific prior written permission. 15 | # # 16 | # # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # 28 | 29 | on init 30 | exec u:r:vendor-qti-testscripts:s0 -- /vendor/bin/sh /vendor/bin/init.qti.ufs.debug.sh 31 | -------------------------------------------------------------------------------- /vibrator/vendor.qti.hardware.vibrator.service.oneplus.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.vibrator 31 | IVibrator/default 32 | 33 | 34 | -------------------------------------------------------------------------------- /rootdir/bin/init.mdm.sh: -------------------------------------------------------------------------------- 1 | #! /vendor/bin/sh 2 | 3 | # Copyright (c) 2013, The Linux Foundation. All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # * Neither the name of Linux Foundation nor 13 | # the names of its contributors may be used to endorse or promote 14 | # products derived from this software without specific prior written 15 | # permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 21 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 27 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | 30 | baseband=`getprop ro.baseband` 31 | if [ "$baseband" = "mdm" ] || [ "$baseband" = "mdm2" ]; then 32 | start vendor.mdm_helper 33 | fi 34 | 35 | -------------------------------------------------------------------------------- /rootdir/bin/init.qcom.efs.sync.sh: -------------------------------------------------------------------------------- 1 | #! /vendor/bin/sh 2 | 3 | # Copyright (c) 2012, The Linux Foundation. All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are 7 | # met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above 11 | # copyright notice, this list of conditions and the following 12 | # disclaimer in the documentation and/or other materials provided 13 | # with the distribution. 14 | # * Neither the name of The Linux Foundation nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 19 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 25 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 27 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 28 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | # 31 | 32 | PATH=/system/bin:$PATH 33 | export PATH 34 | cat /sys/devices/platform/rs300000a7.65536/force_sync 35 | cat /sys/devices/platform/rs300100a7.65536/force_sync 36 | -------------------------------------------------------------------------------- /keylayout/gf_input.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012, 2014 The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | key 102 HOME 29 | key 116 POWER 30 | key 60 F2 31 | key 305 F3 32 | key 103 SYSTEM_NAVIGATION_UP 33 | key 105 SYSTEM_NAVIGATION_LEFT 34 | key 106 SYSTEM_NAVIGATION_RIGHT 35 | key 108 SYSTEM_NAVIGATION_DOWN -------------------------------------------------------------------------------- /rootdir/bin/init.crda.sh: -------------------------------------------------------------------------------- 1 | #! /vendor/bin/sh 2 | 3 | # Copyright (c) 2012, The Linux Foundation. All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # * Neither the name of The Linux Foundation nor 13 | # the names of its contributors may be used to endorse or promote 14 | # products derived from this software without specific prior written 15 | # permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 21 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 27 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | 30 | country=`getprop wlan.crda.country` 31 | # crda takes input in COUNTRY environment variable 32 | if [ $country != "" ] 33 | then 34 | COUNTRY="$country" /system/bin/crda 35 | fi 36 | -------------------------------------------------------------------------------- /rootdir/bin/init.qcom.sensors.sh: -------------------------------------------------------------------------------- 1 | #!/vendor/bin/sh 2 | # Copyright (c) 2020 The Linux Foundation. All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above copyright 9 | # notice, this list of conditions and the following disclaimer in the 10 | # documentation and/or other materials provided with the distribution. 11 | # * Neither the name of The Linux Foundation nor 12 | # the names of its contributors may be used to endorse or promote 13 | # products derived from this software without specific prior written 14 | # permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 20 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # 28 | 29 | # 30 | # Function to start sensors for SSC enabled platforms 31 | # 32 | cp /vendor/etc/sensors/scripts/* /data/vendor/sensors/scripts/ 33 | chmod a+rw /data/vendor/sensors/scripts/* 34 | -------------------------------------------------------------------------------- /fingerprint/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "android.hardware.biometrics.fingerprint@2.3-service" 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include "BiometricsFingerprint.h" 25 | 26 | using android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint; 27 | using android::hardware::biometrics::fingerprint::V2_3::implementation::BiometricsFingerprint; 28 | using android::hardware::configureRpcThreadpool; 29 | using android::hardware::joinRpcThreadpool; 30 | using android::sp; 31 | 32 | int main() { 33 | android::sp bio = BiometricsFingerprint::getInstance(); 34 | 35 | android::hardware::setMinSchedulerPolicy(bio, SCHED_RR, -20); 36 | configureRpcThreadpool(1, true /*callerWillJoin*/); 37 | 38 | if (bio != nullptr) { 39 | if (::android::OK != bio->registerAsService()) { 40 | return 1; 41 | } 42 | } else { 43 | ALOGE("Can't create instance of BiometricsFingerprint, nullptr"); 44 | } 45 | 46 | joinRpcThreadpool(); 47 | 48 | return 0; // should never get here 49 | } 50 | -------------------------------------------------------------------------------- /touch/include/touch/oneplus/TouchscreenGestureConfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef TOUCH_ONEPLUS_TOUCHSCREENGESTURECONFIG_H 18 | #define TOUCH_ONEPLUS_TOUCHSCREENGESTURECONFIG_H 19 | 20 | #include 21 | 22 | #include "TouchscreenGesture.h" 23 | 24 | namespace vendor { 25 | namespace lineage { 26 | namespace touch { 27 | namespace V1_0 { 28 | namespace implementation { 29 | 30 | const std::map kGestureInfoMap = { 31 | {0, {251, "Two fingers down swipe", "/proc/touchpanel/double_swipe_enable"}}, 32 | {1, {252, "Down arrow", "/proc/touchpanel/down_arrow_enable"}}, 33 | {2, {253, "Left arrow", "/proc/touchpanel/left_arrow_enable"}}, 34 | {3, {254, "Right arrow", "/proc/touchpanel/right_arrow_enable"}}, 35 | {4, {247, "Letter M", "/proc/touchpanel/letter_m_enable"}}, 36 | {5, {250, "Letter O", "/proc/touchpanel/letter_o_enable"}}, 37 | {6, {248, "Letter S", "/proc/touchpanel/letter_s_enable"}}, 38 | {7, {246, "Letter W", "/proc/touchpanel/letter_w_enable"}}, 39 | {8, {255, "Single Tap", "/proc/touchpanel/single_tap_enable"}}, 40 | }; 41 | 42 | } // namespace implementation 43 | } // namespace V1_0 44 | } // namespace touch 45 | } // namespace lineage 46 | } // namespace vendor 47 | 48 | #endif // TOUCH_ONEPLUS_TOUCHSCREENGESTURECONFIG_H 49 | -------------------------------------------------------------------------------- /touch/include/touch/oneplus/TouchscreenGesture.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019-2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef TOUCH_ONEPLUS_TOUCHSCREENGESTURE_H 18 | #define TOUCH_ONEPLUS_TOUCHSCREENGESTURE_H 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | namespace vendor { 26 | namespace lineage { 27 | namespace touch { 28 | namespace V1_0 { 29 | namespace implementation { 30 | 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | using ::android::sp; 34 | 35 | class TouchscreenGesture : public ITouchscreenGesture { 36 | public: 37 | // Methods from ::vendor::lineage::touch::V1_0::ITouchscreenGesture follow. 38 | Return getSupportedGestures(getSupportedGestures_cb resultCb) override; 39 | Return setGestureEnabled(const ::vendor::lineage::touch::V1_0::Gesture& gesture, 40 | bool enabled) override; 41 | 42 | typedef struct { 43 | int32_t keycode; 44 | const char* name; 45 | const char* path; 46 | } GestureInfo; 47 | }; 48 | 49 | } // namespace implementation 50 | } // namespace V1_0 51 | } // namespace touch 52 | } // namespace lineage 53 | } // namespace vendor 54 | 55 | #endif // VENDOR_LINEAGE_TOUCH_V1_0_TOUCHSCREENGESTURE_H 56 | -------------------------------------------------------------------------------- /KeyHandler/res/xml/button_panel.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 10 | 15 | 16 | 24 | 25 | 33 | 34 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /livedisplay/DisplayModes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_1_DISPLAYMODES_H 8 | #define VENDOR_LINEAGE_LIVEDISPLAY_V2_1_DISPLAYMODES_H 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | namespace vendor { 17 | namespace lineage { 18 | namespace livedisplay { 19 | namespace V2_1 { 20 | namespace implementation { 21 | 22 | using ::android::hardware::Return; 23 | using ::android::hardware::Void; 24 | using ::android::sp; 25 | 26 | class DisplayModes : public IDisplayModes { 27 | public: 28 | DisplayModes(std::shared_ptr controller); 29 | 30 | using DisplayModeSetCallback = std::function; 31 | inline void registerDisplayModeSetCallback(DisplayModeSetCallback callback) { 32 | mOnDisplayModeSet = callback; 33 | } 34 | 35 | // Methods from ::vendor::lineage::livedisplay::V2_1::IDisplayModes follow. 36 | Return getDisplayModes(getDisplayModes_cb resultCb) override; 37 | Return getCurrentDisplayMode(getCurrentDisplayMode_cb resultCb) override; 38 | Return getDefaultDisplayMode(getDefaultDisplayMode_cb ResultCb) override; 39 | Return setDisplayMode(int32_t modeID, bool makeDefault) override; 40 | 41 | private: 42 | struct ModeInfo { 43 | std::string name; 44 | std::vector> commands; 45 | }; 46 | static const std::map kModeMap; 47 | std::shared_ptr mController; 48 | int32_t mCurrentModeId; 49 | int32_t mDefaultModeId; 50 | DisplayModeSetCallback mOnDisplayModeSet; 51 | }; 52 | 53 | } // namespace implementation 54 | } // namespace V2_1 55 | } // namespace livedisplay 56 | } // namespace lineage 57 | } // namespace vendor 58 | 59 | #endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_1_DISPLAYMODES_H 60 | -------------------------------------------------------------------------------- /sepolicy/vendor/property_contexts: -------------------------------------------------------------------------------- 1 | # Audio 2 | persist.vendor.audio.hac.enable u:object_r:vendor_audio_prop:s0 3 | 4 | # Camera 5 | vendor.camera. u:object_r:vendor_camera_prop:s0 6 | 7 | # Display 8 | persist.vendor.color.matrix u:object_r:vendor_display_prop:s0 9 | 10 | # FTM mode 11 | ro.boot.ftm_mode u:object_r:exported_default_prop:s0 12 | 13 | # Memplus 14 | vendor.sys.memplus. u:object_r:vendor_memplus_prop:s0 15 | 16 | # NFC 17 | persist.vendor.nfc. u:object_r:vendor_nfc_prop:s0 18 | persist.vendor.oem.nfc. u:object_r:vendor_nfc_prop:s0 19 | ro.vendor.nfc.notify_tp u:object_r:vendor_nfc_prop:s0 20 | vendor.oem.nfc. u:object_r:vendor_nfc_prop:s0 21 | 22 | # OEM dump 23 | persist.vendor.enable.powerkey.dump u:object_r:vendor_oem_dump_prop:s0 24 | persist.vendor.oem.defaultdump u:object_r:vendor_oem_dump_prop:s0 25 | persist.vendor.oem.dump u:object_r:vendor_oem_dump_prop:s0 26 | persist.vendor.oem.ssrdump u:object_r:vendor_oem_dump_prop:s0 27 | persist.vendor.oem.twice.modemdump u:object_r:vendor_oem_dump_prop:s0 28 | 29 | # Param 30 | ro.boot.prmec u:object_r:exported_default_prop:s0 31 | 32 | # RF version 33 | ro.boot.rf_version u:object_r:exported_default_prop:s0 34 | 35 | # RIL 36 | vendor.oem.bt.addr u:object_r:vendor_radio_prop:s0 37 | vendor.oem.device.imeicache1 u:object_r:vendor_radio_prop:s0 38 | vendor.oem.device.imeicache2 u:object_r:vendor_radio_prop:s0 39 | 40 | # Sensors 41 | persist.vendor.debug.sensors.hal u:object_r:vendor_sensors_prop:s0 42 | persist.vendor.naruto.light.support u:object_r:vendor_sensors_prop:s0 43 | persist.vendor.sensors.diag_buffer_mode u:object_r:vendor_sensors_prop:s0 44 | persist.vendor.sensors.enable.mag_filter u:object_r:vendor_sensors_prop:s0 45 | persist.vendor.sensors.light.location_x u:object_r:vendor_sensors_prop:s0 46 | persist.vendor.sensors.light.location_y u:object_r:vendor_sensors_prop:s0 47 | persist.vendor.sensors.proximity.using_motion u:object_r:vendor_sensors_prop:s0 48 | -------------------------------------------------------------------------------- /touch/TouchscreenGesture.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019-2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "TouchscreenGestureService" 18 | 19 | #include 20 | #include "touch/oneplus/TouchscreenGestureConfig.h" 21 | #include 22 | #include 23 | 24 | namespace vendor { 25 | namespace lineage { 26 | namespace touch { 27 | namespace V1_0 { 28 | namespace implementation { 29 | 30 | Return TouchscreenGesture::getSupportedGestures(getSupportedGestures_cb resultCb) { 31 | std::vector gestures; 32 | 33 | for (const auto& entry : kGestureInfoMap) { 34 | if (access(entry.second.path, F_OK) != -1) { 35 | gestures.push_back({entry.first, entry.second.name, entry.second.keycode}); 36 | } 37 | } 38 | resultCb(gestures); 39 | 40 | return Void(); 41 | } 42 | 43 | Return TouchscreenGesture::setGestureEnabled( 44 | const ::vendor::lineage::touch::V1_0::Gesture& gesture, bool enabled) { 45 | const auto entry = kGestureInfoMap.find(gesture.id); 46 | if (entry == kGestureInfoMap.end()) { 47 | return false; 48 | } 49 | 50 | std::ofstream file(entry->second.path); 51 | file << (enabled ? "1" : "0"); 52 | LOG(DEBUG) << "Wrote file " << entry->second.path << " fail " << file.fail(); 53 | return !file.fail(); 54 | } 55 | 56 | } // namespace implementation 57 | } // namespace V1_0 58 | } // namespace touch 59 | } // namespace lineage 60 | } // namespace vendor 61 | -------------------------------------------------------------------------------- /touch/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019-2021 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | filegroup { 17 | name: "vendor.lineage.touch@1.0-oneplus-touchgesture", 18 | srcs: ["TouchscreenGesture.cpp"], 19 | } 20 | 21 | cc_library_headers { 22 | name: "vendor.lineage.touch@1.0-oneplus-headers", 23 | vendor_available: true, 24 | export_include_dirs: ["include"], 25 | } 26 | 27 | cc_defaults { 28 | name: "oneplus_touch_hal_defaults", 29 | defaults: ["hidl_defaults"], 30 | relative_install_path: "hw", 31 | srcs: [ 32 | ":vendor.lineage.touch@1.0-oneplus-touchgesture", 33 | "service.cpp", 34 | ], 35 | shared_libs: [ 36 | "libbase", 37 | "libbinder", 38 | "libhidlbase", 39 | "libutils", 40 | "vendor.lineage.touch@1.0", 41 | ], 42 | local_include_dirs: ["include"], 43 | header_libs: [ 44 | "vendor.lineage.touch@1.0-oneplus-headers", 45 | ], 46 | } 47 | 48 | cc_binary { 49 | name: "lineage.touch@1.0-service.oneplus", 50 | defaults: ["oneplus_touch_hal_defaults"], 51 | init_rc: ["lineage.touch@1.0-service.oneplus.rc"], 52 | vintf_fragments: ["lineage.touch@1.0-service.oneplus.xml"], 53 | system_ext_specific: true, 54 | } 55 | 56 | cc_binary { 57 | name: "vendor.lineage.touch@1.0-service.oneplus", 58 | defaults: ["oneplus_touch_hal_defaults"], 59 | init_rc: ["vendor.lineage.touch@1.0-service.oneplus.rc"], 60 | vintf_fragments: ["vendor.lineage.touch@1.0-service.oneplus.xml"], 61 | vendor: true, 62 | } 63 | -------------------------------------------------------------------------------- /odm.prop: -------------------------------------------------------------------------------- 1 | # Audio 2 | ro.vendor.qti.va_odm.support=1 3 | vendor.audio.feature.a2dp_offload.enable=true 4 | vendor.audio.feature.afe_proxy.enable=true 5 | vendor.audio.feature.anc_headset.enable=true 6 | vendor.audio.feature.audiozoom.enable=false 7 | vendor.audio.feature.battery_listener.enable=true 8 | vendor.audio.feature.compr_cap.enable=false 9 | vendor.audio.feature.compr_voip.enable=false 10 | vendor.audio.feature.compress_in.enable=true 11 | vendor.audio.feature.compress_meta_data.enable=true 12 | vendor.audio.feature.concurrent_capture.enable=true 13 | vendor.audio.feature.custom_stereo.enable=true 14 | vendor.audio.feature.deepbuffer_as_primary.enable=false 15 | vendor.audio.feature.display_port.enable=true 16 | vendor.audio.feature.dsm_feedback.enable=false 17 | vendor.audio.feature.dynamic_ecns.enable=true 18 | vendor.audio.feature.ext_hw_plugin.enable=true 19 | vendor.audio.feature.external_dsp.enable=false 20 | vendor.audio.feature.external_speaker.enable=false 21 | vendor.audio.feature.external_speaker_tfa.enable=false 22 | vendor.audio.feature.fluence.enable=true 23 | vendor.audio.feature.fm.enable=true 24 | vendor.audio.feature.hdmi_edid.enable=true 25 | vendor.audio.feature.hdmi_passthrough.enable=true 26 | vendor.audio.feature.hfp.enable=true 27 | vendor.audio.feature.hifi_audio.enable=false 28 | vendor.audio.feature.hwdep_cal.enable=false 29 | vendor.audio.feature.incall_music.enable=true 30 | vendor.audio.feature.keep_alive.enable=true 31 | vendor.audio.feature.kpi_optimize.enable=true 32 | vendor.audio.feature.maxx_audio.enable=false 33 | vendor.audio.feature.multi_voice_session.enable=true 34 | vendor.audio.feature.ras.enable=true 35 | vendor.audio.feature.record_play_concurency.enable=false 36 | vendor.audio.feature.snd_mon.enable=true 37 | vendor.audio.feature.spkr_prot.enable=true 38 | vendor.audio.feature.src_trkn.enable=true 39 | vendor.audio.feature.ssrec.enable=true 40 | vendor.audio.feature.usb_offload.enable=true 41 | vendor.audio.feature.usb_offload_burst_mode.enable=true 42 | vendor.audio.feature.usb_offload_sidetone_volume.enable=false 43 | vendor.audio.feature.vbat.enable=true 44 | vendor.audio.feature.wsa.enable=false 45 | -------------------------------------------------------------------------------- /configs/gps/flp.conf: -------------------------------------------------------------------------------- 1 | ################################### 2 | ##### FLP settings ##### 3 | ################################### 4 | 5 | ################################### 6 | # FLP BATCH SIZE 7 | ################################### 8 | # The number of batched locations 9 | # requested to modem. The desired number 10 | # defined below may not be satisfied, as 11 | # the modem can only return the number 12 | # of batched locations that can be allocated, 13 | # which is limited by memory. The default 14 | # batch size defined as 20 as below. 15 | BATCH_SIZE=20 16 | 17 | ################################### 18 | # FLP OUTDOOR TRIP BATCH SIZE 19 | ################################### 20 | # The number of batched locations 21 | # requested to modem for outdoor 22 | # trip batching. The desired number 23 | # defined below may not be satisfied, as 24 | # the modem can only return the number 25 | # of batched locations that can be allocated, 26 | # which is limited by memory. The default 27 | # trip batch size defined as 600 as below. 28 | OUTDOOR_TRIP_BATCH_SIZE=600 29 | 30 | ################################### 31 | # FLP BATCHING SESSION TIMEOUT 32 | ################################### 33 | # Duration with which batch session timeout 34 | # happens in milliseconds. If not specified 35 | # or set to zero, batching session timeout 36 | # defaults to 20 seconds by the modem. 37 | # BATCH_SESSION_TIMEOUT=20000 38 | 39 | ################################### 40 | # FLP BATCHING ACCURACY 41 | ################################### 42 | # Set to one of the defined values below 43 | # to define the accuracy of batching. 44 | # If not specified, accuracy defaults 45 | # to LOW. 46 | # FLP BATCHING ACCURACY values: 47 | # Low accuracy = 0 48 | # Medium accuracy = 1 49 | # High accuracy = 2 50 | ACCURACY=1 51 | 52 | #################################### 53 | # By default if network fixes are not sensor assisted 54 | # these fixes must be dropped. This parameter adds an exception 55 | # for targets where there is no PDR and we still want to 56 | # report out network fixes 57 | # 0: MUST NOT ALLOW NETWORK FIXES 58 | # 1: ALLOW NETWORK FIXES 59 | #################################### 60 | ALLOW_NETWORK_FIXES = 0 61 | -------------------------------------------------------------------------------- /rootdir/etc/vendor.oem_ftm_svc_disable.rc: -------------------------------------------------------------------------------- 1 | # this file should import init.rc and then add some oem defined service 2 | 3 | #this service is a non-use service and just use to duplicate real console service 4 | service console /system/bin/xxx 5 | class core 6 | console 7 | disabled 8 | user root 9 | group shell log 10 | oneshot 11 | seclabel u:r:shell:s0 12 | 13 | #this service is a non-use service and just use to duplicate real surfaceflinger service 14 | service surfaceflinger /system/bin/xxx 15 | class core 16 | oneshot 17 | disabled 18 | 19 | service vendor.fps_hal /vendor/bin/hw/XXX 20 | class hal 21 | user system 22 | group system input uhid everybody 23 | disabled 24 | 25 | #disable below services to solve AT current peaks issue start 26 | service zygote /system/bin/xxx 27 | class main 28 | user system 29 | disabled 30 | 31 | service zygote_secondary /system/bin/xxx 32 | class main 33 | user root 34 | group root readproc reserved_disk 35 | disabled 36 | 37 | service vendor.cdsprpcd /vendor/bin/xxx 38 | class main 39 | user system 40 | disabled 41 | 42 | service cameraserver /system/bin/xxx 43 | class late_start 44 | user cameraserver 45 | disabled 46 | 47 | service iorapd /system/bin/xxx 48 | class main 49 | user iorapd 50 | disabled 51 | 52 | service feature_enabler_client /vendor/bin/xxx 53 | class late_start 54 | user system 55 | disabled 56 | 57 | service vendor.vppservice /vendor/bin/XXX 58 | class hal 59 | user media 60 | group camera system 61 | disabled 62 | 63 | service biometrics_face_service /vendor/bin/hw/xxx 64 | class hal 65 | user system 66 | disabled 67 | #disable below services to solve AT current peaks issue end 68 | 69 | service oemasserttip /system/bin/xxx 70 | class main 71 | user system 72 | disabled 73 | 74 | service vendor.oneplus.cwb-1-0 /vendor/bin/hw/xxx 75 | oneshot 76 | disabled 77 | 78 | service vendor.qti.hardware.display.composer /vendor/bin/hw/xxx 79 | oneshot 80 | disabled 81 | 82 | service vendor.light-hal-2-0 /vendor/bin/hw/xxx 83 | oneshot 84 | disabled 85 | 86 | -------------------------------------------------------------------------------- /livedisplay/Android.bp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019-2021 The LineageOS Project 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | // 5 | 6 | soong_config_module_type { 7 | name: "livedisplay_cc_defaults", 8 | module_type: "cc_defaults", 9 | config_namespace: "livedisplay", 10 | bool_variables: ["enabled"], 11 | properties: ["srcs", "shared_libs", "header_libs"], 12 | } 13 | 14 | livedisplay_cc_defaults { 15 | name: "livedisplay_defaults", 16 | soong_config_variables: { 17 | enabled: { 18 | srcs: [ 19 | ":vendor.lineage.livedisplay@2.0-sdm-pa", 20 | ":vendor.lineage.livedisplay@2.0-sdm-utils", 21 | ":vendor.lineage.livedisplay@2.1-oneplus-af", 22 | ":vendor.lineage.livedisplay@2.1-oneplus-se", 23 | ], 24 | shared_libs: [ 25 | "vendor.lineage.livedisplay@2.0", 26 | "vendor.lineage.livedisplay@2.1", 27 | ], 28 | header_libs: [ 29 | "vendor.lineage.livedisplay@2.0-sdm-headers", 30 | "vendor.lineage.livedisplay@2.1-oneplus-headers", 31 | ], 32 | }, 33 | }, 34 | } 35 | 36 | filegroup { 37 | name: "vendor.lineage.livedisplay@2.1-oneplus-af", 38 | srcs: ["AntiFlicker.cpp"], 39 | } 40 | 41 | filegroup { 42 | name: "vendor.lineage.livedisplay@2.1-oneplus-se", 43 | srcs: ["SunlightEnhancement.cpp"], 44 | } 45 | 46 | cc_library_headers { 47 | name: "vendor.lineage.livedisplay@2.1-oneplus-headers", 48 | vendor_available: true, 49 | export_include_dirs: ["include"], 50 | } 51 | 52 | cc_binary { 53 | name: "vendor.lineage.livedisplay@2.1-service.oneplus_msmnile", 54 | init_rc: ["vendor.lineage.livedisplay@2.1-service.oneplus_msmnile.rc"], 55 | vintf_fragments: ["vendor.lineage.livedisplay@2.1-service.oneplus_msmnile.xml"], 56 | defaults: ["hidl_defaults", "livedisplay_defaults"], 57 | relative_install_path: "hw", 58 | srcs: [ 59 | "DisplayModes.cpp", 60 | "service.cpp", 61 | ], 62 | shared_libs: [ 63 | "libbase", 64 | "libbinder", 65 | "libhidlbase", 66 | "libutils", 67 | ], 68 | proprietary: true, 69 | } 70 | -------------------------------------------------------------------------------- /overlay-aosp/packages/apps/Settings/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | true 21 | 22 | 36 | 3 37 | 38 | -------------------------------------------------------------------------------- /doze/src/org/lineageos/settings/doze/PocketSensor.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021-2022 The LineageOS Project 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package org.lineageos.settings.doze 7 | 8 | import android.content.Context 9 | import android.hardware.Sensor 10 | import android.hardware.SensorEvent 11 | import android.hardware.SensorEventListener 12 | import android.hardware.SensorManager 13 | import android.os.SystemClock 14 | import android.util.Log 15 | 16 | import java.util.concurrent.Executors 17 | 18 | class PocketSensor( 19 | private val context: Context, sensorType: String, private val sensorValue: Float 20 | ) : SensorEventListener { 21 | private val sensorManager = context.getSystemService(SensorManager::class.java) 22 | private val sensor = Utils.getSensor(sensorManager, sensorType) 23 | 24 | private val executorService = Executors.newSingleThreadExecutor() 25 | private var entryTimestamp = 0L 26 | 27 | override fun onSensorChanged(event: SensorEvent) { 28 | if (DEBUG) Log.d(TAG, "Got sensor event: ${event.values[0]}") 29 | val delta = SystemClock.elapsedRealtime() - entryTimestamp 30 | if (delta < MIN_PULSE_INTERVAL_MS) { 31 | return 32 | } 33 | entryTimestamp = SystemClock.elapsedRealtime() 34 | if (event.values[0] == sensorValue) { 35 | Utils.launchDozePulse(context) 36 | } 37 | } 38 | 39 | override fun onAccuracyChanged(sensor: Sensor, accuracy: Int) {} 40 | 41 | fun enable() { 42 | if (sensor != null) { 43 | Log.d(TAG, "Enabling") 44 | executorService.submit { 45 | entryTimestamp = SystemClock.elapsedRealtime() 46 | sensorManager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_NORMAL) 47 | } 48 | } 49 | } 50 | 51 | fun disable() { 52 | if (sensor != null) { 53 | Log.d(TAG, "Disabling") 54 | executorService.submit { 55 | sensorManager.unregisterListener(this, sensor) 56 | } 57 | } 58 | } 59 | 60 | companion object { 61 | private const val TAG = "PocketSensor" 62 | private const val DEBUG = false 63 | 64 | private const val MIN_PULSE_INTERVAL_MS = 2500L 65 | } 66 | } 67 | --------------------------------------------------------------------------------