├── sepolicy ├── vendor │ ├── rild.te │ ├── radio.te │ ├── recovery.te │ ├── gpuservice.te │ ├── kernel.te │ ├── cdsprpcd.te │ ├── untrusted_app.te │ ├── vndservice.te │ ├── vppservice.te │ ├── mediacodec.te │ ├── vendor_wcnss_service.te │ ├── vendor_hal_perf_default.te │ ├── hal_ir_default.te │ ├── uevent.te │ ├── vndservice_contexts │ ├── sensors.te │ ├── vendor_dataservice_app.te │ ├── adsprpcd.te │ ├── toolbox.te │ ├── daxservice_app.te │ ├── hal_health_default.te │ ├── platform_app.te │ ├── hal_light_default.te │ ├── hal_bootctl_default.te │ ├── vendor_qtelephony.te │ ├── hal_power_stats_default.te │ ├── hal_bluetooth_default.te │ ├── hal_mlipay.te │ ├── hal_neuralnetworks_default.te │ ├── system_server.te │ ├── hal_nfc_default.te │ ├── property.te │ ├── remosaic_daemon.te │ ├── tee.te │ ├── vendor_mdm_helper.te │ ├── device.te │ ├── init.te │ ├── hwservice.te │ ├── vendor_qti_init_shell.te │ ├── app.te │ ├── thermal-engine.te │ ├── vendor_init.te │ ├── system_app.te │ ├── hal_mlipay_default.te │ ├── hal_dms_default.te │ ├── hal_audio_default.te │ ├── hal_sensors_default.te │ ├── file.te │ ├── dontaudit.te │ ├── hal_camera_default.te │ ├── mi_thermald.te │ ├── hal_motor_default.te │ ├── hal_power_default.te │ ├── batterysecret.te │ ├── hwservice_contexts │ ├── property_contexts │ └── hal_fingerprint_default.te ├── public │ ├── daxservice_app.te │ ├── devicesettings_app.te │ ├── attributes │ └── property.te └── private │ ├── system_app.te │ ├── system_server.te │ ├── vendor_wfd_app.te │ ├── vendor_qtelephony.te │ ├── dontaudit.te │ ├── daxservice_app.te │ ├── seapp_contexts │ ├── service_contexts │ ├── devicesettings_app.te │ └── property_contexts ├── odm.prop ├── parts ├── proguard.flags ├── res │ ├── drawable │ │ ├── ic_eye.xml │ │ ├── ic_raise.xml │ │ ├── ic_pickup.xml │ │ ├── ic_thermal_dialer.xml │ │ ├── ic_thermal_camera.xml │ │ ├── ic_thermal_benchmark.xml │ │ ├── ic_thermal_browser.xml │ │ ├── ic_thermal_gaming.xml │ │ ├── ic_thermal_default.xml │ │ └── ic_thermal_streaming.xml │ ├── layout │ │ └── thermal_layout.xml │ └── xml │ │ └── doze_settings.xml ├── Android.bp └── src │ └── org │ └── lineageos │ └── settings │ ├── sensors │ └── SensorsUtils.java │ ├── doze │ └── DozeSettingsActivity.java │ ├── BootCompletedReceiver.java │ └── thermal │ └── ThermalActivity.java ├── gps ├── android │ ├── Android.mk │ ├── 1.0 │ │ ├── android.hardware.gnss@1.0-service-qti.rc │ │ ├── android.hardware.gnss@1.0-service-qti.xml │ │ ├── GnssDebug.h │ │ ├── GnssConfiguration.h │ │ ├── GnssNi.h │ │ └── AGnss.h │ ├── 1.1 │ │ ├── android.hardware.gnss@1.1-service-qti.rc │ │ ├── android.hardware.gnss@1.1-service-qti.xml │ │ ├── GnssDebug.h │ │ ├── GnssNi.h │ │ └── AGnss.h │ ├── 2.0 │ │ ├── android.hardware.gnss@2.0-service-qti.rc │ │ ├── android.hardware.gnss@2.0-service-qti.xml │ │ ├── GnssDebug.h │ │ ├── GnssNi.h │ │ └── AGnss.h │ ├── 2.1 │ │ ├── android.hardware.gnss@2.1-service-qti.rc │ │ ├── android.hardware.gnss@2.1-service-qti.xml │ │ ├── GnssDebug.h │ │ ├── GnssNi.h │ │ └── AGnss.h │ └── utils │ │ ├── Android.bp │ │ └── battery_listener.h ├── pla │ └── Android.bp ├── Makefile.am ├── gps_vendor_board.mk ├── core │ ├── loc-core.pc.in │ ├── Android.bp │ ├── data-items │ │ └── DataItemsFactoryProxy.h │ ├── Makefile.am │ └── LocContext.h ├── utils │ ├── gps-utils.pc.in │ ├── Android.bp │ ├── LocLoggerBase.h │ ├── Makefile.am │ └── MsgTask.h ├── location │ ├── location-api.pc.in │ ├── Android.bp │ └── Makefile.am ├── batching │ ├── location-batching.pc.in │ ├── Android.bp │ ├── Makefile.am │ └── configure.ac ├── geofence │ ├── location-geofence.pc.in │ ├── Android.bp │ ├── Makefile.am │ └── configure.ac ├── loc-hal.pc.in ├── gnss │ ├── Android.bp │ └── Makefile.am ├── Android.bp ├── etc │ ├── lowi.conf │ ├── Android.bp │ ├── seccomp_policy │ │ └── gnss@2.0-xtra-daemon.policy │ └── flp.conf ├── Android.mk ├── gps_vendor_product.mk └── CleanSpec.mk ├── wifi ├── p2p_supplicant_overlay.conf └── wpa_supplicant_overlay.conf ├── overlay ├── WifiSM6150 │ ├── Android.bp │ └── AndroidManifest.xml ├── SettingsSM6150 │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ ├── arrays.xml │ │ └── config.xml ├── SystemUISM6150 │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ └── config.xml ├── TelephonySM6150 │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ └── values │ │ └── config.xml ├── FrameworksSM6150 │ ├── Android.bp │ └── AndroidManifest.xml ├── CarrierConfigSM6150 │ ├── Android.bp │ └── AndroidManifest.xml └── SettingsProviderSM6150 │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ └── values │ └── config.xml ├── README.md ├── Android.bp ├── media ├── media_codecs_vendor_v2.xml ├── media_codecs_vendor_audio.xml └── media_codecs_dolby_audio.xml ├── .editorconfig ├── rootdir ├── etc │ ├── init.recovery.qcom.rc │ ├── fstab.zram │ └── init.nfc.rc └── bin │ └── init.qcom.early_boot.sh ├── libinit ├── init_xiaomi_sm6150.cpp ├── include │ ├── libinit_utils.h │ ├── libinit_dalvik_heap.h │ └── libinit_variant.h ├── Android.bp ├── libinit_variant.cpp ├── libinit_utils.cpp └── libinit_dalvik_heap.cpp ├── libhidl └── Android.bp ├── camera ├── Android.bp └── libpiex_shim.cpp ├── keylayout ├── uinput-fpc.kl ├── uinput-goodix.kl ├── gpio-keys.kl └── sm6150-idp-snd-card_Button_Jack.kl ├── libqti-perfd-client ├── Android.bp └── client.c ├── manifest_nfc.xml ├── fingerprint ├── android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sm6150.xml ├── android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sm6150-udfps.rc ├── UdfpsExtension.cpp ├── Android.bp └── service.cpp ├── aosp.dependencies ├── system_ext.prop ├── system.prop ├── bootctrl └── Android.bp ├── configs ├── component-overrides.xml └── excluded-input-devices.xml ├── product.prop ├── gpt-utils └── Android.bp ├── bluetooth └── include │ └── bdroid_buildcfg.h ├── setup-makefiles.sh ├── releasetools.py ├── compatibility_matrix.xml ├── reorder-libs.py ├── extract-files.sh └── power └── power-mode.cpp /sepolicy/vendor/rild.te: -------------------------------------------------------------------------------- 1 | set_prop(rild, deviceid_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/radio.te: -------------------------------------------------------------------------------- 1 | get_prop(radio, vendor_audio_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/public/daxservice_app.te: -------------------------------------------------------------------------------- 1 | type daxservice_app, domain; 2 | -------------------------------------------------------------------------------- /odm.prop: -------------------------------------------------------------------------------- 1 | # QC framework value-adds 2 | ro.vendor.qti.va_odm.support=1 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/recovery.te: -------------------------------------------------------------------------------- 1 | allow recovery pstorefs:dir r_dir_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/private/system_app.te: -------------------------------------------------------------------------------- 1 | hal_client_domain(system_app, hal_mlipay) 2 | -------------------------------------------------------------------------------- /sepolicy/public/devicesettings_app.te: -------------------------------------------------------------------------------- 1 | type devicesettings_app, domain; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/gpuservice.te: -------------------------------------------------------------------------------- 1 | get_prop(gpuservice, graphics_config_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/kernel.te: -------------------------------------------------------------------------------- 1 | allow kernel per_boot_file:file r_file_perms; 2 | -------------------------------------------------------------------------------- /parts/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class org.lineageos.settings.doze.* { 2 | *; 3 | } 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/cdsprpcd.te: -------------------------------------------------------------------------------- 1 | r_dir_file(vendor_cdsprpcd, public_adsprpcd_file) 2 | -------------------------------------------------------------------------------- /sepolicy/private/system_server.te: -------------------------------------------------------------------------------- 1 | get_prop(system_server, vendor_wfd_sys_debug_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/untrusted_app.te: -------------------------------------------------------------------------------- 1 | get_prop(untrusted_app, vendor_persist_camera_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/vndservice.te: -------------------------------------------------------------------------------- 1 | type remosaic_daemon_service, vndservice_manager_type; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/vppservice.te: -------------------------------------------------------------------------------- 1 | r_dir_file(vendor_vppservice, public_adsprpcd_file) 2 | -------------------------------------------------------------------------------- /sepolicy/private/vendor_wfd_app.te: -------------------------------------------------------------------------------- 1 | get_prop(vendor_wfd_app, vendor_wfd_sys_debug_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/mediacodec.te: -------------------------------------------------------------------------------- 1 | allow mediacodec hal_dms_hwservice:hwservice_manager find; 2 | -------------------------------------------------------------------------------- /gps/android/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | include $(call all-subdir-makefiles) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_wcnss_service.te: -------------------------------------------------------------------------------- 1 | get_prop(vendor_wcnss_service, vendor_bluetooth_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_hal_perf_default.te: -------------------------------------------------------------------------------- 1 | allow vendor_hal_perf_default sysfs_msm_subsys:dir search; 2 | -------------------------------------------------------------------------------- /sepolicy/private/vendor_qtelephony.te: -------------------------------------------------------------------------------- 1 | allow vendor_qtelephony vendor_hal_telephony_service:service_manager find; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_ir_default.te: -------------------------------------------------------------------------------- 1 | allow hal_ir_default lirc_device:{ 2 | chr_file 3 | file 4 | } rw_file_perms; 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/uevent.te: -------------------------------------------------------------------------------- 1 | allow ueventd self:capability sys_nice; 2 | allow vendor_qti_init_shell sysfs_wakeup:file setattr; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/vndservice_contexts: -------------------------------------------------------------------------------- 1 | android.IRemosaicDaemon u:object_r:remosaic_daemon_service:s0 2 | -------------------------------------------------------------------------------- /sepolicy/private/dontaudit.te: -------------------------------------------------------------------------------- 1 | # please don't kill yourself unless it's allowed 2 | dontaudit linkerconfig self:capability kill; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/sensors.te: -------------------------------------------------------------------------------- 1 | # Allow sensors to access backlight sysfs state 2 | r_dir_file(vendor_sensors, vendor_sysfs_graphics) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_dataservice_app.te: -------------------------------------------------------------------------------- 1 | allow vendor_dataservice_app vendor_hal_imsfactory_hwservice:hwservice_manager find; 2 | -------------------------------------------------------------------------------- /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/public/attributes: -------------------------------------------------------------------------------- 1 | hal_attribute_lineage(dms) 2 | 3 | hal_attribute_lineage(mlipay) 4 | 5 | hal_attribute_lineage(motor) 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/adsprpcd.te: -------------------------------------------------------------------------------- 1 | r_dir_file(vendor_adsprpcd, public_adsprpcd_file) 2 | r_dir_file(vendor_adsprpcd, vendor_sysfs_graphics) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/toolbox.te: -------------------------------------------------------------------------------- 1 | allow toolbox per_boot_file:dir create_dir_perms; 2 | allow toolbox per_boot_file:file create_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/public/property.te: -------------------------------------------------------------------------------- 1 | # IMEI 2 | vendor_public_prop(deviceid_prop); 3 | 4 | # Ultrasound 5 | vendor_public_prop(elliptic_ultrasound_prop) 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/daxservice_app.te: -------------------------------------------------------------------------------- 1 | binder_call(daxservice_app, hal_dms_default) 2 | 3 | allow daxservice_app hal_dms_hwservice:hwservice_manager find; 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_health_default.te: -------------------------------------------------------------------------------- 1 | allow hal_health_default sysfs_wakeup:dir r_dir_perms; 2 | allow hal_health_default sysfs_wakeup:file r_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/platform_app.te: -------------------------------------------------------------------------------- 1 | allow platform_app vendor_hal_soter_hwservice:hwservice_manager find; 2 | binder_call(platform_app, vendor_hal_soter_qti) 3 | -------------------------------------------------------------------------------- /gps/pla/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | cc_library_headers { 3 | 4 | name: "libloc_pla_headers", 5 | export_include_dirs: ["android"], 6 | vendor: true, 7 | } 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_light_default.te: -------------------------------------------------------------------------------- 1 | allow hal_light_default { 2 | sysfs_leds 3 | }:file rw_file_perms; 4 | 5 | r_dir_file(hal_light_default, sysfs_leds) 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_bootctl_default.te: -------------------------------------------------------------------------------- 1 | allow hal_bootctl_default block_device:blk_file getattr; 2 | allow hal_bootctl_default vendor_uefi_block_device:blk_file getattr; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_qtelephony.te: -------------------------------------------------------------------------------- 1 | set_prop(vendor_qtelephony, radio_prop) 2 | 3 | allow vendor_qtelephony vendor_hal_datafactory_hwservice:hwservice_manager find; 4 | -------------------------------------------------------------------------------- /overlay/WifiSM6150/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "WifiSM6150", 3 | theme: "WifiSM6150", 4 | sdk_version: "current", 5 | vendor: true 6 | } 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_power_stats_default.te: -------------------------------------------------------------------------------- 1 | allow hal_power_stats_default vendor_sysfs_iio:dir r_dir_perms; 2 | allow hal_power_stats_default vendor_sysfs_iio:file r_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_bluetooth_default.te: -------------------------------------------------------------------------------- 1 | # Allow hal_bluetooth_default to read files in vendor_wifi_vendor_data_file 2 | r_dir_file(hal_bluetooth_default, vendor_wifi_vendor_data_file) 3 | -------------------------------------------------------------------------------- /overlay/SettingsSM6150/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "SettingsSM6150", 3 | theme: "SettingsSM6150", 4 | sdk_version: "current", 5 | vendor: true, 6 | } 7 | -------------------------------------------------------------------------------- /overlay/SystemUISM6150/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "SystemUISM6150", 3 | theme: "SystemUISM6150", 4 | sdk_version: "current", 5 | vendor: true, 6 | } 7 | -------------------------------------------------------------------------------- /overlay/TelephonySM6150/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "TelephonySM6150", 3 | theme: "TelephonySM6150", 4 | sdk_version: "current", 5 | vendor: true, 6 | } 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_mlipay.te: -------------------------------------------------------------------------------- 1 | # HwBinder IPC from client to server 2 | binder_call(hal_mlipay_client, hal_mlipay_server) 3 | 4 | hal_attribute_hwservice(hal_mlipay, hal_mlipay_hwservice) 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_neuralnetworks_default.te: -------------------------------------------------------------------------------- 1 | r_dir_file(vendor_hal_neuralnetworks_default, public_adsprpcd_file) 2 | 3 | get_prop(vendor_hal_neuralnetworks_default, vendor_adsprpc_prop) 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Common device tree for Xiaomi SM6150 devices 2 | 3 | ``` 4 | # 5 | # Copyright (C) 2021 The LineageOS Project 6 | # 7 | # SPDX-License-Identifier: Apache-2.0 8 | # 9 | ``` 10 | -------------------------------------------------------------------------------- /overlay/FrameworksSM6150/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "FrameworksSM6150", 3 | theme: "FrameworksSM6150", 4 | sdk_version: "current", 5 | vendor: true, 6 | } 7 | -------------------------------------------------------------------------------- /overlay/CarrierConfigSM6150/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "CarrierConfigSM6150", 3 | theme: "CarrierConfigSM6150", 4 | sdk_version: "current", 5 | vendor: true, 6 | } 7 | -------------------------------------------------------------------------------- /overlay/SettingsProviderSM6150/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "SettingsProviderSM6150", 3 | theme: "SettingsProviderSM6150", 4 | sdk_version: "current", 5 | vendor: true, 6 | } 7 | -------------------------------------------------------------------------------- /gps/android/1.0/android.hardware.gnss@1.0-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@1.0-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /gps/android/1.1/android.hardware.gnss@1.1-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@1.1-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /gps/android/2.0/android.hardware.gnss@2.0-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@2.0-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /gps/android/2.1/android.hardware.gnss@2.1-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@2.1-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /Android.bp: -------------------------------------------------------------------------------- 1 | soong_namespace { 2 | imports: [ 3 | "hardware/xiaomi", 4 | "hardware/google/interfaces", 5 | "hardware/google/pixel", 6 | "hardware/qcom-caf/bootctrl", 7 | ], 8 | } 9 | -------------------------------------------------------------------------------- /sepolicy/vendor/system_server.te: -------------------------------------------------------------------------------- 1 | allow system_server proc_last_kmsg:file r_file_perms; 2 | allow system_server vendor_sysfs_battery_supply:file r_file_perms; 3 | 4 | get_prop(system_server, vendor_persist_camera_prop) 5 | -------------------------------------------------------------------------------- /media/media_codecs_vendor_v2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /gps/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am - Automake script for gps loc_api 2 | # 3 | 4 | ACLOCAL_AMFLAGS = -I m4 5 | 6 | SUBDIRS = gnss 7 | 8 | pkgconfigdir = $(libdir)/pkgconfig 9 | pkgconfig_DATA = loc-hal.pc 10 | EXTRA_DIST = $(pkgconfig_DATA) 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | indent_style = space 7 | indent_size = 4 8 | charset = utf-8 9 | # To avoid editing too much in commits 10 | trim_trailing_whitespace = false 11 | 12 | -------------------------------------------------------------------------------- /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" 9 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_nfc_default.te: -------------------------------------------------------------------------------- 1 | add_hwservice(hal_nfc_default, hal_nfc_hwservice) 2 | 3 | # Data file accesses. 4 | allow hal_nfc_default vendor_nfc_vendor_data_file:dir create_dir_perms; 5 | allow hal_nfc_default vendor_nfc_vendor_data_file:file create_file_perms; 6 | -------------------------------------------------------------------------------- /gps/gps_vendor_board.mk: -------------------------------------------------------------------------------- 1 | # Flags from BoardConfigVendor.mk 2 | ifneq ($(TARGET_USES_QMAA),true) 3 | BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default 4 | else ifneq ($(TARGET_USES_QMAA_OVERRIDE_GPS),false) 5 | BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default 6 | endif 7 | 8 | -------------------------------------------------------------------------------- /gps/core/loc-core.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: loc-core 7 | Description: QTI GPS Loc Core 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lloc_core 10 | Cflags: -I${includedir}/loc-core 11 | -------------------------------------------------------------------------------- /gps/utils/gps-utils.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: gps-utils 7 | Description: QTI GPS Location utils 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgps_utils 10 | Cflags: -I${includedir}/gps-utils 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/property.te: -------------------------------------------------------------------------------- 1 | # Fingerprint 2 | vendor_public_prop(vendor_fp_prop) 3 | 4 | # Init 5 | vendor_internal_prop(vendor_device_prop) 6 | 7 | # Power 8 | vendor_internal_prop(vendor_power_prop) 9 | 10 | # Thermal 11 | vendor_internal_prop(vendor_thermal_normal_prop) 12 | -------------------------------------------------------------------------------- /gps/location/location-api.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-api 7 | Description: Location API 8 | Version: @VERSION 9 | Libs: -L${libdir} -llocation_api 10 | Cflags: -I${includedir}/location-api 11 | -------------------------------------------------------------------------------- /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 | setprop sys.usb.controller ${ro.boot.usbcontroller} 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/remosaic_daemon.te: -------------------------------------------------------------------------------- 1 | type remosaic_daemon, domain; 2 | type remosaic_daemon_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(remosaic_daemon) 5 | 6 | vndbinder_use(remosaic_daemon) 7 | 8 | allow remosaic_daemon remosaic_daemon_service:service_manager add; 9 | -------------------------------------------------------------------------------- /libinit/init_xiaomi_sm6150.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #include 8 | 9 | #include "vendor_init.h" 10 | 11 | void vendor_load_properties() { 12 | set_dalvik_heap(); 13 | } 14 | -------------------------------------------------------------------------------- /sepolicy/vendor/tee.te: -------------------------------------------------------------------------------- 1 | typeattribute tee data_between_core_and_vendor_violators; 2 | 3 | allow tee fingerprint_data_file:dir create_dir_perms; 4 | allow tee { 5 | fingerprint_data_file 6 | mnt_vendor_file 7 | }:file create_file_perms; 8 | 9 | allow tee mnt_vendor_file:dir rw_dir_perms; 10 | -------------------------------------------------------------------------------- /gps/batching/location-batching.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-batching 7 | Description: QTI GPS Batching 8 | Version: @VERSION 9 | Libs: -L${libdir} -lbatching 10 | Cflags: -I${includedir}/location-batching 11 | -------------------------------------------------------------------------------- /gps/geofence/location-geofence.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-geofence 7 | Description: QTI GPS Geofence 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgeofencing 10 | Cflags: -I${includedir}/location-geofence 11 | -------------------------------------------------------------------------------- /libhidl/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2021 The LineageOS Project 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | cc_library_shared { 8 | name: "android.hidl.base@1.0", 9 | shared_libs: ["libhidlbase"], 10 | system_ext_specific: true, 11 | vendor_available: true, 12 | } 13 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_mdm_helper.te: -------------------------------------------------------------------------------- 1 | allow vendor_mdm_helper vendor_mba_debug_dev:blk_file r_file_perms; 2 | allow vendor_mdm_helper vendor_custom_ab_block_device:blk_file r_file_perms; 3 | allow vendor_mdm_helper vendor_tombstone_data_file:fifo_file rw_file_perms; 4 | 5 | get_prop(vendor_mdm_helper, vendor_ssr_prop) 6 | -------------------------------------------------------------------------------- /gps/loc-hal.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: loc-hal 7 | Description: QTI GPS Loc HAL 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgnss 10 | Cflags: -I${includedir} -I${includedir}/utils -I${includedir}/core -I${includedir}/loc-hal 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/device.te: -------------------------------------------------------------------------------- 1 | type fingerprint_device, dev_type; 2 | 3 | type hall_device, dev_type; 4 | 5 | type lirc_device, dev_type; 6 | 7 | type motor_device, dev_type; 8 | 9 | type sound_device, dev_type; 10 | 11 | type touchfeature_device, dev_type; 12 | 13 | type vendor_sysfs_fod, sysfs_type, fs_type; 14 | -------------------------------------------------------------------------------- /sepolicy/private/daxservice_app.te: -------------------------------------------------------------------------------- 1 | app_domain(daxservice_app) 2 | 3 | allow daxservice_app { 4 | activity_service 5 | activity_task_service 6 | audio_service 7 | audioserver_service 8 | autofill_service 9 | bluetooth_manager_service 10 | gpu_service 11 | surfaceflinger_service 12 | }:service_manager find; 13 | -------------------------------------------------------------------------------- /sepolicy/vendor/init.te: -------------------------------------------------------------------------------- 1 | allow init same_process_hal_file:file execute; 2 | 3 | allow init proc_last_kmsg:file { 4 | r_file_perms 5 | setattr 6 | }; 7 | 8 | allow init adsprpcd_file:file mounton; 9 | 10 | allow init per_boot_file:file ioctl; 11 | allowxperm init per_boot_file:file ioctl { F2FS_IOC_SET_PIN_FILE }; 12 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice.te: -------------------------------------------------------------------------------- 1 | type hal_dms_hwservice, hwservice_manager_type; 2 | 3 | type hal_fingerprint_hwservice_xiaomi, hwservice_manager_type; 4 | 5 | type hal_mlipay_hwservice, hwservice_manager_type; 6 | 7 | type hal_motor_hwservice, hwservice_manager_type; 8 | 9 | type hal_camerapostproc_xiaomi_hwservice, hwservice_manager_type; 10 | -------------------------------------------------------------------------------- /camera/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2022 The LineageOS Project 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | cc_library_shared { 8 | name: "libpiex_shim", 9 | srcs: [ 10 | "libpiex_shim.cpp", 11 | ], 12 | vendor: true, 13 | shared_libs: [ 14 | "libpiex", 15 | "libutils", 16 | ], 17 | } 18 | -------------------------------------------------------------------------------- /keylayout/uinput-fpc.kl: -------------------------------------------------------------------------------- 1 | # 2 | # FPC fingerprint sensor driver 3 | # 4 | # Copyright (c) 2013,2014 Fingerprint Cards AB 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License Version 2 8 | # as published by the Free Software Foundation. 9 | # 10 | 11 | #key 304 HOME VIRTUAL 12 | -------------------------------------------------------------------------------- /keylayout/uinput-goodix.kl: -------------------------------------------------------------------------------- 1 | # 2 | # Goodix fingerprint sensor driver 3 | # 4 | # Copyright (c) 2013,2014 Fingerprint Cards AB 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License Version 2 8 | # as published by the Free Software Foundation. 9 | # 10 | 11 | #key 102 HOME VIRTUAL 12 | -------------------------------------------------------------------------------- /libqti-perfd-client/Android.bp: -------------------------------------------------------------------------------- 1 | cc_library_shared { 2 | name: "libqti-perfd-client", 3 | proprietary: true, 4 | defaults: ["hidl_defaults"], 5 | srcs: [ 6 | "client.c", 7 | ], 8 | cflags: [ 9 | "-Werror", 10 | "-Wextra", 11 | "-Wall", 12 | ], 13 | shared_libs: [ 14 | "liblog", 15 | "libutils", 16 | ], 17 | } 18 | -------------------------------------------------------------------------------- /rootdir/etc/fstab.zram: -------------------------------------------------------------------------------- 1 | # Android fstab file. 2 | 3 | # 4 | /dev/block/zram0 none swap defaults zramsize=2147483648,max_comp_streams=8,zram_backingdev_size=512M 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_qti_init_shell.te: -------------------------------------------------------------------------------- 1 | allow vendor_qti_init_shell configfs:dir create_dir_perms; 2 | allow vendor_qti_init_shell configfs:file create_file_perms; 3 | allow vendor_qti_init_shell configfs:lnk_file create_file_perms; 4 | allow vendor_qti_init_shell ctl_stop_prop:property_service set; 5 | allow vendor_qti_init_shell sysfs_wakeup:file setattr; 6 | 7 | set_prop(vendor_qti_init_shell, vendor_power_prop) 8 | -------------------------------------------------------------------------------- /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 | allow { appdomain -isolated_app } vendor_xdsp_device:chr_file r_file_perms; 4 | 5 | get_prop({ appdomain -isolated_app }, vendor_fp_prop) 6 | get_prop({ appdomain -isolated_app }, vendor_tee_listener_prop) 7 | get_prop(appdomain, vendor_persist_camera_prop) 8 | -------------------------------------------------------------------------------- /camera/libpiex_shim.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2022 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #include 8 | 9 | namespace piex { 10 | 11 | Error GetPreviewImageData(StreamInterface* data, 12 | PreviewImageData* preview_image_data) { 13 | return GetPreviewImageData(data, preview_image_data, nullptr); 14 | } 15 | 16 | } // namespace piex 17 | -------------------------------------------------------------------------------- /sepolicy/vendor/thermal-engine.te: -------------------------------------------------------------------------------- 1 | allow vendor_thermal-engine { 2 | vendor_sysfs_devfreq 3 | sysfs_msm_subsys 4 | thermal_data_file 5 | }:dir r_dir_perms; 6 | 7 | allow vendor_thermal-engine vendor_sysfs_devfreq:file rw_file_perms; 8 | 9 | # Rule for vendor_thermal-engine to access init process 10 | unix_socket_connect(vendor_thermal-engine, property, init); 11 | 12 | set_prop(vendor_thermal-engine, vendor_thermal_normal_prop) 13 | -------------------------------------------------------------------------------- /manifest_nfc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.hardware.nfc 4 | hwbinder 5 | @1.2::INfc/default 6 | 7 | 8 | vendor.nxp.hardware.nfc 9 | hwbinder 10 | @2.0::INqNfc/default 11 | 12 | 13 | -------------------------------------------------------------------------------- /keylayout/gpio-keys.kl: -------------------------------------------------------------------------------- 1 | # 2 | # Gpio driver 3 | # 4 | # Copyright (c) 2013,2014 The Linux Foundation. All rights reserved 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License Version 2 8 | # as published by the Free Software Foundation. 9 | # 10 | 11 | key 115 VOLUME_UP 12 | key 114 VOLUME_DOWN 13 | key 102 HOME 14 | key 528 FOCUS 15 | key 766 CAMERA 16 | -------------------------------------------------------------------------------- /libinit/include/libinit_utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #ifndef LIBINIT_UTILS_H 8 | #define LIBINIT_UTILS_H 9 | 10 | #include 11 | 12 | void property_override(std::string prop, std::string value, bool add = true); 13 | 14 | void set_ro_build_prop(const std::string &prop, const std::string &value, bool product = false); 15 | 16 | #endif // LIBINIT_UTILS_H 17 | -------------------------------------------------------------------------------- /rootdir/etc/init.nfc.rc: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2021 The LineageOS Project 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | 7 | service vendor.nfc_hal_service /vendor/bin/hw/android.hardware.nfc@1.2-service 8 | override 9 | class hal 10 | user nfc 11 | group nfc 12 | writepid /dev/cpuset/system-background/tasks 13 | disabled 14 | 15 | on boot && property:ro.boot.product.hardware.sku=nfc 16 | enable vendor.nfc_hal_service 17 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_init.te: -------------------------------------------------------------------------------- 1 | set_prop(vendor_init, vendor_power_prop) 2 | set_prop(vendor_init, vendor_alarm_boot_prop) 3 | set_prop(vendor_init, vendor_video_prop) 4 | 5 | allow vendor_init { 6 | proc_dirty 7 | proc 8 | }:file w_file_perms; 9 | 10 | allow vendor_init block_device:lnk_file setattr; 11 | allow vendor_init vendor_camera_prop:property_service set; 12 | 13 | allow vendor_init input_device:chr_file { create setattr unlink rw_file_perms }; 14 | -------------------------------------------------------------------------------- /fingerprint/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sm6150.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.hardware.biometrics.fingerprint 4 | hwbinder 5 | 2.3 6 | 7 | IBiometricsFingerprint 8 | default 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_eye.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /overlay/FrameworksSM6150/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /sepolicy/private/seapp_contexts: -------------------------------------------------------------------------------- 1 | user=_app isPrivApp=true seinfo=platform name=com.dolby.daxappui domain=daxservice_app type=app_data_file levelFrom=user 2 | user=_app isPrivApp=true seinfo=platform name=com.dolby.daxservice domain=daxservice_app type=app_data_file levelFrom=user 3 | 4 | user=system seinfo=platform name=org.lineageos.devicesettings domain=devicesettings_app type=system_app_data_file 5 | user=system seinfo=platform name=org.lineageos.settings domain=devicesettings_app type=system_app_data_file 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/system_app.te: -------------------------------------------------------------------------------- 1 | allow system_app vendor_sysfs_battery_supply:dir { search }; 2 | allow system_app vendor_sysfs_battery_supply:file { read }; 3 | allow system_app vendor_sysfs_battery_supply:file { open }; 4 | allow system_app vendor_sysfs_battery_supply:file { getattr }; 5 | allow system_app sysfs_zram:dir search; 6 | allow system_app sysfs_zram:file r_file_perms; 7 | 8 | r_dir_file(system_app, vendor_sysfs_battery_supply) 9 | 10 | get_prop(system_app, vendor_persist_camera_prop) 11 | -------------------------------------------------------------------------------- /overlay/TelephonySM6150/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /overlay/SettingsSM6150/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /overlay/SystemUISM6150/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /overlay/CarrierConfigSM6150/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_mlipay_default.te: -------------------------------------------------------------------------------- 1 | type hal_mlipay_default, domain; 2 | hal_server_domain(hal_mlipay_default, hal_mlipay) 3 | 4 | type hal_mlipay_default_exec, exec_type, vendor_file_type, file_type; 5 | 6 | init_daemon_domain(hal_mlipay_default) 7 | 8 | allow hal_mlipay_default { 9 | ion_device 10 | tee_device 11 | }:chr_file rw_file_perms; 12 | 13 | r_dir_file(hal_mlipay_default, firmware_file) 14 | 15 | get_prop(hal_mlipay_default, vendor_fp_prop) 16 | set_prop(hal_mlipay_default, vendor_tee_listener_prop) 17 | -------------------------------------------------------------------------------- /overlay/SettingsProviderSM6150/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 8 | 9 | 13 | 14 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_dms_default.te: -------------------------------------------------------------------------------- 1 | type hal_dms_default, domain; 2 | hal_server_domain(hal_dms_default, hal_dms) 3 | 4 | type hal_dms_default_exec, exec_type, vendor_file_type, file_type; 5 | 6 | init_daemon_domain(hal_dms_default) 7 | 8 | add_hwservice(hal_dms_default, hal_dms_hwservice) 9 | 10 | binder_call(hal_dms_default, daxservice_app) 11 | binder_call(hal_dms_default, hal_audio_default) 12 | 13 | allow hal_dms_default vendor_audio_data_file:dir rw_dir_perms; 14 | allow hal_dms_default vendor_audio_data_file:file create_file_perms; 15 | -------------------------------------------------------------------------------- /parts/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2017-2021 The LineageOS Project 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | android_app { 8 | name: "XiaomiParts", 9 | 10 | srcs: ["src/**/*.java"], 11 | resource_dirs: ["res"], 12 | certificate: "platform", 13 | platform_apis: true, 14 | system_ext_specific: true, 15 | privileged: true, 16 | 17 | static_libs: [ 18 | "org.pixelexperience.settings.resources", 19 | ], 20 | 21 | optimize: { 22 | proguard_flags_files: ["proguard.flags"], 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /aosp.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository" : "hardware_xiaomi", 4 | "target_path" : "hardware/xiaomi", 5 | "remote" : "pixel", 6 | "branch" : "thirteen" 7 | }, 8 | { 9 | "repository" : "device_xiaomi_sm6150-extras", 10 | "target_path" : "device/xiaomi/sm6150-extras", 11 | "remote" : "pixel-devices", 12 | "branch" : "thirteen" 13 | }, 14 | { 15 | "repository" : "vendor_xiaomi_sm6150-common", 16 | "target_path" : "vendor/xiaomi/sm6150-common", 17 | "remote" : "pixel-devices-blobs", 18 | "branch" : "thirteen" 19 | } 20 | ] 21 | -------------------------------------------------------------------------------- /libinit/include/libinit_dalvik_heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #ifndef LIBINIT_DALVIK_HEAP_H 8 | #define LIBINIT_DALVIK_HEAP_H 9 | 10 | #include 11 | 12 | typedef struct dalvik_heap_info { 13 | std::string heapstartsize; 14 | std::string heapgrowthlimit; 15 | std::string heapsize; 16 | std::string heapminfree; 17 | std::string heapmaxfree; 18 | std::string heaptargetutilization; 19 | } dalvik_heap_info_t; 20 | 21 | void set_dalvik_heap(void); 22 | 23 | #endif // LIBINIT_DALVIK_HEAP_H 24 | -------------------------------------------------------------------------------- /gps/geofence/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | 3 | cc_library_shared { 4 | 5 | name: "libgeofencing", 6 | vendor: true, 7 | 8 | 9 | 10 | srcs: [ 11 | "GeofenceAdapter.cpp", 12 | "location_geofence.cpp", 13 | ], 14 | 15 | shared_libs: [ 16 | "libutils", 17 | "libcutils", 18 | "libgps.utils", 19 | "liblog", 20 | "libloc_core", 21 | ], 22 | 23 | header_libs: [ 24 | "libgps.utils_headers", 25 | "libloc_core_headers", 26 | "libloc_pla_headers", 27 | "liblocation_api_headers", 28 | ], 29 | 30 | cflags: GNSS_CFLAGS, 31 | } 32 | -------------------------------------------------------------------------------- /gps/batching/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | cc_library_shared { 3 | 4 | name: "libbatching", 5 | vendor: true, 6 | 7 | 8 | 9 | shared_libs: [ 10 | "libutils", 11 | "libcutils", 12 | "liblog", 13 | "libloc_core", 14 | "libgps.utils", 15 | "libdl", 16 | ], 17 | 18 | srcs: [ 19 | "location_batching.cpp", 20 | "BatchingAdapter.cpp", 21 | ], 22 | 23 | header_libs: [ 24 | "libgps.utils_headers", 25 | "libloc_core_headers", 26 | "libloc_pla_headers", 27 | "liblocation_api_headers", 28 | ], 29 | 30 | cflags: GNSS_CFLAGS, 31 | } 32 | -------------------------------------------------------------------------------- /overlay/WifiSM6150/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /sepolicy/private/service_contexts: -------------------------------------------------------------------------------- 1 | # IMS 2 | vendor.qti.hardware.radio.ims.IImsRadio/imsradio0 u:object_r:vendor_hal_telephony_service:s0 3 | vendor.qti.hardware.radio.ims.IImsRadio/imsradio1 u:object_r:vendor_hal_telephony_service:s0 4 | vendor.qti.hardware.radio.qtiradio.IQtiRadioStable/slot1 u:object_r:vendor_hal_telephony_service:s0 5 | vendor.qti.hardware.radio.qtiradio.IQtiRadioStable/slot2 u:object_r:vendor_hal_telephony_service:s0 6 | vendor.qti.hardware.radio.am.IQcRilAudio/slot1 u:object_r:vendor_hal_telephony_service:s0 7 | vendor.qti.hardware.radio.am.IQcRilAudio/slot2 u:object_r:vendor_hal_telephony_service:s0 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_audio_default.te: -------------------------------------------------------------------------------- 1 | # For interfacing with PowerHAL 2 | hal_client_domain(hal_audio_default, hal_power) 3 | 4 | # Allow hal_audio_default to read vendor_persist_audio_file 5 | r_dir_file(hal_audio_default, vendor_persist_audio_file) 6 | 7 | r_dir_file(hal_audio_default, sysfs) 8 | 9 | binder_call(hal_audio_default, hal_dms_default) 10 | binder_call(hal_audio_default, system_suspend_server) 11 | 12 | set_prop(hal_audio_default, vendor_audio_prop) 13 | get_prop(hal_audio_default, elliptic_ultrasound_prop) 14 | 15 | allow hal_audio_default audio_socket:sock_file rw_file_perms; 16 | allow hal_audio_default { hal_dms_hwservice system_suspend_hwservice }:hwservice_manager find; 17 | -------------------------------------------------------------------------------- /system_ext.prop: -------------------------------------------------------------------------------- 1 | # CNE 2 | persist.vendor.cne.feature=1 3 | 4 | # DPM 5 | persist.vendor.dpm.feature=11 6 | 7 | # IMS 8 | persist.vendor.ims.disableADBLogs=1 9 | persist.vendor.ims.disableDebugLogs=1 10 | persist.vendor.ims.disableIMSLogs=1 11 | persist.vendor.ims.disableQXDMLogs=1 12 | 13 | # Media 14 | mmp.enable.3g2=true 15 | persist.mm.enable.prefetch=true 16 | media.aac_51_output_enabled=true 17 | media.stagefright.enable-qcp=true 18 | media.stagefright.enable-aac=true 19 | media.stagefright.enable-http=true 20 | media.stagefright.enable-scan=true 21 | media.stagefright.enable-player=true 22 | media.stagefright.enable-fma2dp=true 23 | media.settings.xml=/vendor/etc/media_profiles_vendor.xml 24 | -------------------------------------------------------------------------------- /libinit/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2021 The LineageOS Project 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | cc_library_static { 8 | name: "libinit_xiaomi_sm6150", 9 | srcs: [ 10 | "libinit_dalvik_heap.cpp", 11 | "libinit_variant.cpp", 12 | "libinit_utils.cpp", 13 | ], 14 | whole_static_libs: ["libbase"], 15 | export_include_dirs: ["include"], 16 | recovery_available: true, 17 | } 18 | 19 | cc_library_static { 20 | name: "init_xiaomi_sm6150", 21 | srcs: ["init_xiaomi_sm6150.cpp"], 22 | whole_static_libs: ["libinit_xiaomi_sm6150"], 23 | include_dirs: ["system/core/init"], 24 | recovery_available: true, 25 | } 26 | -------------------------------------------------------------------------------- /libqti-perfd-client/client.c: -------------------------------------------------------------------------------- 1 | #define LOG_TAG "libqti-perfd-client" 2 | 3 | #include 4 | #include 5 | 6 | void perf_get_feedback() {} 7 | void perf_hint() {} 8 | int perf_lock_acq(int handle, int duration, int arg3[], int arg4) { 9 | ALOGI("perf_lock_acq: handle: %d, duration: %d, arg3[0]: %d, arg4: %d", 10 | handle, duration, arg3[0], arg4); 11 | if (handle > 0) 12 | return handle; 13 | 14 | return 233; 15 | } 16 | void perf_lock_cmd() {} 17 | int perf_lock_rel(int handle) { 18 | ALOGI("perf_lock_rel: handle: %d", handle); 19 | if (handle > 0) 20 | return handle; 21 | 22 | return 233; 23 | } 24 | void perf_lock_use_profile() {} 25 | -------------------------------------------------------------------------------- /libinit/include/libinit_variant.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #ifndef LIBINIT_VARIANT_H 8 | #define LIBINIT_VARIANT_H 9 | 10 | #include 11 | #include 12 | 13 | typedef struct variant_info { 14 | std::string hwc_value; 15 | std::string sku_value; 16 | 17 | std::string brand; 18 | std::string device; 19 | std::string marketname; 20 | std::string model; 21 | 22 | bool nfc; 23 | } variant_info_t; 24 | 25 | void search_variant(const std::vector variants); 26 | 27 | void set_variant_props(const variant_info_t variant); 28 | 29 | #endif // LIBINIT_VARIANT_H 30 | -------------------------------------------------------------------------------- /gps/location/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | cc_library_shared { 3 | 4 | name: "liblocation_api", 5 | vendor: true, 6 | 7 | 8 | 9 | shared_libs: [ 10 | "libutils", 11 | "libcutils", 12 | "libgps.utils", 13 | "libdl", 14 | "liblog", 15 | ], 16 | 17 | srcs: [ 18 | "LocationAPI.cpp", 19 | "LocationAPIClientBase.cpp", 20 | ], 21 | 22 | cflags: ["-fno-short-enums"] + GNSS_CFLAGS, 23 | 24 | header_libs: [ 25 | "libloc_pla_headers", 26 | "libgps.utils_headers", 27 | ], 28 | 29 | } 30 | 31 | cc_library_headers { 32 | 33 | name: "liblocation_api_headers", 34 | export_include_dirs: ["."], 35 | vendor: true, 36 | } 37 | -------------------------------------------------------------------------------- /system.prop: -------------------------------------------------------------------------------- 1 | # Bluetooth 2 | vendor.bluetooth.soc=cherokee 3 | 4 | # Charger 5 | ro.charger.enable_suspend=true 6 | 7 | # Display 8 | debug.force_no_blanking=true 9 | 10 | # Netflix custom property 11 | ro.netflix.bsp_rev=Q6150-17263-1 12 | 13 | # RCS 14 | persist.rcs.supported=1 15 | 16 | # Radio 17 | persist.radio.multisim.config=dsds 18 | persist.radio.NO_STAPA=1 19 | persist.radio.VT_CAM_INTERFACE=1 20 | persist.radio.VT_HYBRID_ENABLE=1 21 | ril.subscription.types=RUIM 22 | ro.telephony.default_cdma_sub=0 23 | ro.telephony.default_network=22,22 24 | telephony.lteOnCdmaDevice=1 25 | persist.sys.fflag.override.settings_provider_model=false 26 | 27 | # Recovery 28 | ro.recovery.ui.margin_height=48 29 | 30 | # WiFi 31 | wifi.interface=wlan0 32 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_sensors_default.te: -------------------------------------------------------------------------------- 1 | unix_socket_connect(hal_sensors_default, audio, hal_audio_default) 2 | 3 | hal_client_domain(hal_sensors_default, hal_audio) 4 | binder_call(hal_sensors_default, hal_audio_default) 5 | 6 | allow hal_sensors_default audio_socket:sock_file rw_file_perms; 7 | allow hal_sensors_default socket_device:sock_file rw_file_perms; 8 | allow hal_sensors_default iio_device:chr_file rw_file_perms; 9 | allow hal_sensors_default ultrasound_device:chr_file rw_file_perms; 10 | allow hal_sensors_default vendor_sysfs_iio:dir r_dir_perms; 11 | allow hal_sensors_default vendor_sysfs_iio:file rw_file_perms; 12 | allow hal_sensors_default hal_audio_hwservice:hwservice_manager find; 13 | 14 | get_prop(hal_sensors_default, vendor_adsprpc_prop) 15 | -------------------------------------------------------------------------------- /gps/gnss/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | 3 | cc_library_shared { 4 | 5 | name: "libgnss", 6 | vendor: true, 7 | 8 | 9 | 10 | shared_libs: [ 11 | "libutils", 12 | "libcutils", 13 | "libdl", 14 | "liblog", 15 | "libloc_core", 16 | "libgps.utils", 17 | ], 18 | 19 | srcs: [ 20 | "location_gnss.cpp", 21 | "GnssAdapter.cpp", 22 | "Agps.cpp", 23 | "XtraSystemStatusObserver.cpp", 24 | "NativeAgpsHandler.cpp", 25 | ], 26 | 27 | cflags: ["-fno-short-enums"] + GNSS_CFLAGS, 28 | header_libs: [ 29 | "libgps.utils_headers", 30 | "libloc_core_headers", 31 | "libloc_pla_headers", 32 | "liblocation_api_headers", 33 | ], 34 | 35 | } 36 | -------------------------------------------------------------------------------- /fingerprint/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sm6150-udfps.rc: -------------------------------------------------------------------------------- 1 | on init 2 | # Goodix fingerprint 3 | chown system system /dev/goodix_fp 4 | 5 | on boot 6 | chown system system /sys/devices/platform/soc/soc:qcom,dsi-display/fod_ui 7 | 8 | on post-fs-data 9 | mkdir /data/vendor/goodix 0770 system system 10 | mkdir /mnt/vendor/persist/goodix 0770 system system 11 | 12 | service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sm6150-udfps 13 | # "class hal" causes a race condition on some devices due to files created 14 | # in /data. As a workaround, postpone startup until later in boot once 15 | # /data is mounted. 16 | class late_start 17 | user system 18 | group system input uhid 19 | -------------------------------------------------------------------------------- /sepolicy/vendor/file.te: -------------------------------------------------------------------------------- 1 | type sysfs_msm_boot, fs_type, sysfs_type; 2 | type sysfs_msm_subsys, sysfs_type, fs_type; 3 | type sysfs_touchpanel, fs_type, sysfs_type; 4 | type sysfs_wireless_supply, sysfs_type, fs_type; 5 | type vendor_sysfs_iio, fs_type, sysfs_type; 6 | 7 | type fingerprint_data_file, data_file_type, core_data_file_type, file_type; 8 | type thermal_data_file, file_type, data_file_type; 9 | 10 | type camera_persist_file, file_type, vendor_persist_type; 11 | 12 | type audio_socket, file_type; 13 | type public_adsprpcd_file, file_type; 14 | 15 | type ultrasound_device, dev_type; 16 | 17 | type persist_subsys_file, vendor_persist_type, file_type; 18 | 19 | type proc_last_kmsg, fs_type, proc_type; 20 | 21 | type avb_file, file_type; 22 | 23 | # Data files 24 | type per_boot_file, file_type, data_file_type, core_data_file_type; 25 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_raise.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_pickup.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /sepolicy/vendor/dontaudit.te: -------------------------------------------------------------------------------- 1 | # please don't kill yourself unless it's allowed 2 | dontaudit { fsck toolbox vdc zygote } self:capability kill; 3 | 4 | # We never apply OTAs when GSI is running 5 | dontaudit hal_bootctl_default gsi_metadata_file:dir search; 6 | 7 | # too noisy, and shouldn't even be granted by default unless necessary 8 | dontaudit { gmscore_app hal_camera_default } property_type:file r_file_perms; 9 | dontaudit { 10 | vendor_hal_neuralnetworks_default 11 | vendor_qti_init_shell 12 | } default_prop:file r_file_perms; 13 | 14 | # why would a script want to access rootfs? 15 | dontaudit vendor_wcnss_service rootfs:dir { open read }; 16 | 17 | # untrusted_app shouldn't be allowed to read SELinux status 18 | dontaudit untrusted_app_all selinuxfs:file read; 19 | 20 | # all other no-context attempt by apps (as spotted on iQIYI) 21 | dontaudit untrusted_app_all sysfs_net:dir search; 22 | -------------------------------------------------------------------------------- /gps/android/utils/Android.bp: -------------------------------------------------------------------------------- 1 | cc_library_static { 2 | 3 | name: "liblocbatterylistener", 4 | vendor: true, 5 | 6 | 7 | 8 | cflags: GNSS_CFLAGS + ["-DBATTERY_LISTENER_ENABLED"], 9 | local_include_dirs: ["."], 10 | 11 | srcs: ["battery_listener.cpp"], 12 | 13 | shared_libs: [ 14 | "liblog", 15 | "libhidlbase", 16 | "libcutils", 17 | "libutils", 18 | "android.hardware.health@1.0", 19 | "android.hardware.health@2.0", 20 | "android.hardware.health@2.1", 21 | "android.hardware.power@1.2", 22 | "libbase", 23 | ], 24 | 25 | static_libs: ["libhealthhalutils"], 26 | 27 | header_libs: [ 28 | "libgps.utils_headers", 29 | "libloc_pla_headers", 30 | ], 31 | } 32 | 33 | cc_library_headers { 34 | 35 | name: "liblocbatterylistener_headers", 36 | export_include_dirs: ["."], 37 | } 38 | -------------------------------------------------------------------------------- /gps/Android.bp: -------------------------------------------------------------------------------- 1 | GNSS_CFLAGS = [ 2 | "-Werror", 3 | "-Wno-error=unused-parameter", 4 | "-Wno-error=macro-redefined", 5 | "-Wno-error=reorder", 6 | "-Wno-error=missing-braces", 7 | "-Wno-error=self-assign", 8 | "-Wno-error=enum-conversion", 9 | "-Wno-error=logical-op-parentheses", 10 | "-Wno-error=null-arithmetic", 11 | "-Wno-error=null-conversion", 12 | "-Wno-error=parentheses-equality", 13 | "-Wno-undefined-bool-conversion", 14 | "-Wno-error=tautological-compare", 15 | "-Wno-error=switch", 16 | "-Wno-error=date-time", 17 | ] 18 | 19 | /* Activate the following for debug purposes only, 20 | comment out for production */ 21 | GNSS_SANITIZE_DIAG = { 22 | /* 23 | diag: { 24 | cfi: true, 25 | misc_undefined: [ 26 | "bounds", 27 | "null", 28 | "unreachable", 29 | "integer", 30 | ], 31 | }, 32 | */ 33 | } 34 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_camera_default.te: -------------------------------------------------------------------------------- 1 | # For interfacing with PowerHAL 2 | hal_client_domain(hal_camera_default, hal_power) 3 | 4 | # Allow hal_camera_default to read to vendor_sysfs_kgsl 5 | r_dir_file(hal_camera_default, vendor_sysfs_kgsl) 6 | 7 | # Allow hal_camera_default to read to mnt/vendor/persist/camera 8 | r_dir_file(hal_camera_default, camera_persist_file) 9 | r_dir_file(hal_camera_default, mnt_vendor_file) 10 | r_dir_file(hal_camera_default, vendor_persist_sensors_file) 11 | 12 | allow hal_camera_default remosaic_daemon_service:service_manager find; 13 | 14 | allow hal_camera_default proc_stat:file read; 15 | 16 | set_prop(hal_camera_default, vendor_camera_prop) 17 | 18 | allow hal_camera_default socket_device:sock_file write; 19 | allow hal_camera_default proc_stat:file { open }; 20 | 21 | allow hal_camera_default public_adsprpcd_file:file r_file_perms; 22 | allow hal_camera_default vendor_xdsp_device:chr_file r_file_perms; 23 | -------------------------------------------------------------------------------- /bootctrl/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2018 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 | cc_library_shared { 18 | name: "android.hardware.boot@1.1-impl-qti", 19 | stem: "android.hardware.boot@1.0-impl-1.1-qti", 20 | defaults: ["android.hardware.boot@1.1-impl-qti_defaults"], 21 | static_libs: ["libgptutils.sm6150"], 22 | } 23 | -------------------------------------------------------------------------------- /overlay/SettingsProviderSM6150/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | true 22 | 23 | -------------------------------------------------------------------------------- /parts/res/layout/thermal_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 19 | -------------------------------------------------------------------------------- /sepolicy/vendor/mi_thermald.te: -------------------------------------------------------------------------------- 1 | type mi_thermald, domain; 2 | type mi_thermald_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(mi_thermald) 5 | 6 | allow mi_thermald self:capability { chown fowner fsetid }; 7 | 8 | # Allow mi_thermald to read thermal_data_file 9 | allow mi_thermald thermal_data_file:dir rw_dir_perms; 10 | allow mi_thermald thermal_data_file:file create_file_perms; 11 | 12 | r_dir_file(mi_thermald, sysfs_battery_supply) 13 | r_dir_file(mi_thermald, sysfs_devices_system_cpu) 14 | r_dir_file(mi_thermald, vendor_sysfs_graphics) 15 | r_dir_file(mi_thermald, vendor_sysfs_kgsl) 16 | r_dir_file(mi_thermald, sysfs_leds) 17 | r_dir_file(mi_thermald, sysfs_thermal) 18 | 19 | # Allow mi_thermald to read and write to sysfs_* 20 | allow mi_thermald { 21 | sysfs_battery_supply 22 | sysfs_devices_system_cpu 23 | vendor_sysfs_kgsl 24 | sysfs_thermal 25 | }:{ 26 | file 27 | lnk_file 28 | } rw_file_perms; 29 | 30 | set_prop(mi_thermald, vendor_thermal_normal_prop) 31 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_motor_default.te: -------------------------------------------------------------------------------- 1 | type hal_motor_default, domain; 2 | 3 | type hal_motor_default_exec, exec_type, vendor_file_type, file_type; 4 | init_daemon_domain(hal_motor_default) 5 | 6 | binder_call(hal_motor_client, hal_motor_server) 7 | 8 | hal_client_domain(cameraserver, hal_motor) 9 | hal_server_domain(hal_motor_default, hal_motor) 10 | 11 | binder_call(devicesettings_app, hal_motor) 12 | binder_call(hal_motor_default, devicesettings_app) 13 | 14 | hal_attribute_hwservice(hal_motor, hal_motor_hwservice) 15 | 16 | # Allow hal_motor_default to read and write to { motor_device hall_device } 17 | allow hal_motor_default { 18 | hall_device 19 | motor_device 20 | }:chr_file rw_file_perms; 21 | 22 | # Allow hal_motor_default to read and write to { mnt_vendor_file vendor_persist_sensors_file } 23 | allow hal_motor_default { 24 | mnt_vendor_file 25 | vendor_persist_sensors_file 26 | }:dir rw_dir_perms; 27 | 28 | allow hal_motor_default { 29 | mnt_vendor_file 30 | vendor_persist_sensors_file 31 | }:file rw_file_perms; 32 | -------------------------------------------------------------------------------- /gps/gnss/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | $(LOCPLA_CFLAGS) \ 3 | $(LOCHAL_CFLAGS) \ 4 | $(GPSUTILS_CFLAGS) \ 5 | $(LOCCORE_CFLAGS) \ 6 | -I./ \ 7 | -I../utils \ 8 | -I$(WORKSPACE)/hardware/qcom/gps/core/data-items \ 9 | -I../location \ 10 | -std=c++1y 11 | 12 | libgnss_la_SOURCES = \ 13 | location_gnss.cpp \ 14 | GnssAdapter.cpp \ 15 | XtraSystemStatusObserver.cpp \ 16 | Agps.cpp \ 17 | NativeAgpsHandler.cpp 18 | 19 | if USE_GLIB 20 | libgnss_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 21 | libgnss_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -avoid-version 22 | libgnss_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 23 | else 24 | libgnss_la_CFLAGS = $(AM_CFLAGS) 25 | libgnss_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 26 | libgnss_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 27 | endif 28 | 29 | libgnss_la_LIBADD = -lstdc++ -ldl $(GPSUTILS_LIBS) $(LOCCORE_LIBS) 30 | 31 | #Create and Install libraries 32 | lib_LTLIBRARIES = libgnss.la 33 | -------------------------------------------------------------------------------- /overlay/SystemUISM6150/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | false 23 | 24 | 25 | true 26 | 27 | -------------------------------------------------------------------------------- /configs/component-overrides.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_power_default.te: -------------------------------------------------------------------------------- 1 | # Allow hal_power_default to write to dt2w nodes 2 | allow hal_power_default input_device:dir r_dir_perms; 3 | allow hal_power_default input_device:chr_file rw_file_perms; 4 | 5 | r_dir_file(hal_power_default, input_device) 6 | 7 | allow hal_power_default { 8 | vendor_sysfs_devfreq 9 | sysfs_msm_subsys 10 | sysfs_touchpanel 11 | }:dir search; 12 | 13 | allow hal_power_default { 14 | cgroup 15 | proc 16 | vendor_sysfs_devfreq 17 | sysfs_devices_system_cpu 18 | vendor_sysfs_graphics 19 | vendor_sysfs_kgsl 20 | sysfs_msm_subsys 21 | vendor_sysfs_scsi_host 22 | sysfs_touchpanel 23 | }:{ 24 | file 25 | lnk_file 26 | } rw_file_perms; 27 | 28 | allow hal_power_default vendor_latency_device:chr_file rw_file_perms; 29 | allow hal_power_default touchfeature_device:chr_file rw_file_perms; 30 | 31 | # Rule for hal_power_default to access graphics composer process 32 | unix_socket_connect(hal_power_default, vendor_pps, hal_graphics_composer_default); 33 | 34 | # To get/set powerhal state property 35 | set_prop(hal_power_default, vendor_power_prop) 36 | -------------------------------------------------------------------------------- /fingerprint/UdfpsExtension.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020-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 | #include 19 | #include 20 | 21 | uint32_t getUdfpsZOrder(uint32_t z, bool touched) { 22 | if (touched) { 23 | z |= FOD_PRESSED_LAYER_ZORDER; 24 | } 25 | 26 | return z; 27 | } 28 | 29 | uint64_t getUdfpsUsageBits(uint64_t usageBits, bool touched) { 30 | (void) touched; 31 | return usageBits; 32 | } 33 | -------------------------------------------------------------------------------- /gps/etc/lowi.conf: -------------------------------------------------------------------------------- 1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | # 3 | # LOWI Config file - lahaina 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 = 4 26 | LOWI_USE_LOWI_LP = 0 27 | LOWI_HE_RTT_SUPPORT = 1 28 | LOWI_USE_NLMSG_FOR_CAPS = 1 29 | LOWI_RTT_WEIGHTED_MEAN = 1 30 | LOWI_USE_6G_CHANNELS = 1 31 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_dialer.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /gps/etc/Android.bp: -------------------------------------------------------------------------------- 1 | prebuilt_etc { 2 | name: "apdr.conf", 3 | vendor: true, 4 | src: "apdr.conf", 5 | } 6 | 7 | prebuilt_etc { 8 | name: "flp.conf", 9 | vendor: true, 10 | src: "flp.conf", 11 | } 12 | 13 | prebuilt_etc { 14 | name: "gnss_antenna_info.conf", 15 | vendor: true, 16 | src: "gnss_antenna_info.conf", 17 | } 18 | 19 | prebuilt_etc { 20 | name: "gps.conf", 21 | vendor: true, 22 | src: "gps.conf", 23 | } 24 | 25 | prebuilt_etc { 26 | name: "izat.conf", 27 | vendor: true, 28 | src: "izat.conf", 29 | } 30 | 31 | prebuilt_etc { 32 | name: "lowi.conf", 33 | vendor: true, 34 | src: "lowi.conf", 35 | } 36 | 37 | prebuilt_etc { 38 | name: "sap.conf", 39 | vendor: true, 40 | src: "sap.conf", 41 | } 42 | 43 | prebuilt_etc { 44 | name: "gnss@2.0-base.policy", 45 | vendor: true, 46 | sub_dir: "seccomp_policy", 47 | src: "seccomp_policy/gnss@2.0-base.policy", 48 | } 49 | 50 | prebuilt_etc { 51 | name: "gnss@2.0-xtra-daemon.policy", 52 | vendor: true, 53 | sub_dir: "seccomp_policy", 54 | src: "seccomp_policy/gnss@2.0-xtra-daemon.policy", 55 | } 56 | -------------------------------------------------------------------------------- /overlay/SettingsSM6150/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 24 | 25 | 0 26 | -1 27 | -1 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /gps/utils/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | cc_library_shared { 3 | 4 | name: "libgps.utils", 5 | vendor: true, 6 | 7 | 8 | 9 | //# Libs 10 | shared_libs: [ 11 | "libdl", 12 | "libutils", 13 | "libcutils", 14 | "liblog", 15 | "libprocessgroup", 16 | ], 17 | 18 | srcs: [ 19 | "loc_log.cpp", 20 | "loc_cfg.cpp", 21 | "msg_q.c", 22 | "linked_list.c", 23 | "loc_target.cpp", 24 | "LocHeap.cpp", 25 | "LocTimer.cpp", 26 | "LocThread.cpp", 27 | "MsgTask.cpp", 28 | "loc_misc_utils.cpp", 29 | "loc_nmea.cpp", 30 | "LocIpc.cpp", 31 | "LogBuffer.cpp", 32 | ], 33 | 34 | cflags: [ 35 | "-fno-short-enums", 36 | "-D_ANDROID_", 37 | ] + GNSS_CFLAGS, 38 | 39 | //# Includes 40 | ldflags: ["-Wl,--export-dynamic"], 41 | 42 | header_libs: [ 43 | "libutils_headers", 44 | "libloc_pla_headers", 45 | "liblocation_api_headers", 46 | ], 47 | } 48 | 49 | cc_library_headers { 50 | 51 | name: "libgps.utils_headers", 52 | export_include_dirs: ["."], 53 | vendor: true, 54 | } 55 | -------------------------------------------------------------------------------- /media/media_codecs_vendor_audio.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /product.prop: -------------------------------------------------------------------------------- 1 | # App 2 | persist.device_config.runtime_native_boot.iorap_perfetto_enable=true 3 | 4 | # Audio 5 | audio.offload.min.duration.secs=30 6 | audio.sys.offload.pstimeout.secs=3 7 | 8 | # Bluetooth profiles to enabled 9 | bluetooth.profile.asha.central.enabled?=true 10 | bluetooth.profile.a2dp.source.enabled?=true 11 | bluetooth.profile.avrcp.target.enabled?=true 12 | bluetooth.profile.bas.client.enabled?=true 13 | bluetooth.profile.gatt.enabled?=true 14 | bluetooth.profile.hfp.ag.enabled?=true 15 | bluetooth.profile.hid.device.enabled?=true 16 | bluetooth.profile.hid.host.enabled?=true 17 | bluetooth.profile.map.server.enabled?=true 18 | bluetooth.profile.opp.enabled?=true 19 | bluetooth.profile.pan.nap.enabled?=true 20 | bluetooth.profile.pan.panu.enabled?=true 21 | bluetooth.profile.pbap.server.enabled?=true 22 | bluetooth.profile.sap.server.enabled?=true 23 | 24 | # Set the Bluetooth Class of Device 25 | # Service Field: 0x5A -> 90 26 | # Bit 17: Networking 27 | # Bit 19: Capturing 28 | # Bit 20: Object Transfer 29 | # Bit 22: Telephony 30 | # MAJOR_CLASS: 0x02 -> 2 (Phone) 31 | # MINOR_CLASS: 0x0C -> 12 (Smart Phone) 32 | bluetooth.device.class_of_device=90,2,12 33 | -------------------------------------------------------------------------------- /gps/core/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | cc_library_shared { 3 | 4 | name: "libloc_core", 5 | vendor: true, 6 | 7 | 8 | 9 | shared_libs: [ 10 | "liblog", 11 | "libutils", 12 | "libcutils", 13 | "libgps.utils", 14 | "libdl", 15 | "liblog", 16 | ], 17 | 18 | srcs: [ 19 | "LocApiBase.cpp", 20 | "LocAdapterBase.cpp", 21 | "ContextBase.cpp", 22 | "LocContext.cpp", 23 | "loc_core_log.cpp", 24 | "data-items/DataItemsFactoryProxy.cpp", 25 | "SystemStatusOsObserver.cpp", 26 | "SystemStatus.cpp", 27 | ], 28 | 29 | cflags: [ 30 | "-fno-short-enums", 31 | "-D_ANDROID_", 32 | ] + GNSS_CFLAGS, 33 | 34 | local_include_dirs: [ 35 | "data-items", 36 | "observer", 37 | ], 38 | 39 | header_libs: [ 40 | "libutils_headers", 41 | "libgps.utils_headers", 42 | "libloc_pla_headers", 43 | "liblocation_api_headers", 44 | ], 45 | 46 | } 47 | 48 | cc_library_headers { 49 | 50 | name: "libloc_core_headers", 51 | vendor: true, 52 | export_include_dirs: ["."] + [ 53 | "data-items", 54 | "observer", 55 | ], 56 | } 57 | -------------------------------------------------------------------------------- /gpt-utils/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2018 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 | 18 | cc_library { 19 | name: "libgptutils.sm6150", 20 | vendor: true, 21 | recovery_available: true, 22 | shared_libs: [ 23 | "libcutils", 24 | "liblog", 25 | "libz", 26 | ], 27 | cflags: [ 28 | "-Wall", 29 | "-Werror", 30 | ], 31 | srcs: [ 32 | "gpt-utils.cpp", 33 | "recovery-ufs-bsg.cpp", 34 | ], 35 | owner: "qti", 36 | header_libs: [ 37 | "generated_kernel_headers", 38 | ], 39 | export_include_dirs: ["."], 40 | } 41 | -------------------------------------------------------------------------------- /parts/src/org/lineageos/settings/sensors/SensorsUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The CyanogenMod Project 3 | * 2020 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.sensors; 19 | 20 | import android.hardware.Sensor; 21 | import android.hardware.SensorManager; 22 | 23 | public final class SensorsUtils { 24 | public static Sensor getSensor(SensorManager sm, String type) { 25 | for (Sensor sensor : sm.getSensorList(Sensor.TYPE_ALL)) { 26 | if (type.equals(sensor.getStringType())) { 27 | return sensor; 28 | } 29 | } 30 | return null; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /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 | 25 | // Disables read remote device feature 26 | #define MAX_ACL_CONNECTIONS 16 27 | #define MAX_L2CAP_CHANNELS 16 28 | #define BLE_VND_INCLUDED TRUE 29 | 30 | /* Increasing SEPs to 12 from 6 to support SHO/MCast i.e. two streams per codec */ 31 | #define AVDT_NUM_SEPS 12 32 | #endif 33 | -------------------------------------------------------------------------------- /libinit/libinit_variant.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | using android::base::GetProperty; 13 | 14 | #define HWC_PROP "ro.boot.hwc" 15 | #define SKU_PROP "ro.boot.product.hardware.sku" 16 | 17 | void search_variant(const std::vector variants) { 18 | std::string hwc_value = GetProperty(HWC_PROP, ""); 19 | std::string sku_value = GetProperty(SKU_PROP, ""); 20 | 21 | for (const auto& variant : variants) { 22 | if ((variant.hwc_value == "" || variant.hwc_value == hwc_value) && 23 | (variant.sku_value == "" || variant.sku_value == sku_value)) { 24 | set_variant_props(variant); 25 | break; 26 | } 27 | } 28 | } 29 | 30 | void set_variant_props(const variant_info_t variant) { 31 | set_ro_build_prop("brand", variant.brand, true); 32 | set_ro_build_prop("device", variant.device, true); 33 | set_ro_build_prop("marketname", variant.marketname, true); 34 | set_ro_build_prop("model", variant.model, true); 35 | 36 | if (variant.nfc) 37 | property_override(SKU_PROP, "nfc"); 38 | } 39 | -------------------------------------------------------------------------------- /sepolicy/private/devicesettings_app.te: -------------------------------------------------------------------------------- 1 | typeattribute devicesettings_app mlstrustedsubject; 2 | 3 | app_domain(devicesettings_app) 4 | 5 | # Allow devicesettings_app to find *_service 6 | allow devicesettings_app { 7 | activity_service 8 | activity_task_service 9 | app_api_service 10 | audio_service 11 | audioserver_service 12 | autofill_service 13 | cameraserver_service 14 | drmserver_service 15 | media_session_service 16 | mediaextractor_service 17 | mediametrics_service 18 | mediaserver_service 19 | surfaceflinger_service 20 | }:service_manager find; 21 | 22 | hal_client_domain(devicesettings_app, hal_motor) 23 | 24 | # Allow devicesettings_app read and write /data/data subdirectory 25 | allow devicesettings_app system_app_data_file:dir create_dir_perms; 26 | allow devicesettings_app system_app_data_file:{ file lnk_file } create_file_perms; 27 | 28 | # Allow binder communication with gpuservice 29 | binder_call(devicesettings_app, gpuservice) 30 | binder_call(devicesettings_app, hal_motor) 31 | 32 | # Allow devicesettings_app to read and write to cgroup/sysfs_leds/sysfs_thermal 33 | allow devicesettings_app sysfs_leds:dir search; 34 | allow devicesettings_app { 35 | cgroup 36 | sysfs_leds 37 | sysfs_thermal 38 | }:{ file lnk_file } rw_file_perms; 39 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_camera.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /overlay/SettingsSM6150/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 19 | true 20 | 21 | 22 | false 23 | 24 | -------------------------------------------------------------------------------- /gps/batching/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | $(GPSUTILS_CFLAGS) \ 3 | $(LOCCORE_CFLAGS) \ 4 | -I./ \ 5 | -std=c++1y \ 6 | -D__func__=__PRETTY_FUNCTION__ \ 7 | -fno-short-enums 8 | 9 | ACLOCAL_AMFLAGS = -I m4 10 | 11 | requiredlibs = \ 12 | $(GPSUTILS_LIBS) \ 13 | $(LOCCORE_LIBS) \ 14 | -llog 15 | 16 | h_sources = \ 17 | BatchingAdapter.h 18 | 19 | libbatching_la_SOURCES = \ 20 | location_batching.cpp \ 21 | BatchingAdapter.cpp 22 | 23 | if USE_GLIB 24 | libbatching_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 25 | libbatching_la_LDFLAGS = -lstdc++ -g -Wl,-z,defs -lpthread $(requiredlibs) @GLIB_LIBS@ -shared -version-info 1:0:0 26 | libbatching_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 27 | else 28 | libbatching_la_CFLAGS = $(AM_CFLAGS) 29 | libbatching_la_LDFLAGS = -Wl,-z,defs -lpthread $(requiredlibs) -shared -version-info 1:0:0 30 | libbatching_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 31 | endif 32 | 33 | library_include_HEADERS = $(h_sources) 34 | 35 | library_includedir = $(pkgincludedir) 36 | 37 | #Create and Install libraries 38 | lib_LTLIBRARIES = libbatching.la 39 | 40 | pkgconfigdir = $(libdir)/pkgconfig 41 | pkgconfig_DATA = location-batching.pc 42 | sysconf_DATA = $(WORKSPACE)/hardware/qcom/gps/etc/flp.conf 43 | EXTRA_DIST = $(pkgconfig_DATA) 44 | 45 | -------------------------------------------------------------------------------- /gps/location/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = \ 4 | -I./ \ 5 | -I../utils \ 6 | $(LOCPLA_CFLAGS) \ 7 | $(GPSUTILS_CFLAGS) \ 8 | -std=c++11 9 | 10 | liblocation_api_la_SOURCES = \ 11 | LocationAPI.cpp \ 12 | LocationAPIClientBase.cpp 13 | 14 | if USE_EXTERNAL_AP 15 | AM_CFLAGS += -DFEATURE_EXTERNAL_AP 16 | endif 17 | 18 | if USE_GLIB 19 | liblocation_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 20 | liblocation_api_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 21 | liblocation_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 22 | else 23 | liblocation_api_la_CFLAGS = $(AM_CFLAGS) 24 | liblocation_api_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 25 | liblocation_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 26 | endif 27 | 28 | liblocation_api_la_LIBADD = -lstdc++ -ldl $(GPSUTILS_LIBS) 29 | 30 | library_include_HEADERS = \ 31 | LocationAPI.h \ 32 | LocationAPIClientBase.h \ 33 | location_interface.h \ 34 | LocationDataTypes.h \ 35 | ILocationAPI.h 36 | 37 | #Create and Install libraries 38 | lib_LTLIBRARIES = liblocation_api.la 39 | 40 | library_includedir = $(pkgincludedir) 41 | 42 | pkgconfigdir = $(libdir)/pkgconfig 43 | pkgconfig_DATA = location-api.pc 44 | EXTRA_DIST = $(pkgconfig_DATA) 45 | -------------------------------------------------------------------------------- /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}" "${ANDROID_ROOT}" true 26 | 27 | # Warning headers and guards 28 | write_headers "mojito sweet tucana" 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}/../${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}/../${DEVICE}/proprietary-files.txt" true 45 | 46 | # Finish 47 | write_footers 48 | fi 49 | -------------------------------------------------------------------------------- /libinit/libinit_utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_ 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | void property_override(std::string prop, std::string value, bool add) { 14 | auto pi = (prop_info *) __system_property_find(prop.c_str()); 15 | if (pi != nullptr) { 16 | __system_property_update(pi, value.c_str(), value.length()); 17 | } else if (add) { 18 | __system_property_add(prop.c_str(), prop.length(), value.c_str(), value.length()); 19 | } 20 | } 21 | 22 | std::vector ro_props_default_source_order = { 23 | "odm.", 24 | "odm_dlkm.", 25 | "product.", 26 | "system.", 27 | "system_ext.", 28 | "vendor.", 29 | "vendor_dlkm.", 30 | "", 31 | }; 32 | 33 | void set_ro_build_prop(const std::string &prop, const std::string &value, bool product) { 34 | std::string prop_name; 35 | 36 | for (const auto &source : ro_props_default_source_order) { 37 | if (product) 38 | prop_name = "ro.product." + source + prop; 39 | else 40 | prop_name = "ro." + source + "build." + prop; 41 | 42 | property_override(prop_name, value, true); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /overlay/TelephonySM6150/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 23 | org.codeaurora.ims 24 | 25 | 26 | vendor.qti.imsrcs 27 | 28 | -------------------------------------------------------------------------------- /sepolicy/vendor/batterysecret.te: -------------------------------------------------------------------------------- 1 | type batterysecret, domain; 2 | type batterysecret_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(batterysecret) 5 | 6 | r_dir_file(batterysecret, cgroup) 7 | r_dir_file(batterysecret, mnt_vendor_file) 8 | r_dir_file(batterysecret, vendor_sysfs_battery_supply) 9 | r_dir_file(batterysecret, sysfs_batteryinfo) 10 | r_dir_file(batterysecret, sysfs_type) 11 | r_dir_file(batterysecret, vendor_sysfs_usb_supply) 12 | r_dir_file(batterysecret, vendor_sysfs_usbpd_device) 13 | 14 | allow batterysecret { 15 | mnt_vendor_file 16 | persist_subsys_file 17 | rootfs 18 | }:dir rw_dir_perms; 19 | 20 | allow batterysecret { 21 | persist_subsys_file 22 | vendor_sysfs_battery_supply 23 | sysfs_usb 24 | vendor_sysfs_usb_supply 25 | vendor_sysfs_usbpd_device 26 | }:file w_file_perms; 27 | 28 | allow batterysecret kmsg_device:chr_file rw_file_perms; 29 | 30 | allow batterysecret self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl; 31 | 32 | allow batterysecret self:global_capability_class_set { 33 | sys_tty_config 34 | sys_boot 35 | }; 36 | 37 | allow batterysecret self:capability { 38 | chown 39 | fsetid 40 | }; 41 | 42 | allow batterysecret { 43 | system_suspend_hwservice 44 | hidl_manager_hwservice 45 | }:hwservice_manager find; 46 | 47 | binder_call(batterysecret, system_suspend_server) 48 | 49 | wakelock_use(batterysecret) 50 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice_contexts: -------------------------------------------------------------------------------- 1 | vendor.dolby.hardware.dms::IDms u:object_r:hal_dms_hwservice:s0 2 | vendor.goodix.hardware.cap.biometrics.fingerprint::IGoodixFingerprintDaemon u:object_r:hal_fingerprint_hwservice_xiaomi:s0 3 | vendor.goodix.hardware.cap.biometrics.fingerprint::IGoodixFingerprintDaemonExt u:object_r:hal_fingerprint_hwservice_xiaomi:s0 4 | vendor.goodix.hardware.interfaces.biometrics.fingerprint::IGoodixFingerprintDaemon u:object_r:hal_fingerprint_hwservice_xiaomi:s0 5 | vendor.goodix.hardware.interfaces.biometrics.fingerprint::IGoodixFingerprintDaemonExt u:object_r:hal_fingerprint_hwservice_xiaomi:s0 6 | vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemon u:object_r:hal_fingerprint_hwservice_xiaomi:s0 7 | vendor.xiaomi.hardware.fingerprintextension::IXiaomiFingerprint u:object_r:hal_fingerprint_hwservice_xiaomi:s0 8 | vendor.xiaomi.hardware.mlipay::IMlipayService u:object_r:hal_mlipay_hwservice:s0 9 | vendor.xiaomi.hardware.motor::IMotor u:object_r:hal_motor_hwservice:s0 10 | vendor.nxp.nxpese::INxpEse u:object_r:hal_nfc_hwservice:s0 11 | vendor.nxp.nxpnfc::INxpNfc u:object_r:hal_nfc_hwservice:s0 12 | -------------------------------------------------------------------------------- /parts/src/org/lineageos/settings/doze/DozeSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 The CyanogenMod Project 3 | * 2017 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.doze; 19 | 20 | import android.os.Bundle; 21 | 22 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity; 23 | import com.android.settingslib.collapsingtoolbar.R; 24 | 25 | public class DozeSettingsActivity extends CollapsingToolbarBaseActivity { 26 | 27 | private static final String TAG_DOZE = "doze"; 28 | 29 | @Override 30 | protected void onCreate(Bundle savedInstanceState) { 31 | super.onCreate(savedInstanceState); 32 | 33 | getFragmentManager().beginTransaction().replace(R.id.content_frame, 34 | new DozeSettingsFragment(), TAG_DOZE).commit(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /sepolicy/private/property_contexts: -------------------------------------------------------------------------------- 1 | # Camera 2 | ro.camera.req.fmq. u:object_r:exported_default_prop:s0 3 | ro.camera.res.fmq. u:object_r:exported_default_prop:s0 4 | 5 | # Global 6 | ro.boot.hwc u:object_r:exported_default_prop:s0 7 | ro.build.flavor u:object_r:exported_default_prop:s0 8 | ro.carrier.name u:object_r:exported_default_prop:s0 9 | ro.product.marketname u:object_r:build_prop:s0 10 | ro.product.mod_device u:object_r:build_prop:s0 11 | 12 | # IMEI 13 | ro.build.software.version u:object_r:deviceid_prop:s0 14 | persist.radio.imei u:object_r:deviceid_prop:s0 15 | persist.radio.meid u:object_r:deviceid_prop:s0 16 | ro.fota.oem u:object_r:deviceid_prop:s0 17 | ro.ril.miui.imei u:object_r:deviceid_prop:s0 18 | ro.ril.oem.imei u:object_r:deviceid_prop:s0 19 | ro.ril.oem.meid u:object_r:deviceid_prop:s0 20 | 21 | # MIUI 22 | ro.cust.test u:object_r:exported_system_prop:s0 23 | ro.miui. u:object_r:exported_system_prop:s0 24 | 25 | # Ultrasound 26 | elliptic.ultrasound.multiple_mics. u:object_r:elliptic_ultrasound_prop:s0 27 | 28 | # WiFi Display 29 | persist.vendor.setWFDInfo. u:object_r:vendor_wfd_sys_debug_prop:s0 30 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_benchmark.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gps/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | 3 | # Set required flags 4 | GNSS_CFLAGS := \ 5 | -Werror \ 6 | -Wno-error=unused-parameter \ 7 | -Wno-error=macro-redefined \ 8 | -Wno-error=reorder \ 9 | -Wno-error=missing-braces \ 10 | -Wno-error=self-assign \ 11 | -Wno-error=enum-conversion \ 12 | -Wno-error=logical-op-parentheses \ 13 | -Wno-error=null-arithmetic \ 14 | -Wno-error=null-conversion \ 15 | -Wno-error=parentheses-equality \ 16 | -Wno-undefined-bool-conversion \ 17 | -Wno-error=tautological-compare \ 18 | -Wno-error=switch \ 19 | -Wno-error=date-time 20 | 21 | GNSS_HIDL_VERSION = 2.1 22 | 23 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += msm8937 24 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += msm8953 25 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += msm8998 26 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += apq8098_latv 27 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += sdm710 28 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += qcs605 29 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += sdm845 30 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += sdm660 31 | 32 | ifneq (,$(filter $(GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST),$(TARGET_BOARD_PLATFORM))) 33 | GNSS_HIDL_LEGACY_MEASURMENTS = true 34 | endif 35 | 36 | LOCAL_PATH := $(call my-dir) 37 | include $(call all-makefiles-under,$(LOCAL_PATH)) 38 | 39 | GNSS_SANITIZE_DIAG := cfi bounds null unreachable integer address 40 | 41 | endif # ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 42 | -------------------------------------------------------------------------------- /parts/src/org/lineageos/settings/BootCompletedReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The CyanogenMod Project 3 | * 2017-2020 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings; 19 | 20 | import android.content.BroadcastReceiver; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.util.Log; 24 | 25 | import org.lineageos.settings.doze.DozeUtils; 26 | import org.lineageos.settings.thermal.ThermalUtils; 27 | 28 | public class BootCompletedReceiver extends BroadcastReceiver { 29 | 30 | private static final boolean DEBUG = false; 31 | private static final String TAG = "XiaomiParts"; 32 | 33 | @Override 34 | public void onReceive(final Context context, Intent intent) { 35 | if (DEBUG) Log.d(TAG, "Received boot completed intent"); 36 | DozeUtils.checkDozeService(context); 37 | ThermalUtils.startService(context); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /gps/geofence/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -Wundef \ 2 | -Wno-trigraphs \ 3 | -g -O0 \ 4 | -fno-inline \ 5 | -fno-short-enums \ 6 | -fpic \ 7 | ${GPSUTILS_CFLAGS} \ 8 | ${LOCCORE_CFLAGS} \ 9 | $(LOCPLA_CFLAGS) \ 10 | -D__func__=__PRETTY_FUNCTION__ \ 11 | -std=c++1y 12 | 13 | AM_CPPFLAGS = $(AM_CFLAGS) 14 | 15 | ACLOCAL_AMFLAGS = -I m4 16 | 17 | requiredlibs = \ 18 | ${LOCCORE_LIBS} \ 19 | $(GPSUTILS_LIBS) \ 20 | -llog 21 | 22 | h_sources = \ 23 | GeofenceAdapter.h 24 | 25 | c_sources = \ 26 | GeofenceAdapter.cpp \ 27 | location_geofence.cpp 28 | 29 | libgeofencing_la_SOURCES = $(c_sources) 30 | if USE_GLIB 31 | libgeofencing_la_CFLAGS = -DUSE_GLIB @GLIB_CFLAGS@ $(AM_CFLAGS) 32 | libgeofencing_la_CPPFLAGS = -DUSE_GLIB @GLIB_CFLAGS@ $(AM_CFLAGS) $(AM_CPPFLAGS) 33 | libgeofencing_la_LDFLAGS = -lstdc++ -Wl,-z,defs @GLIB_LIBS@ $(requiredlibs) -shared -version-info 1:0:0 34 | libgeofencing_la_LIBDADD = $(requiredlibs) -lstdc++ @GLIB_LIBS@ 35 | else 36 | libgeofencing_la_CFLAGS = $(AM_CFLAGS) 37 | libgeofencing_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 38 | libgeofencing_la_LDFLAGS = -lstdc++ -Wl,-z,defs $(requiredlibs) -shared -version-info 1:0:0 39 | libgeofencing_la_LIBDADD = $(requiredlibs) -lstdc++ 40 | endif 41 | 42 | library_include_HEADERS = $(h_sources) 43 | 44 | library_includedir = $(pkgincludedir) 45 | 46 | lib_LTLIBRARIES = libgeofencing.la 47 | 48 | pkgconfigdir = $(libdir)/pkgconfig 49 | pkgconfig_DATA = location-geofence.pc 50 | EXTRA_DIST = $(pkgconfig_DATA) 51 | -------------------------------------------------------------------------------- /fingerprint/Android.bp: -------------------------------------------------------------------------------- 1 | cc_defaults { 2 | name: "xiaomi_sm6150-fingerprint_defaults", 3 | defaults: ["hidl_defaults"], 4 | vintf_fragments: ["android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sm6150.xml"], 5 | vendor: true, 6 | relative_install_path: "hw", 7 | srcs: [ 8 | "BiometricsFingerprint.cpp", 9 | "service.cpp", 10 | ], 11 | 12 | shared_libs: [ 13 | "libbase", 14 | "libcutils", 15 | "liblog", 16 | "libhidlbase", 17 | "libhardware", 18 | "libutils", 19 | "android.hardware.biometrics.fingerprint@2.1", 20 | "android.hardware.biometrics.fingerprint@2.2", 21 | "android.hardware.biometrics.fingerprint@2.3", 22 | ], 23 | 24 | } 25 | 26 | cc_binary { 27 | name: "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sm6150", 28 | defaults: ["xiaomi_sm6150-fingerprint_defaults"], 29 | init_rc: ["android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sm6150.rc"], 30 | } 31 | 32 | cc_binary { 33 | name: "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sm6150-udfps", 34 | defaults: ["xiaomi_sm6150-fingerprint_defaults"], 35 | init_rc: ["android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sm6150-udfps.rc"], 36 | cflags: ["-DENABLE_UDFPS"], 37 | } 38 | 39 | cc_library_static { 40 | name: "libudfps_extension.xiaomi_sm6150", 41 | srcs: ["UdfpsExtension.cpp"], 42 | include_dirs: [ 43 | "frameworks/native/services/surfaceflinger/CompositionEngine/include", 44 | ], 45 | header_libs: [ 46 | "generated_kernel_headers", 47 | ], 48 | } 49 | -------------------------------------------------------------------------------- /releasetools.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 The Android Open Source Project 2 | # Copyright (c) 2011, The Linux Foundation. All rights reserved. 3 | # Copyright (C) 2017-2018 The LineageOS Project 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | import common 18 | import re 19 | 20 | def FullOTA_InstallEnd(info): 21 | OTA_InstallEnd(info) 22 | return 23 | 24 | def IncrementalOTA_InstallEnd(info): 25 | OTA_InstallEnd(info) 26 | return 27 | 28 | def AddImage(info, basename, dest): 29 | path = "IMAGES/" + basename 30 | if path not in info.input_zip.namelist(): 31 | return 32 | 33 | data = info.input_zip.read(path) 34 | common.ZipWriteStr(info.output_zip, basename, data) 35 | info.script.AppendExtra('package_extract_file("%s", "%s");' % (basename, dest)) 36 | 37 | def OTA_InstallEnd(info): 38 | info.script.Print("Patching firmware images...") 39 | AddImage(info, "dtbo.img", "/dev/block/bootdevice/by-name/dtbo") 40 | AddImage(info, "vbmeta.img", "/dev/block/bootdevice/by-name/vbmeta") 41 | AddImage(info, "vbmeta_system.img", "/dev/block/bootdevice/by-name/vbmeta_system") 42 | return 43 | -------------------------------------------------------------------------------- /fingerprint/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * Copyright (C) 2021 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #define LOG_TAG "android.hardware.biometrics.fingerprint@2.3-service.xiaomi_sm6150" 19 | 20 | #include 21 | 22 | #include "BiometricsFingerprint.h" 23 | 24 | using android::sp; 25 | using android::hardware::configureRpcThreadpool; 26 | using android::hardware::joinRpcThreadpool; 27 | using android::hardware::biometrics::fingerprint::V2_3::IBiometricsFingerprint; 28 | using android::hardware::biometrics::fingerprint::V2_3::implementation::BiometricsFingerprint; 29 | 30 | int main() { 31 | android::sp bio = BiometricsFingerprint::getInstance(); 32 | 33 | configureRpcThreadpool(1, true /*callerWillJoin*/); 34 | 35 | if (bio != nullptr) { 36 | if (::android::OK != bio->registerAsService()) { 37 | return 1; 38 | } 39 | } else { 40 | ALOGE("Can't create instance of BiometricsFingerprint, nullptr"); 41 | } 42 | 43 | joinRpcThreadpool(); 44 | 45 | return 0; // should never get here 46 | } 47 | -------------------------------------------------------------------------------- /sepolicy/vendor/property_contexts: -------------------------------------------------------------------------------- 1 | # Camera 2 | persist.camera. u:object_r:vendor_camera_prop:s0 3 | persist.vendor.camera u:object_r:vendor_camera_prop:s0 4 | vendor.camera. u:object_r:vendor_camera_prop:s0 5 | ro.vendor.camera. u:object_r:vendor_camera_prop:s0 6 | 7 | # Fingerprint 8 | persist.vendor.fpc. u:object_r:vendor_fp_prop:s0 9 | persist.vendor.sys.fp. u:object_r:vendor_fp_prop:s0 10 | ro.hardware.fp u:object_r:vendor_fp_prop:s0 11 | vendor.fps_hal. u:object_r:vendor_fp_prop:s0 12 | vendor.sys.fp u:object_r:vendor_fp_prop:s0 13 | ro.boot.fpsensor u:object_r:vendor_fp_prop:s0 14 | 15 | # Global 16 | ro.boot.factorybuild u:object_r:vendor_public_vendor_default_prop:s0 17 | ro.boot.hwversion u:object_r:vendor_public_vendor_default_prop:s0 18 | 19 | # Power 20 | vendor.powerhal.state u:object_r:vendor_power_prop:s0 21 | vendor.powerhal.audio u:object_r:vendor_power_prop:s0 22 | vendor.powerhal.lpm u:object_r:vendor_power_prop:s0 23 | vendor.powerhal.init u:object_r:vendor_power_prop:s0 24 | vendor.powerhal.rendering u:object_r:vendor_power_prop:s0 25 | 26 | # Mlipay 27 | persist.vendor.sys.pay u:object_r:vendor_tee_listener_prop:s0 28 | 29 | # RIL 30 | ro.vendor.ril u:object_r:vendor_public_vendor_default_prop:s0 31 | 32 | # Thermal 33 | vendor.sys.thermal. u:object_r:vendor_thermal_normal_prop:s0 34 | -------------------------------------------------------------------------------- /keylayout/sm6150-idp-snd-card_Button_Jack.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 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 226 HEADSETHOOK 29 | key 257 VOLUME_UP 30 | key 258 VOLUME_DOWN 31 | -------------------------------------------------------------------------------- /parts/src/org/lineageos/settings/thermal/ThermalActivity.java: -------------------------------------------------------------------------------- 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 | package org.lineageos.settings.thermal; 18 | 19 | import android.os.Bundle; 20 | import android.view.MenuItem; 21 | 22 | import com.android.settingslib.collapsingtoolbar.CollapsingToolbarBaseActivity; 23 | import com.android.settingslib.collapsingtoolbar.R; 24 | 25 | public class ThermalActivity extends CollapsingToolbarBaseActivity { 26 | 27 | private static final String TAG_THERMAL = "thermal"; 28 | private static final String THERMAL_SCONFIG = "/sys/class/thermal/thermal_message/sconfig"; 29 | 30 | @Override 31 | protected void onCreate(Bundle savedInstanceState) { 32 | super.onCreate(savedInstanceState); 33 | getFragmentManager().beginTransaction().replace(R.id.content_frame, 34 | new ThermalSettingsFragment(), TAG_THERMAL).commit(); 35 | } 36 | 37 | @Override 38 | public boolean onOptionsItemSelected(MenuItem item) { 39 | if (item.getItemId() == android.R.id.home) { 40 | onBackPressed(); 41 | return true; 42 | } 43 | return false; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_fingerprint_default.te: -------------------------------------------------------------------------------- 1 | typeattribute hal_fingerprint_default data_between_core_and_vendor_violators; 2 | 3 | # Allow access to the HALs 4 | hal_client_domain(hal_fingerprint_default, vendor_hal_perf) 5 | hal_client_domain(hal_fingerprint_default, hal_power) 6 | 7 | # Allow binder communication with hal_power_default 8 | binder_call(hal_fingerprint_default, hal_power_default) 9 | 10 | # Allow binder communication with vendor_hal_perf_default 11 | binder_call(hal_fingerprint_default, vendor_hal_perf_default) 12 | 13 | allow hal_fingerprint_default fingerprint_data_file:dir rw_dir_perms; 14 | allow hal_fingerprint_default fingerprint_data_file:file create_file_perms; 15 | 16 | allow hal_fingerprint_default { 17 | fingerprint_device 18 | input_device 19 | tee_device 20 | uhid_device 21 | }: chr_file rw_file_perms; 22 | 23 | allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl; 24 | 25 | allow hal_fingerprint_default { 26 | input_device 27 | vendor_sysfs_graphics 28 | sysfs_msm_subsys 29 | }: dir r_dir_perms; 30 | 31 | allow hal_fingerprint_default { 32 | vendor_sysfs_fingerprint 33 | vendor_sysfs_graphics 34 | sysfs_msm_subsys 35 | }: file rw_file_perms; 36 | 37 | r_dir_file(hal_fingerprint_default, firmware_file) 38 | 39 | get_prop(system_server, vendor_fp_prop); 40 | 41 | set_prop(hal_fingerprint_default, vendor_fp_prop) 42 | 43 | allow hal_fingerprint_default vendor_sysfs_spss:dir { search }; 44 | allow hal_fingerprint_default vendor_sysfs_spss:file { open read }; 45 | 46 | add_hwservice(hal_fingerprint_default, hal_fingerprint_hwservice_xiaomi) 47 | 48 | allow hal_fingerprint_default vendor_sysfs_fod:file rw_file_perms; 49 | allow hal_fingerprint_default vendor_sysfs_graphics:file rw_file_perms; 50 | 51 | allow hal_fingerprint_default touchfeature_device:chr_file rw_file_perms; 52 | -------------------------------------------------------------------------------- /gps/gps_vendor_product.mk: -------------------------------------------------------------------------------- 1 | # HAL packages 2 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 3 | 4 | # GPS-HIDL 5 | LOC_BOARD_PLATFORM_LIST += msm8937 6 | LOC_BOARD_PLATFORM_LIST += msm8953 7 | LOC_BOARD_PLATFORM_LIST += msm8998 8 | LOC_BOARD_PLATFORM_LIST += apq8098_latv 9 | LOC_BOARD_PLATFORM_LIST += sdm710 10 | LOC_BOARD_PLATFORM_LIST += qcs605 11 | LOC_BOARD_PLATFORM_LIST += sdm845 12 | LOC_BOARD_PLATFORM_LIST += sdm660 13 | LOC_BOARD_PLATFORM_LIST += msmnile 14 | LOC_BOARD_PLATFORM_LIST += sdmshrike 15 | LOC_BOARD_PLATFORM_LIST += $(MSMSTEPPE) 16 | LOC_BOARD_PLATFORM_LIST += $(TRINKET) 17 | LOC_BOARD_PLATFORM_LIST += kona 18 | LOC_BOARD_PLATFORM_LIST += atoll 19 | LOC_BOARD_PLATFORM_LIST += lito 20 | LOC_BOARD_PLATFORM_LIST += bengal 21 | LOC_BOARD_PLATFORM_LIST += lahaina 22 | LOC_BOARD_PLATFORM_LIST += holi 23 | 24 | # Add product packages 25 | ifneq (,$(filter $(LOC_BOARD_PLATFORM_LIST),$(TARGET_BOARD_PLATFORM))) 26 | 27 | PRODUCT_PACKAGES += gps.conf 28 | PRODUCT_PACKAGES += flp.conf 29 | PRODUCT_PACKAGES += gnss_antenna_info.conf 30 | PRODUCT_PACKAGES += gnss@2.0-base.policy 31 | PRODUCT_PACKAGES += gnss@2.0-xtra-daemon.policy 32 | PRODUCT_PACKAGES += gnss@2.0-xtwifi-client.policy 33 | PRODUCT_PACKAGES += gnss@2.0-xtwifi-inet-agent.policy 34 | PRODUCT_PACKAGES += libloc_pla_headers 35 | PRODUCT_PACKAGES += liblocation_api_headers 36 | PRODUCT_PACKAGES += libgps.utils_headers 37 | PRODUCT_PACKAGES += liblocation_api 38 | PRODUCT_PACKAGES += libgps.utils 39 | PRODUCT_PACKAGES += libbatching 40 | PRODUCT_PACKAGES += libgeofencing 41 | PRODUCT_PACKAGES += libloc_core 42 | PRODUCT_PACKAGES += libgnss 43 | 44 | PRODUCT_PACKAGES += android.hardware.gnss@2.1-impl-qti 45 | PRODUCT_PACKAGES += android.hardware.gnss@2.1-service-qti 46 | 47 | endif # ifneq (,$(filter $(LOC_BOARD_PLATFORM_LIST),$(TARGET_BOARD_PLATFORM))) 48 | endif # ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 49 | -------------------------------------------------------------------------------- /gps/utils/LocLoggerBase.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 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 | #ifndef LOC_LOGGER_BASE_H 30 | #define LOC_LOGGER_BASE_H 31 | 32 | namespace loc_util { 33 | class LocLoggerBase { 34 | public: 35 | virtual void log() {} 36 | }; 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /gps/android/1.0/android.hardware.gnss@1.0-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.0::IGnss/default 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /gps/android/1.1/android.hardware.gnss@1.1-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.1::IGnss/default 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /gps/android/utils/battery_listener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, 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 6 | * 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 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer in the documentation and/or other materials provided 12 | * with the distribution. 13 | * * Neither the name of The Linux Foundation nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | typedef void (* battery_status_change_fn_t)(bool); 30 | void loc_extn_battery_properties_listener_init(battery_status_change_fn_t fn); 31 | void loc_extn_battery_properties_listener_deinit(); 32 | bool loc_extn_battery_properties_is_charging(); 33 | -------------------------------------------------------------------------------- /gps/android/1.0/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 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 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 18 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 19 | 20 | 21 | #include 22 | #include 23 | 24 | namespace android { 25 | namespace hardware { 26 | namespace gnss { 27 | namespace V1_0 { 28 | namespace implementation { 29 | 30 | using ::android::hardware::gnss::V1_0::IGnssDebug; 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | using ::android::hardware::hidl_vec; 34 | using ::android::hardware::hidl_string; 35 | using ::android::sp; 36 | 37 | /* Interface for GNSS Debug support. */ 38 | struct Gnss; 39 | struct GnssDebug : public IGnssDebug { 40 | GnssDebug(Gnss* gnss); 41 | ~GnssDebug() {}; 42 | 43 | /* 44 | * Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow. 45 | * These declarations were generated from IGnssDebug.hal. 46 | */ 47 | Return getDebugData(getDebugData_cb _hidl_cb) override; 48 | 49 | private: 50 | Gnss* mGnss = nullptr; 51 | }; 52 | 53 | } // namespace implementation 54 | } // namespace V1_0 55 | } // namespace gnss 56 | } // namespace hardware 57 | } // namespace android 58 | 59 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 60 | -------------------------------------------------------------------------------- /gps/android/1.1/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 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 | #ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H 18 | #define ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H 19 | 20 | 21 | #include 22 | #include 23 | 24 | namespace android { 25 | namespace hardware { 26 | namespace gnss { 27 | namespace V1_1 { 28 | namespace implementation { 29 | 30 | using ::android::hardware::gnss::V1_0::IGnssDebug; 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | using ::android::hardware::hidl_vec; 34 | using ::android::hardware::hidl_string; 35 | using ::android::sp; 36 | 37 | /* Interface for GNSS Debug support. */ 38 | struct Gnss; 39 | struct GnssDebug : public IGnssDebug { 40 | GnssDebug(Gnss* gnss); 41 | ~GnssDebug() {}; 42 | 43 | /* 44 | * Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow. 45 | * These declarations were generated from IGnssDebug.hal. 46 | */ 47 | Return getDebugData(getDebugData_cb _hidl_cb) override; 48 | 49 | private: 50 | Gnss* mGnss = nullptr; 51 | }; 52 | 53 | } // namespace implementation 54 | } // namespace V1_1 55 | } // namespace gnss 56 | } // namespace hardware 57 | } // namespace android 58 | 59 | #endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H 60 | -------------------------------------------------------------------------------- /gps/android/2.0/android.hardware.gnss@2.0-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.1::IGnss/default 33 | @2.0::IGnss/default 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /gps/android/2.1/android.hardware.gnss@2.1-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.1::IGnss/default 33 | @2.1::IGnss/default 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /rootdir/bin/init.qcom.early_boot.sh: -------------------------------------------------------------------------------- 1 | #!/vendor/bin/sh 2 | # Copyright (c) 2012-2013,2016,2018-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 | export PATH=/vendor/bin 30 | 31 | # Allow system_graphics group to access pmic secure_mode node 32 | set_perms /sys/class/lcd_bias/secure_mode system.graphics 0660 33 | set_perms /sys/class/leds/wled/secure_mode system.graphics 0660 34 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_browser.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /compatibility_matrix.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.frameworks.schedulerservice 4 | 1.0 5 | 6 | ISchedulingPolicyService 7 | default 8 | 9 | 10 | 11 | android.frameworks.sensorservice 12 | 1.0 13 | 14 | ISensorManager 15 | default 16 | 17 | 18 | 19 | android.hidl.allocator 20 | 1.0 21 | 22 | IAllocator 23 | ashmem 24 | 25 | 26 | 27 | android.hidl.manager 28 | 1.0 29 | 30 | IServiceManager 31 | default 32 | 33 | 34 | 35 | android.hidl.memory 36 | 1.0 37 | 38 | IMapper 39 | ashmem 40 | 41 | 42 | 43 | android.hidl.token 44 | 1.0 45 | 46 | ITokenManager 47 | default 48 | 49 | 50 | 51 | android.system.wifi.keystore 52 | 1.0 53 | 54 | IKeystore 55 | default 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /gps/android/2.0/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 23 | 24 | 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V2_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V2_0::IGnssDebug; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | /* Interface for GNSS Debug support. */ 42 | struct Gnss; 43 | struct GnssDebug : public IGnssDebug { 44 | GnssDebug(Gnss* gnss); 45 | ~GnssDebug() {}; 46 | 47 | // Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow 48 | Return getDebugData(getDebugData_cb _hidl_cb) override; 49 | // Methods from ::android::hardware::gnss::V2_0::IGnssDebug follow. 50 | Return getDebugData_2_0(getDebugData_2_0_cb _hidl_cb) override; 51 | 52 | private: 53 | Gnss* mGnss = nullptr; 54 | }; 55 | 56 | } // namespace implementation 57 | } // namespace V2_0 58 | } // namespace gnss 59 | } // namespace hardware 60 | } // namespace android 61 | 62 | #endif // ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 63 | -------------------------------------------------------------------------------- /gps/android/2.1/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 23 | 24 | 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V2_1 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V2_0::IGnssDebug; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | /* Interface for GNSS Debug support. */ 42 | struct Gnss; 43 | struct GnssDebug : public IGnssDebug { 44 | GnssDebug(Gnss* gnss); 45 | ~GnssDebug() {}; 46 | 47 | // Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow 48 | Return getDebugData(getDebugData_cb _hidl_cb) override; 49 | // Methods from ::android::hardware::gnss::V2_0::IGnssDebug follow. 50 | Return getDebugData_2_0(getDebugData_2_0_cb _hidl_cb) override; 51 | 52 | private: 53 | Gnss* mGnss = nullptr; 54 | }; 55 | 56 | } // namespace implementation 57 | } // namespace V2_1 58 | } // namespace gnss 59 | } // namespace hardware 60 | } // namespace android 61 | 62 | #endif // ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 63 | -------------------------------------------------------------------------------- /gps/geofence/configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ(2.61) 2 | AC_INIT([location-geofence], 1.0.0) 3 | AM_INIT_AUTOMAKE([foreign subdir-objects]) 4 | AC_CONFIG_SRCDIR([Makefile.am]) 5 | AC_CONFIG_HEADERS([config.h]) 6 | AC_CONFIG_MACRO_DIR([m4]) 7 | 8 | # Check for programs 9 | AC_PROG_LIBTOOL 10 | AC_PROG_CXX 11 | AC_PROG_CC 12 | AM_PROG_CC_C_O 13 | AC_PROG_AWK 14 | AC_PROG_CPP 15 | AC_PROG_INSTALL 16 | AC_PROG_LN_S 17 | AC_PROG_MAKE_SET 18 | PKG_PROG_PKG_CONFIG 19 | 20 | # Check for libraries 21 | PKG_CHECK_MODULES([GPSUTILS], [gps-utils]) 22 | AC_SUBST([GPSUTILS_CFLAGS]) 23 | AC_SUBST([GPSUTILS_LIBS]) 24 | 25 | PKG_CHECK_MODULES([LOCCORE], [loc-core]) 26 | AC_SUBST([LOCCORE_CFLAGS]) 27 | AC_SUBST([LOCCORE_LIBS]) 28 | 29 | AS_CASE([$host], 30 | [arm*], [ARM=yes], 31 | [ARM=no] 32 | ) 33 | 34 | AC_ARG_WITH([locpla_includes], 35 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 36 | [specify the path to locpla-includes in loc-pla_git.bb]), 37 | [locpla_incdir=$withval], 38 | with_locpla_includes=no) 39 | 40 | if test "x$with_locpla_includes" != "xno"; then 41 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 42 | fi 43 | 44 | AC_ARG_WITH([glib], 45 | AC_HELP_STRING([--with-glib], 46 | [enable glib, building HLOS systems which use glib])) 47 | 48 | if (test "x${with_glib}" = "xyes"); then 49 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 50 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 51 | AC_MSG_ERROR(GThread >= 2.16 is required)) 52 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 53 | AC_MSG_ERROR(GLib >= 2.16 is required)) 54 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 55 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 56 | 57 | AC_SUBST(GLIB_CFLAGS) 58 | AC_SUBST(GLIB_LIBS) 59 | fi 60 | 61 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 62 | 63 | AC_SUBST([CFLAGS]) 64 | AC_SUBST([CPPFLAGS]) 65 | AC_SUBST([LIBS]) 66 | 67 | AC_CONFIG_FILES([ \ 68 | Makefile \ 69 | location-geofence.pc 70 | ]) 71 | 72 | AC_OUTPUT 73 | -------------------------------------------------------------------------------- /gps/etc/seccomp_policy/gnss@2.0-xtra-daemon.policy: -------------------------------------------------------------------------------- 1 | #******************************************************************************* 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 6 | # 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 10 | # copyright notice, this list of conditions and the following 11 | # disclaimer in the documentation and/or other materials provided 12 | # with the distribution. 13 | # * Neither the name of The Linux Foundation, nor the names of its 14 | # contributors may be used to endorse or promote products derived 15 | # from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | #****************************************************************************** 30 | bind: 1 31 | getrlimit: 1 32 | 33 | pipe2: 1 34 | 35 | sched_getaffinity: 1 36 | timerfd_create: 1 37 | unlinkat: 1 38 | setpriority: 1 39 | 40 | epoll_create1: 1 41 | epoll_ctl: 1 42 | epoll_pwait: 1 43 | timerfd_settime: 1 44 | 45 | fdatasync: 1 46 | madvise: 1 47 | ftruncate: 1 48 | 49 | -------------------------------------------------------------------------------- /gps/etc/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 | -------------------------------------------------------------------------------- /gps/utils/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = -Wundef \ 4 | -MD \ 5 | -Wno-trigraphs \ 6 | -g -O0 \ 7 | -fno-inline \ 8 | -fno-short-enums \ 9 | -fpic \ 10 | -I./ \ 11 | -std=c++14 \ 12 | $(LOCPLA_CFLAGS) 13 | 14 | libgps_utils_la_h_sources = \ 15 | msg_q.h \ 16 | linked_list.h \ 17 | loc_cfg.h \ 18 | loc_log.h \ 19 | loc_target.h \ 20 | loc_timer.h \ 21 | MsgTask.h \ 22 | LocHeap.h \ 23 | LocThread.h \ 24 | LocTimer.h \ 25 | LocIpc.h \ 26 | SkipList.h\ 27 | loc_misc_utils.h \ 28 | loc_nmea.h \ 29 | gps_extended_c.h \ 30 | gps_extended.h \ 31 | loc_gps.h \ 32 | log_util.h \ 33 | LocSharedLock.h \ 34 | LocUnorderedSetMap.h\ 35 | LocLoggerBase.h 36 | 37 | libgps_utils_la_c_sources = \ 38 | linked_list.c \ 39 | msg_q.c \ 40 | loc_cfg.cpp \ 41 | loc_log.cpp \ 42 | loc_target.cpp \ 43 | LocHeap.cpp \ 44 | LocTimer.cpp \ 45 | LocThread.cpp \ 46 | LocIpc.cpp \ 47 | LogBuffer.cpp \ 48 | MsgTask.cpp \ 49 | loc_misc_utils.cpp \ 50 | loc_nmea.cpp 51 | 52 | library_includedir = $(pkgincludedir) 53 | 54 | library_include_HEADERS = $(libgps_utils_la_h_sources) 55 | 56 | libgps_utils_la_SOURCES = $(libgps_utils_la_c_sources) 57 | 58 | if USE_GLIB 59 | libgps_utils_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 60 | libgps_utils_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 61 | libgps_utils_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 62 | else 63 | libgps_utils_la_CFLAGS = $(AM_CFLAGS) 64 | libgps_utils_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 65 | libgps_utils_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 66 | endif 67 | 68 | libgps_utils_la_LIBADD = $(CUTILS_LIBS) -ldl 69 | 70 | #Create and Install libraries 71 | lib_LTLIBRARIES = libgps_utils.la 72 | 73 | pkgconfigdir = $(libdir)/pkgconfig 74 | pkgconfig_DATA = gps-utils.pc 75 | EXTRA_DIST = $(pkgconfig_DATA) 76 | -------------------------------------------------------------------------------- /reorder-libs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright (C) 2021 The LineageOS Project 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | 8 | from functools import cmp_to_key 9 | from locale import LC_ALL, setlocale, strcoll 10 | from pathlib import Path 11 | 12 | FILES = [Path(file) for file in [ 13 | "proprietary-files.txt", 14 | ]] 15 | 16 | setlocale(LC_ALL, "C") 17 | 18 | def strcoll_extract_utils(string1: str, string2: str) -> int: 19 | # Skip logic if one of the string if empty 20 | if not string1 or not string2: 21 | return strcoll(string1, string2) 22 | 23 | # Remove '-' from strings if there, 24 | # it is used to indicate a build target 25 | string1 = string1.removeprefix('-') 26 | string2 = string2.removeprefix('-') 27 | 28 | # If no directories, compare normally 29 | if not "/" in string1 and not "/" in string2: 30 | return strcoll(string1, string2) 31 | 32 | string1_dir = string1.rsplit("/", 1)[0] + "/" 33 | string2_dir = string2.rsplit("/", 1)[0] + "/" 34 | if string1_dir == string2_dir: 35 | # Same directory, compare normally 36 | return strcoll(string1, string2) 37 | 38 | if string1_dir.startswith(string2_dir): 39 | # First string dir is a subdirectory of the second one, 40 | # return string1 > string2 41 | return -1 42 | 43 | if string2_dir.startswith(string1_dir): 44 | # Second string dir is a subdirectory of the first one, 45 | # return string2 > string1 46 | return 1 47 | 48 | # Compare normally 49 | return strcoll(string1, string2) 50 | 51 | for file in FILES: 52 | if not file.is_file(): 53 | print(f"File {str(file)} not found") 54 | continue 55 | 56 | with open(file, 'r') as f: 57 | sections = f.read().split("\n\n") 58 | 59 | ordered_sections = [] 60 | for section in sections: 61 | section_list = [line.strip() for line in section.splitlines()] 62 | section_list.sort(key=cmp_to_key(strcoll_extract_utils)) 63 | ordered_sections.append("\n".join(section_list)) 64 | 65 | with open(file, 'w') as f: 66 | f.write("\n\n".join(ordered_sections).strip() + "\n") 67 | -------------------------------------------------------------------------------- /extract-files.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 | # Default to sanitizing the vendor folder before extraction 25 | CLEAN_VENDOR=true 26 | 27 | ONLY_COMMON= 28 | ONLY_TARGET= 29 | KANG= 30 | SECTION= 31 | 32 | while [ "${#}" -gt 0 ]; do 33 | case "${1}" in 34 | --only-common ) 35 | ONLY_COMMON=true 36 | ;; 37 | --only-target ) 38 | ONLY_TARGET=true 39 | ;; 40 | -n | --no-cleanup ) 41 | CLEAN_VENDOR=false 42 | ;; 43 | -k | --kang ) 44 | KANG="--kang" 45 | ;; 46 | -s | --section ) 47 | SECTION="${2}"; shift 48 | CLEAN_VENDOR=false 49 | ;; 50 | * ) 51 | SRC="${1}" 52 | ;; 53 | esac 54 | shift 55 | done 56 | 57 | if [ -z "${SRC}" ]; then 58 | SRC="adb" 59 | fi 60 | 61 | if [ -z "${ONLY_TARGET}" ]; then 62 | # Initialize the helper for common device 63 | setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}" 64 | 65 | extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" 66 | fi 67 | 68 | if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then 69 | # Reinitialize the helper for device 70 | source "${MY_DIR}/../${DEVICE}/extract-files.sh" 71 | setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" 72 | 73 | extract "${MY_DIR}/../${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" 74 | fi 75 | 76 | "${MY_DIR}/setup-makefiles.sh" 77 | -------------------------------------------------------------------------------- /power/power-mode.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 | #include 19 | #include 20 | #include 21 | 22 | // defines from drivers/input/touchscreen/xiaomi/xiaomi_touch.h 23 | #define SET_CUR_VALUE 0 24 | #define Touch_Doubletap_Mode 14 25 | 26 | #define TOUCH_DEV_PATH "/dev/xiaomi-touch" 27 | 28 | #define TOUCH_MAGIC 0x5400 29 | #define TOUCH_IOC_SETMODE TOUCH_MAGIC + SET_CUR_VALUE 30 | 31 | namespace aidl { 32 | namespace google { 33 | namespace hardware { 34 | namespace power { 35 | namespace impl { 36 | namespace pixel { 37 | 38 | using ::aidl::android::hardware::power::Mode; 39 | 40 | bool isDeviceSpecificModeSupported(Mode type, bool* _aidl_return) { 41 | switch (type) { 42 | case Mode::DOUBLE_TAP_TO_WAKE: 43 | *_aidl_return = true; 44 | return true; 45 | default: 46 | return false; 47 | } 48 | } 49 | 50 | bool setDeviceSpecificMode(Mode type, bool enabled) { 51 | switch (type) { 52 | case Mode::DOUBLE_TAP_TO_WAKE: { 53 | int fd = open(TOUCH_DEV_PATH, O_RDWR); 54 | int arg[2] = {Touch_Doubletap_Mode, enabled ? 1 : 0}; 55 | ioctl(fd, TOUCH_IOC_SETMODE, &arg); 56 | close(fd); 57 | return true; 58 | } 59 | default: 60 | return false; 61 | } 62 | } 63 | 64 | } // namespace pixel 65 | } // namespace impl 66 | } // namespace power 67 | } // namespace hardware 68 | } // namespace android 69 | } // namespace aidl 70 | -------------------------------------------------------------------------------- /libinit/libinit_dalvik_heap.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | 12 | #define HEAPSTARTSIZE_PROP "dalvik.vm.heapstartsize" 13 | #define HEAPGROWTHLIMIT_PROP "dalvik.vm.heapgrowthlimit" 14 | #define HEAPSIZE_PROP "dalvik.vm.heapsize" 15 | #define HEAPMINFREE_PROP "dalvik.vm.heapminfree" 16 | #define HEAPMAXFREE_PROP "dalvik.vm.heapmaxfree" 17 | #define HEAPTARGETUTILIZATION_PROP "dalvik.vm.heaptargetutilization" 18 | 19 | #define GB(b) (b * 1024ull * 1024 * 1024) 20 | 21 | static const dalvik_heap_info_t dalvik_heap_info_6144 = { 22 | .heapstartsize = "16m", 23 | .heapgrowthlimit = "256m", 24 | .heapsize = "512m", 25 | .heapminfree = "8m", 26 | .heapmaxfree = "32m", 27 | .heaptargetutilization = "0.5", 28 | }; 29 | 30 | static const dalvik_heap_info_t dalvik_heap_info_4096 = { 31 | .heapstartsize = "8m", 32 | .heapgrowthlimit = "256m", 33 | .heapsize = "512m", 34 | .heapminfree = "8m", 35 | .heapmaxfree = "16m", 36 | .heaptargetutilization = "0.6", 37 | }; 38 | 39 | static const dalvik_heap_info_t dalvik_heap_info_2048 = { 40 | .heapstartsize = "8m", 41 | .heapgrowthlimit = "192m", 42 | .heapsize = "512m", 43 | .heapminfree = "512k", 44 | .heapmaxfree = "8m", 45 | .heaptargetutilization = "0.75", 46 | }; 47 | 48 | void set_dalvik_heap() { 49 | struct sysinfo sys; 50 | const dalvik_heap_info_t *dhi; 51 | 52 | sysinfo(&sys); 53 | 54 | if (sys.totalram > GB(5)) 55 | dhi = &dalvik_heap_info_6144; 56 | else if (sys.totalram > GB(3)) 57 | dhi = &dalvik_heap_info_4096; 58 | else 59 | dhi = &dalvik_heap_info_2048; 60 | 61 | property_override(HEAPSTARTSIZE_PROP, dhi->heapstartsize); 62 | property_override(HEAPGROWTHLIMIT_PROP, dhi->heapgrowthlimit); 63 | property_override(HEAPSIZE_PROP, dhi->heapsize); 64 | property_override(HEAPTARGETUTILIZATION_PROP, dhi->heaptargetutilization); 65 | property_override(HEAPMINFREE_PROP, dhi->heapminfree); 66 | property_override(HEAPMAXFREE_PROP, dhi->heapmaxfree); 67 | } 68 | -------------------------------------------------------------------------------- /gps/utils/MsgTask.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2013, 2015, 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 | #ifndef __MSG_TASK__ 30 | #define __MSG_TASK__ 31 | 32 | #include 33 | #include 34 | 35 | namespace loc_util { 36 | 37 | struct LocMsg { 38 | inline LocMsg() {} 39 | inline virtual ~LocMsg() {} 40 | virtual void proc() const = 0; 41 | inline virtual void log() const {} 42 | }; 43 | 44 | class MsgTask { 45 | const void* mQ; 46 | LocThread mThread; 47 | public: 48 | ~MsgTask() = default; 49 | MsgTask(const char* threadName = NULL); 50 | void sendMsg(const LocMsg* msg) const; 51 | void sendMsg(const std::function runnable) const; 52 | }; 53 | 54 | } // 55 | 56 | #endif //__MSG_TASK__ 57 | -------------------------------------------------------------------------------- /parts/res/xml/doze_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 21 | 22 | 26 | 27 | 34 | 35 | 38 | 39 | 45 | 46 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /gps/core/data-items/DataItemsFactoryProxy.h: -------------------------------------------------------------------------------- 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 | #ifndef __DATAITEMFACTORYBASE__ 31 | #define __DATAITEMFACTORYBASE__ 32 | 33 | #include 34 | #include 35 | 36 | namespace loc_core 37 | { 38 | 39 | #define DATA_ITEMS_LIB_NAME "libdataitems.so" 40 | #define DATA_ITEMS_GET_CONCRETE_DI "getConcreteDataItem" 41 | 42 | typedef IDataItemCore * (get_concrete_data_item_fn)(DataItemId); 43 | 44 | class DataItemsFactoryProxy { 45 | public: 46 | static IDataItemCore* createNewDataItem(DataItemId id); 47 | static void closeDataItemLibraryHandle(); 48 | static void *dataItemLibHandle; 49 | static get_concrete_data_item_fn *getConcreteDIFunc; 50 | }; 51 | 52 | } // namespace loc_core 53 | 54 | #endif //__DATAITEMFACTORYBASE__ 55 | 56 | -------------------------------------------------------------------------------- /configs/excluded-input-devices.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /gps/batching/configure.ac: -------------------------------------------------------------------------------- 1 | # configure.ac -- Autoconf script for gps location-batching 2 | # 3 | # Process this file with autoconf to produce a configure script 4 | 5 | # Requires autoconf tool later than 2.61 6 | AC_PREREQ(2.61) 7 | # Initialize the gps location-batching package version 1.0.0 8 | AC_INIT([location-batching],1.0.0) 9 | # Does not strictly follow GNU Coding standards 10 | AM_INIT_AUTOMAKE([foreign subdir-objects]) 11 | # Disables auto rebuilding of configure, Makefile.ins 12 | AM_MAINTAINER_MODE 13 | # Verifies the --srcdir is correct by checking for the path 14 | AC_CONFIG_SRCDIR([Makefile.am]) 15 | # defines some macros variable to be included by source 16 | AC_CONFIG_HEADERS([config.h]) 17 | AC_CONFIG_MACRO_DIR([m4]) 18 | 19 | # Checks for programs. 20 | AC_PROG_LIBTOOL 21 | AC_PROG_CXX 22 | AC_PROG_CC 23 | AM_PROG_CC_C_O 24 | AC_PROG_AWK 25 | AC_PROG_CPP 26 | AC_PROG_INSTALL 27 | AC_PROG_LN_S 28 | AC_PROG_MAKE_SET 29 | PKG_PROG_PKG_CONFIG 30 | 31 | # Checks for libraries. 32 | PKG_CHECK_MODULES([GPSUTILS], [gps-utils]) 33 | AC_SUBST([GPSUTILS_CFLAGS]) 34 | AC_SUBST([GPSUTILS_LIBS]) 35 | 36 | PKG_CHECK_MODULES([LOCCORE], [loc-core]) 37 | AC_SUBST([LOCCORE_CFLAGS]) 38 | AC_SUBST([LOCCORE_LIBS]) 39 | 40 | AC_ARG_WITH([locpla_includes], 41 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 42 | [specify the path to locpla-includes in loc-pla_git.bb]), 43 | [locpla_incdir=$withval], 44 | with_locpla_includes=no) 45 | 46 | if test "x$with_locpla_includes" != "xno"; then 47 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 48 | fi 49 | 50 | AC_ARG_WITH([glib], 51 | AC_HELP_STRING([--with-glib], 52 | [enable glib, building HLOS systems which use glib])) 53 | 54 | if (test "x${with_glib}" = "xyes"); then 55 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 56 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 57 | AC_MSG_ERROR(GThread >= 2.16 is required)) 58 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 59 | AC_MSG_ERROR(GLib >= 2.16 is required)) 60 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 61 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 62 | 63 | AC_SUBST(GLIB_CFLAGS) 64 | AC_SUBST(GLIB_LIBS) 65 | fi 66 | 67 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 68 | 69 | AC_CONFIG_FILES([ \ 70 | Makefile \ 71 | location-batching.pc 72 | ]) 73 | 74 | AC_OUTPUT 75 | -------------------------------------------------------------------------------- /gps/core/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = -I./ \ 4 | $(LOCPLA_CFLAGS) \ 5 | $(GPSUTILS_CFLAGS) \ 6 | -I./data-items/ \ 7 | -I./data-items/common \ 8 | -I./observer \ 9 | -I$(WORKSPACE)/gps-noship/flp \ 10 | -D__func__=__PRETTY_FUNCTION__ \ 11 | -fno-short-enums \ 12 | -std=c++11 13 | 14 | libloc_core_la_h_sources = \ 15 | LocApiBase.h \ 16 | LocAdapterBase.h \ 17 | ContextBase.h \ 18 | LocContext.h \ 19 | LBSProxyBase.h \ 20 | loc_core_log.h \ 21 | LocAdapterProxyBase.h \ 22 | EngineHubProxyBase.h \ 23 | data-items/DataItemId.h \ 24 | data-items/IDataItemCore.h \ 25 | data-items/DataItemConcreteTypesBase.h \ 26 | observer/IDataItemObserver.h \ 27 | observer/IDataItemSubscription.h \ 28 | observer/IFrameworkActionReq.h \ 29 | observer/IOsObserver.h \ 30 | SystemStatusOsObserver.h \ 31 | SystemStatus.h 32 | 33 | libloc_core_la_c_sources = \ 34 | LocApiBase.cpp \ 35 | LocAdapterBase.cpp \ 36 | ContextBase.cpp \ 37 | LocContext.cpp \ 38 | loc_core_log.cpp \ 39 | data-items/DataItemsFactoryProxy.cpp \ 40 | SystemStatusOsObserver.cpp \ 41 | SystemStatus.cpp 42 | 43 | if USE_EXTERNAL_AP 44 | AM_CFLAGS += -DFEATURE_EXTERNAL_AP 45 | endif 46 | 47 | library_includedir = $(pkgincludedir) 48 | 49 | library_include_HEADERS = $(libloc_core_la_h_sources) 50 | 51 | libloc_core_la_SOURCES = $(libloc_core_la_c_sources) 52 | 53 | if USE_GLIB 54 | libloc_core_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 55 | libloc_core_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 56 | libloc_core_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 57 | else 58 | libloc_core_la_CFLAGS = $(AM_CFLAGS) 59 | libloc_core_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 60 | libloc_core_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 61 | endif 62 | 63 | if USE_FEATURE_AUTOMOTIVE 64 | AM_CFLAGS += -DFEATURE_AUTOMOTIVE 65 | endif 66 | 67 | libloc_core_la_LIBADD = -ldl $(GPSUTILS_LIBS) 68 | 69 | #Create and Install libraries 70 | lib_LTLIBRARIES = libloc_core.la 71 | 72 | pkgconfigdir = $(libdir)/pkgconfig 73 | pkgconfig_DATA = loc-core.pc 74 | EXTRA_DIST = $(pkgconfig_DATA) 75 | -------------------------------------------------------------------------------- /gps/CleanSpec.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2007 The Android Open Source 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 | 16 | # If you don't need to do a full clean build but would like to touch 17 | # a file or delete some intermediate files, add a clean step to the end 18 | # of the list. These steps will only be run once, if they haven't been 19 | # run before. 20 | # 21 | # E.g.: 22 | # $(call add-clean-step, touch -c external/sqlite/sqlite3.h) 23 | # $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) 24 | # 25 | # Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with 26 | # files that are missing or have been moved. 27 | # 28 | # Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. 29 | # Use $(OUT_DIR) to refer to the "out" directory. 30 | # 31 | # If you need to re-do something that's already mentioned, just copy 32 | # the command and add it to the bottom of the list. E.g., if a change 33 | # that you made last week required touching a file and a change you 34 | # made today requires touching the same file, just copy the old 35 | # touch step and add it to the end of the list. 36 | # 37 | # ************************************************ 38 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 39 | # ************************************************ 40 | 41 | # For example: 42 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) 43 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) 44 | #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) 45 | #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) 46 | 47 | # ************************************************ 48 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 49 | # ************************************************ 50 | $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libloc_api*) 51 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_gaming.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gps/core/LocContext.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2014, 2017-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 | #ifndef __LOC_CONTEXT__ 30 | #define __LOC_CONTEXT__ 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | namespace loc_core { 38 | 39 | class LocContext : public ContextBase { 40 | static const MsgTask* mMsgTask; 41 | static ContextBase* mContext; 42 | static const MsgTask* getMsgTask(const char* name); 43 | static pthread_mutex_t mGetLocContextMutex; 44 | 45 | protected: 46 | LocContext(const MsgTask* msgTask); 47 | inline virtual ~LocContext() {} 48 | 49 | public: 50 | static const char* mLBSLibName; 51 | static const char* mLocationHalName; 52 | 53 | static ContextBase* getLocContext(const char* name); 54 | 55 | static void injectFeatureConfig(ContextBase *context); 56 | }; 57 | 58 | } 59 | 60 | #endif //__LOC_CONTEXT__ 61 | -------------------------------------------------------------------------------- /gps/android/1.0/GnssConfiguration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | 6 | /* Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | 22 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H 23 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H 24 | 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V1_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V1_0::IGnssConfiguration; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | /* 42 | * Interface for passing GNSS configuration info from platform to HAL. 43 | */ 44 | struct Gnss; 45 | struct GnssConfiguration : public IGnssConfiguration { 46 | GnssConfiguration(Gnss* gnss); 47 | ~GnssConfiguration() = default; 48 | 49 | /* 50 | * Methods from ::android::hardware::gnss::V1_0::IGnssConfiguration follow. 51 | * These declarations were generated from IGnssConfiguration.hal. 52 | */ 53 | Return setSuplVersion(uint32_t version) override; 54 | Return setSuplMode(uint8_t mode) override; 55 | Return setSuplEs(bool enabled) override; 56 | Return setLppProfile(uint8_t lppProfileMask) override; 57 | Return setGlonassPositioningProtocol(uint8_t protocol) override; 58 | Return setEmergencySuplPdn(bool enable) override; 59 | Return setGpsLock(uint8_t lock) override; 60 | 61 | private: 62 | Gnss* mGnss = nullptr; 63 | }; 64 | 65 | } // namespace implementation 66 | } // namespace V1_0 67 | } // namespace gnss 68 | } // namespace hardware 69 | } // namespace android 70 | 71 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H 72 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_default.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gps/android/1.0/GnssNi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H 22 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H 23 | 24 | #include 25 | #include 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace gnss { 30 | namespace V1_0 { 31 | namespace implementation { 32 | 33 | using ::android::hardware::gnss::V1_0::IGnssNi; 34 | using ::android::hardware::gnss::V1_0::IGnssNiCallback; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | struct Gnss; 42 | struct GnssNi : public IGnssNi { 43 | GnssNi(Gnss* gnss); 44 | ~GnssNi() = default; 45 | 46 | /* 47 | * Methods from ::android::hardware::gnss::V1_0::IGnssNi follow. 48 | * These declarations were generated from IGnssNi.hal. 49 | */ 50 | Return setCallback(const sp& callback) override; 51 | Return respond(int32_t notifId, 52 | IGnssNiCallback::GnssUserResponseType userResponse) override; 53 | 54 | private: 55 | struct GnssNiDeathRecipient : hidl_death_recipient { 56 | GnssNiDeathRecipient(sp gnssNi) : mGnssNi(gnssNi) { 57 | } 58 | ~GnssNiDeathRecipient() = default; 59 | virtual void serviceDied(uint64_t cookie, const wp& who) override; 60 | sp mGnssNi; 61 | }; 62 | 63 | private: 64 | sp mGnssNiDeathRecipient = nullptr; 65 | sp mGnssNiCbIface = nullptr; 66 | Gnss* mGnss = nullptr; 67 | }; 68 | 69 | } // namespace implementation 70 | } // namespace V1_0 71 | } // namespace gnss 72 | } // namespace hardware 73 | } // namespace android 74 | 75 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H 76 | -------------------------------------------------------------------------------- /gps/android/1.1/GnssNi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSNI_H 22 | #define ANDROID_HARDWARE_GNSS_V1_1_GNSSNI_H 23 | 24 | #include 25 | #include 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace gnss { 30 | namespace V1_1 { 31 | namespace implementation { 32 | 33 | using ::android::hardware::gnss::V1_0::IGnssNi; 34 | using ::android::hardware::gnss::V1_0::IGnssNiCallback; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | struct Gnss; 42 | struct GnssNi : public IGnssNi { 43 | GnssNi(Gnss* gnss); 44 | ~GnssNi() = default; 45 | 46 | /* 47 | * Methods from ::android::hardware::gnss::V1_0::IGnssNi follow. 48 | * These declarations were generated from IGnssNi.hal. 49 | */ 50 | Return setCallback(const sp& callback) override; 51 | Return respond(int32_t notifId, 52 | IGnssNiCallback::GnssUserResponseType userResponse) override; 53 | 54 | private: 55 | struct GnssNiDeathRecipient : hidl_death_recipient { 56 | GnssNiDeathRecipient(sp gnssNi) : mGnssNi(gnssNi) { 57 | } 58 | ~GnssNiDeathRecipient() = default; 59 | virtual void serviceDied(uint64_t cookie, const wp& who) override; 60 | sp mGnssNi; 61 | }; 62 | 63 | private: 64 | sp mGnssNiDeathRecipient = nullptr; 65 | sp mGnssNiCbIface = nullptr; 66 | Gnss* mGnss = nullptr; 67 | }; 68 | 69 | } // namespace implementation 70 | } // namespace V1_1 71 | } // namespace gnss 72 | } // namespace hardware 73 | } // namespace android 74 | 75 | #endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSNI_H 76 | -------------------------------------------------------------------------------- /gps/android/2.0/GnssNi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_GNSSNI_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_GNSSNI_H 23 | 24 | #include 25 | #include 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace gnss { 30 | namespace V2_0 { 31 | namespace implementation { 32 | 33 | using ::android::hardware::gnss::V1_0::IGnssNi; 34 | using ::android::hardware::gnss::V1_0::IGnssNiCallback; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | struct Gnss; 42 | struct GnssNi : public IGnssNi { 43 | GnssNi(Gnss* gnss); 44 | ~GnssNi() = default; 45 | 46 | /* 47 | * Methods from ::android::hardware::gnss::V1_0::IGnssNi follow. 48 | * These declarations were generated from IGnssNi.hal. 49 | */ 50 | Return setCallback(const sp& callback) override; 51 | Return respond(int32_t notifId, 52 | IGnssNiCallback::GnssUserResponseType userResponse) override; 53 | 54 | private: 55 | struct GnssNiDeathRecipient : hidl_death_recipient { 56 | GnssNiDeathRecipient(sp gnssNi) : mGnssNi(gnssNi) { 57 | } 58 | ~GnssNiDeathRecipient() = default; 59 | virtual void serviceDied(uint64_t cookie, const wp& who) override; 60 | sp mGnssNi; 61 | }; 62 | 63 | private: 64 | sp mGnssNiDeathRecipient = nullptr; 65 | sp mGnssNiCbIface = nullptr; 66 | Gnss* mGnss = nullptr; 67 | }; 68 | 69 | } // namespace implementation 70 | } // namespace V2_0 71 | } // namespace gnss 72 | } // namespace hardware 73 | } // namespace android 74 | 75 | #endif // ANDROID_HARDWARE_GNSS_V2_0_GNSSNI_H 76 | -------------------------------------------------------------------------------- /gps/android/2.1/GnssNi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_GNSSNI_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_GNSSNI_H 23 | 24 | #include 25 | #include 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace gnss { 30 | namespace V2_1 { 31 | namespace implementation { 32 | 33 | using ::android::hardware::gnss::V1_0::IGnssNi; 34 | using ::android::hardware::gnss::V1_0::IGnssNiCallback; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | struct Gnss; 42 | struct GnssNi : public IGnssNi { 43 | GnssNi(Gnss* gnss); 44 | ~GnssNi() = default; 45 | 46 | /* 47 | * Methods from ::android::hardware::gnss::V1_0::IGnssNi follow. 48 | * These declarations were generated from IGnssNi.hal. 49 | */ 50 | Return setCallback(const sp& callback) override; 51 | Return respond(int32_t notifId, 52 | IGnssNiCallback::GnssUserResponseType userResponse) override; 53 | 54 | private: 55 | struct GnssNiDeathRecipient : hidl_death_recipient { 56 | GnssNiDeathRecipient(sp gnssNi) : mGnssNi(gnssNi) { 57 | } 58 | ~GnssNiDeathRecipient() = default; 59 | virtual void serviceDied(uint64_t cookie, const wp& who) override; 60 | sp mGnssNi; 61 | }; 62 | 63 | private: 64 | sp mGnssNiDeathRecipient = nullptr; 65 | sp mGnssNiCbIface = nullptr; 66 | Gnss* mGnss = nullptr; 67 | }; 68 | 69 | } // namespace implementation 70 | } // namespace V2_1 71 | } // namespace gnss 72 | } // namespace hardware 73 | } // namespace android 74 | 75 | #endif // ANDROID_HARDWARE_GNSS_V2_0_GNSSNI_H 76 | -------------------------------------------------------------------------------- /gps/android/2.0/AGnss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_AGNSS_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_AGNSS_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V2_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::Return; 35 | using ::android::hardware::Void; 36 | using ::android::hardware::hidl_vec; 37 | using ::android::hardware::hidl_string; 38 | using ::android::sp; 39 | 40 | struct Gnss; 41 | struct AGnss : public V2_0::IAGnss { 42 | 43 | AGnss(Gnss* gnss); 44 | ~AGnss(); 45 | /* 46 | * Methods from ::android::hardware::gnss::V2_0::IAGnss interface follow. 47 | * These declarations were generated from IAGnss.hal. 48 | */ 49 | Return setCallback(const sp& callback) override; 50 | 51 | Return dataConnClosed() override; 52 | 53 | Return dataConnFailed() override; 54 | 55 | Return dataConnOpen(uint64_t networkHandle, const hidl_string& apn, 56 | V2_0::IAGnss::ApnIpType apnIpType) override; 57 | 58 | Return setServer(V2_0::IAGnssCallback::AGnssType type, 59 | const hidl_string& hostname, int32_t port) override; 60 | 61 | void statusCb(AGpsExtType type, LocAGpsStatusValue status); 62 | 63 | /* Data call setup callback passed down to GNSS HAL implementation */ 64 | static void agnssStatusIpV4Cb(AGnssExtStatusIpV4 status); 65 | 66 | private: 67 | Gnss* mGnss = nullptr; 68 | sp mAGnssCbIface = nullptr; 69 | }; 70 | 71 | } // namespace implementation 72 | } // namespace V2_0 73 | } // namespace gnss 74 | } // namespace hardware 75 | } // namespace android 76 | 77 | #endif // ANDROID_HARDWARE_GNSS_V2_0_AGNSS_H 78 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_streaming.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gps/android/1.0/AGnss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_AGNSS_H 22 | #define ANDROID_HARDWARE_GNSS_V1_0_AGNSS_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V1_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V1_0::IAGnss; 35 | using ::android::hardware::gnss::V1_0::IAGnssCallback; 36 | using ::android::hardware::Return; 37 | using ::android::hardware::Void; 38 | using ::android::hardware::hidl_vec; 39 | using ::android::hardware::hidl_string; 40 | using ::android::sp; 41 | 42 | struct Gnss; 43 | struct AGnss : public IAGnss { 44 | 45 | AGnss(Gnss* gnss); 46 | ~AGnss(); 47 | /* 48 | * Methods from ::android::hardware::gnss::V1_0::IAGnss interface follow. 49 | * These declarations were generated from IAGnss.hal. 50 | */ 51 | Return setCallback(const sp& callback) override; 52 | 53 | Return dataConnClosed() override; 54 | 55 | Return dataConnFailed() override; 56 | 57 | Return dataConnOpen(const hidl_string& apn, 58 | IAGnss::ApnIpType apnIpType) override; 59 | 60 | Return setServer(IAGnssCallback::AGnssType type, 61 | const hidl_string& hostname, int32_t port) override; 62 | 63 | void statusIpV4Cb(AGnssExtStatusIpV4 status); 64 | 65 | /* Data call setup callback passed down to GNSS HAL implementation */ 66 | static void agnssStatusIpV4Cb(AGnssExtStatusIpV4 status); 67 | 68 | private: 69 | Gnss* mGnss = nullptr; 70 | sp mAGnssCbIface = nullptr; 71 | }; 72 | 73 | } // namespace implementation 74 | } // namespace V1_0 75 | } // namespace gnss 76 | } // namespace hardware 77 | } // namespace android 78 | 79 | #endif // ANDROID_HARDWARE_GNSS_V1_0_AGNSS_H 80 | -------------------------------------------------------------------------------- /gps/android/1.1/AGnss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V1_1_AGNSS_H 22 | #define ANDROID_HARDWARE_GNSS_V1_1_AGNSS_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V1_1 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V1_0::IAGnss; 35 | using ::android::hardware::gnss::V1_0::IAGnssCallback; 36 | using ::android::hardware::Return; 37 | using ::android::hardware::Void; 38 | using ::android::hardware::hidl_vec; 39 | using ::android::hardware::hidl_string; 40 | using ::android::sp; 41 | 42 | struct Gnss; 43 | struct AGnss : public IAGnss { 44 | 45 | AGnss(Gnss* gnss); 46 | ~AGnss(); 47 | /* 48 | * Methods from ::android::hardware::gnss::V1_0::IAGnss interface follow. 49 | * These declarations were generated from IAGnss.hal. 50 | */ 51 | Return setCallback(const sp& callback) override; 52 | 53 | Return dataConnClosed() override; 54 | 55 | Return dataConnFailed() override; 56 | 57 | Return dataConnOpen(const hidl_string& apn, 58 | IAGnss::ApnIpType apnIpType) override; 59 | 60 | Return setServer(IAGnssCallback::AGnssType type, 61 | const hidl_string& hostname, int32_t port) override; 62 | 63 | void statusIpV4Cb(AGnssExtStatusIpV4 status); 64 | 65 | /* Data call setup callback passed down to GNSS HAL implementation */ 66 | static void agnssStatusIpV4Cb(AGnssExtStatusIpV4 status); 67 | 68 | private: 69 | Gnss* mGnss = nullptr; 70 | sp mAGnssCbIface = nullptr; 71 | }; 72 | 73 | } // namespace implementation 74 | } // namespace V1_1 75 | } // namespace gnss 76 | } // namespace hardware 77 | } // namespace android 78 | 79 | #endif // ANDROID_HARDWARE_GNSS_V1_1_AGNSS_H 80 | -------------------------------------------------------------------------------- /media/media_codecs_dolby_audio.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /gps/android/2.1/AGnss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_AGNSS_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_AGNSS_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V2_1 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::Return; 35 | using ::android::hardware::Void; 36 | using ::android::hardware::hidl_vec; 37 | using ::android::hardware::hidl_string; 38 | using ::android::sp; 39 | using ::android::hardware::gnss::V2_0::IAGnssCallback; 40 | 41 | struct Gnss; 42 | struct AGnss : public V2_0::IAGnss { 43 | 44 | AGnss(Gnss* gnss); 45 | ~AGnss(); 46 | /* 47 | * Methods from ::android::hardware::gnss::V2_0::IAGnss interface follow. 48 | * These declarations were generated from IAGnss.hal. 49 | */ 50 | Return setCallback(const sp& callback) override; 51 | 52 | Return dataConnClosed() override; 53 | 54 | Return dataConnFailed() override; 55 | 56 | Return dataConnOpen(uint64_t networkHandle, const hidl_string& apn, 57 | V2_0::IAGnss::ApnIpType apnIpType) override; 58 | 59 | Return setServer(V2_0::IAGnssCallback::AGnssType type, 60 | const hidl_string& hostname, int32_t port) override; 61 | 62 | void statusCb(AGpsExtType type, LocAGpsStatusValue status); 63 | 64 | /* Data call setup callback passed down to GNSS HAL implementation */ 65 | static void agnssStatusIpV4Cb(AGnssExtStatusIpV4 status); 66 | 67 | private: 68 | Gnss* mGnss = nullptr; 69 | sp mAGnssCbIface = nullptr; 70 | 71 | AGpsExtType mType; 72 | }; 73 | 74 | } // namespace implementation 75 | } // namespace V2_1 76 | } // namespace gnss 77 | } // namespace hardware 78 | } // namespace android 79 | 80 | #endif // ANDROID_HARDWARE_GNSS_V2_0_AGNSS_H 81 | --------------------------------------------------------------------------------