├── camera ├── MODULE_LICENSE_BSD ├── mm-image-codec │ ├── Android.mk │ └── qomx_core │ │ └── Android.mk ├── QCamera2 │ ├── stack │ │ ├── common │ │ │ └── cam_intf.h │ │ ├── Android.mk │ │ ├── mm-lib2d-interface │ │ │ └── Android.mk │ │ ├── mm-camera-interface │ │ │ └── Android.mk │ │ └── mm-jpeg-interface │ │ │ ├── inc │ │ │ ├── mm_jpeg_mpo.h │ │ │ └── mm_jpeg_dbg.h │ │ │ └── Android.mk │ ├── HAL │ │ ├── tsMakeuplib │ │ │ └── include │ │ │ │ ├── ts_makeup_data.h │ │ │ │ └── ts_makeup_image.h │ │ └── android │ │ │ └── QCamera2External.h │ ├── HAL3 │ │ └── android │ │ │ └── QCamera3External.h │ └── util │ │ └── QCameraCommon.h ├── Android.mk └── CleanSpec.mk ├── perf ├── perf-profile1.conf ├── public.libraries.txt ├── perf-profile0.conf ├── perf-profile6.conf ├── perf-profile2.conf ├── perf-profile3.conf ├── perf-profile5.conf ├── perf-profile4.conf ├── targetconfig.xml └── whitelistedapps.xml ├── sepolicy ├── device.te ├── nfc.te ├── mediaserver.te ├── netmgrd.te ├── priv_app.te ├── vold.te ├── per_mgr.te ├── system_app.te ├── time_daemon.te ├── audioserver.te ├── thermal-engine.te ├── firmware_file.te ├── logd.te ├── shell.te ├── property.te ├── ueventd.te ├── mediadrmserver.te ├── wcnss_service.te ├── qti_init_shell.te ├── file.te ├── system_server.te ├── healthd.te ├── mm-qcamerad.te ├── hal_sensors_default.te ├── tee.te ├── property_contexts ├── rmt_storage.te ├── init.te ├── smart_charger.te ├── fingerprintd.te ├── vfmService.te └── file_contexts ├── configs ├── sensors │ └── hals.conf ├── public.libraries.txt ├── camera │ └── external_camera_config.xml ├── nfc │ └── libnfc-nci-20797b00.conf └── privapp-permissions-qti.xml ├── wifi ├── WCNSS_cfg.dat ├── p2p_supplicant_overlay.conf └── wpa_supplicant_overlay.conf ├── vendorsetup.sh ├── power ├── Android.bp ├── android.hardware.power@1.2-service.rc ├── list.h ├── hint-data.c ├── powerhintparser.h ├── utils.h └── metadata-defs.h ├── gps ├── android │ ├── android.hardware.gnss@1.1-service-qti.rc │ ├── service.cpp │ ├── GnssDebug.h │ ├── Android.mk │ ├── GnssConfiguration.h │ ├── GnssNi.h │ ├── AGnss.h │ └── location_api │ │ └── LocationUtil.h ├── Android.mk ├── Makefile.am ├── core │ ├── loc-core.pc.in │ ├── Android.mk │ ├── Makefile.am │ ├── data-items │ │ └── DataItemsFactoryProxy.h │ ├── configure.ac │ └── loc_core_log.h ├── gnsspps │ ├── gnsspps.pc.in │ ├── Android.mk │ ├── Makefile.am │ ├── gnsspps.h │ └── configure.ac ├── utils │ ├── gps-utils.pc.in │ ├── Android.mk │ ├── Makefile.am │ ├── configure.ac │ └── loc_nmea.h ├── location │ ├── location-api.pc.in │ ├── Android.mk │ ├── Makefile.am │ └── configure.ac ├── loc-hal.pc.in ├── build │ └── target_specific_features.mk ├── etc │ ├── lowi.conf │ ├── apdr.conf │ └── sap.conf ├── pla │ ├── Android.mk │ ├── android │ │ └── loc_pla.h │ └── oe │ │ └── loc_pla.h ├── gnss │ ├── Makefile.am │ └── Android.mk └── CleanSpec.mk ├── seccomp ├── mediaextractor.policy └── mediacodec.policy ├── health ├── android.hardware.health@2.0-service.kuntao.rc ├── Android.bp └── HealthService.cpp ├── sensors ├── android.hardware.sensors@1.0-service.kuntao.rc ├── Android.bp └── service.cpp ├── superior.dependencies ├── biometrics ├── android.hardware.biometrics.fingerprint@2.0-service.kuntao.rc ├── Android.bp └── service.cpp ├── thermal-engine └── Android.mk ├── rootdir └── etc │ ├── move_widevine_data.sh │ └── init.qcom.early_boot.sh ├── AndroidProducts.mk ├── keylayout ├── Validity_Navigation_Sensor.kl ├── synaptics_dsx_i2c.kl ├── ft5x06_ts.kl ├── synaptics_dsx.kl ├── synaptics_dsxv26.kl ├── synaptics_rmi4_i2c.kl └── gpio-keys.kl ├── vndk ├── vndk-sp-libs.mk └── Android.mk ├── libnfcdummy ├── Android.mk └── power.c ├── overlay ├── packages │ ├── services │ │ └── Telephony │ │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ └── apps │ │ ├── Dialer │ │ └── java │ │ │ └── com │ │ │ └── android │ │ │ └── dialer │ │ │ └── callrecord │ │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ │ ├── Settings │ │ └── res │ │ │ └── values │ │ │ ├── dimens.xml │ │ │ ├── arrays.xml │ │ │ └── config.xml │ │ └── Bluetooth │ │ └── res │ │ └── values │ │ └── config.xml └── frameworks │ └── base │ ├── core │ └── res │ │ └── res │ │ ├── values │ │ └── strings.xml │ │ └── xml │ │ └── power_profile.xml │ └── packages │ └── SystemUI │ └── res │ └── values │ └── config.xml ├── overlay-lineage └── frameworks │ └── base │ └── core │ └── res │ └── res │ └── values │ └── config.xml ├── devicesettings └── res │ ├── values │ └── strings.xml │ ├── xml │ └── button_panel.xml │ └── drawable │ └── ic_double_tap.xml ├── thermal └── Android.mk ├── lights └── Android.mk ├── libhidl └── Android.mk ├── lineagehw └── src │ └── org │ └── lineageos │ └── hardware │ ├── SynapticsDummy.java │ ├── KeyDisabler.java │ ├── Fingerprint.java │ ├── FingerprintCore.java │ └── HighTouchSensitivity.java ├── audio_amplifier └── Android.mk ├── README.md ├── full_kuntao.mk ├── config.fs ├── superior_kuntao.mk ├── setup-makefiles.sh ├── bluetooth └── bdroid_buildcfg.h ├── update-sha1sums.py ├── framework_manifest.xml ├── compatibility_matrix.xml ├── fixmerge ├── fixmerge.1 ├── extract-files.sh └── audio └── audio_output_policy.conf /camera/MODULE_LICENSE_BSD: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /perf/perf-profile1.conf: -------------------------------------------------------------------------------- 1 | [priority] 2 | 120 3 | -------------------------------------------------------------------------------- /sepolicy/device.te: -------------------------------------------------------------------------------- 1 | type vfs_device, dev_type; 2 | -------------------------------------------------------------------------------- /sepolicy/nfc.te: -------------------------------------------------------------------------------- 1 | allow nfc device:chr_file { ioctl }; 2 | -------------------------------------------------------------------------------- /configs/sensors/hals.conf: -------------------------------------------------------------------------------- 1 | sensors.alsps.so 2 | sensors.st.so 3 | -------------------------------------------------------------------------------- /sepolicy/mediaserver.te: -------------------------------------------------------------------------------- 1 | allow mediaserver audiod:binder call; 2 | -------------------------------------------------------------------------------- /sepolicy/netmgrd.te: -------------------------------------------------------------------------------- 1 | allow netmgrd self:capability dac_override; 2 | -------------------------------------------------------------------------------- /sepolicy/priv_app.te: -------------------------------------------------------------------------------- 1 | allow priv_app device:dir { read open }; 2 | -------------------------------------------------------------------------------- /sepolicy/vold.te: -------------------------------------------------------------------------------- 1 | allow vold persist_file:dir { getattr read }; 2 | -------------------------------------------------------------------------------- /sepolicy/per_mgr.te: -------------------------------------------------------------------------------- 1 | allow per_mgr per_mgr:capability { net_raw }; 2 | -------------------------------------------------------------------------------- /sepolicy/system_app.te: -------------------------------------------------------------------------------- 1 | allow system_app fingerprintd:binder { call }; 2 | -------------------------------------------------------------------------------- /sepolicy/time_daemon.te: -------------------------------------------------------------------------------- 1 | allow time_daemon persist_file:dir search; 2 | -------------------------------------------------------------------------------- /sepolicy/audioserver.te: -------------------------------------------------------------------------------- 1 | allow audioserver audio_prop:property_service set; 2 | -------------------------------------------------------------------------------- /sepolicy/thermal-engine.te: -------------------------------------------------------------------------------- 1 | allow thermal-engine self:capability sys_nice; 2 | -------------------------------------------------------------------------------- /sepolicy/firmware_file.te: -------------------------------------------------------------------------------- 1 | allow firmware_file tmpfs:filesystem { associate }; 2 | -------------------------------------------------------------------------------- /configs/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libqti-perfd-client.so 2 | libadsprpc.so 3 | libOpenCL.so 4 | -------------------------------------------------------------------------------- /perf/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libadsprpc.so 2 | libOpenCL.so 3 | libqti-perfd-client.so 4 | -------------------------------------------------------------------------------- /perf/perf-profile0.conf: -------------------------------------------------------------------------------- 1 | [priority] # This profile is reserved for perflock requests 2 | 99 3 | -------------------------------------------------------------------------------- /sepolicy/logd.te: -------------------------------------------------------------------------------- 1 | allow logd logd:capability { dac_override }; 2 | allow logd logd:dir { getattr }; 3 | -------------------------------------------------------------------------------- /sepolicy/shell.te: -------------------------------------------------------------------------------- 1 | allow shell firmware_file:dir { read open }; 2 | allow shell firmware_file:file getattr; 3 | -------------------------------------------------------------------------------- /wifi/WCNSS_cfg.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuperiorOS-Devices/device_lenovo_kuntao/pie/wifi/WCNSS_cfg.dat -------------------------------------------------------------------------------- /sepolicy/property.te: -------------------------------------------------------------------------------- 1 | type vendor_fp_gesture_prop, property_type; 2 | 3 | # Spectrum 4 | type spectrum_prop, property_type; 5 | -------------------------------------------------------------------------------- /sepolicy/ueventd.te: -------------------------------------------------------------------------------- 1 | allow ueventd sysfs_smart_charger:file w_file_perms; 2 | allow ueventd sysfs_smart_charger:dir search; 3 | -------------------------------------------------------------------------------- /vendorsetup.sh: -------------------------------------------------------------------------------- 1 | add_lunch_combo superior_kuntao-eng 2 | add_lunch_combo superior_kuntao-user 3 | add_lunch_combo superior_kuntao-userdebug 4 | -------------------------------------------------------------------------------- /camera/mm-image-codec/Android.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm arm64)) 2 | include $(call all-subdir-makefiles) 3 | endif 4 | -------------------------------------------------------------------------------- /sepolicy/mediadrmserver.te: -------------------------------------------------------------------------------- 1 | allow mediadrmserver firmware_file:dir search; 2 | allow mediadrmserver firmware_file:file { getattr open read }; 3 | -------------------------------------------------------------------------------- /sepolicy/wcnss_service.te: -------------------------------------------------------------------------------- 1 | allow wcnss_service wcnss_device:dir search; 2 | allow wcnss_service macaddr_data_file:file { open read getattr }; 3 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/common/cam_intf.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuperiorOS-Devices/device_lenovo_kuntao/pie/camera/QCamera2/stack/common/cam_intf.h -------------------------------------------------------------------------------- /power/Android.bp: -------------------------------------------------------------------------------- 1 | cc_library_headers { 2 | name: "qti_powerhal_headers", 3 | vendor_available: true, 4 | export_include_dirs: ["."], 5 | } 6 | -------------------------------------------------------------------------------- /sepolicy/qti_init_shell.te: -------------------------------------------------------------------------------- 1 | allow qti_init_shell bluetooth_data_file:file r_file_perms; 2 | allow qti_init_shell hci_attach_dev:chr_file rw_file_perms; 3 | -------------------------------------------------------------------------------- /wifi/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_no_group_iface=1 3 | p2p_search_delay=100 4 | persistent_reconnect=1 5 | bss_max_count=400 6 | -------------------------------------------------------------------------------- /sepolicy/file.te: -------------------------------------------------------------------------------- 1 | # FSG 2 | type fsg_file, fs_type, contextmount_type; 3 | 4 | type macaddr_data_file, file_type; 5 | type sysfs_smart_charger, fs_type, sysfs_type; 6 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(LOCAL_PATH)/mm-camera-interface/Android.mk 3 | include $(LOCAL_PATH)/mm-jpeg-interface/Android.mk 4 | -------------------------------------------------------------------------------- /sepolicy/system_server.te: -------------------------------------------------------------------------------- 1 | allow system_server persist_file:file { read write open }; 2 | allow system_server persist_file:file getattr; 3 | set_prop(system_server, sensors_prop); -------------------------------------------------------------------------------- /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=512 6 | bss_max_count=400 7 | -------------------------------------------------------------------------------- /power/android.hardware.power@1.2-service.rc: -------------------------------------------------------------------------------- 1 | service vendor.power-hal-1-2 /vendor/bin/hw/android.hardware.power@1.2-service 2 | class hal 3 | user system 4 | group system 5 | -------------------------------------------------------------------------------- /gps/android/android.hardware.gnss@1.1-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 5 | -------------------------------------------------------------------------------- /seccomp/mediaextractor.policy: -------------------------------------------------------------------------------- 1 | # device specific syscalls. 2 | # extension of services/mediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy 3 | readlinkat: 1 4 | pread64: 1 5 | mremap: 1 6 | -------------------------------------------------------------------------------- /sepolicy/healthd.te: -------------------------------------------------------------------------------- 1 | allow healthd device:dir r_dir_perms; 2 | allow healthd rtc_device:chr_file rw_file_perms; 3 | allow healthd sysfs_smart_charger:dir search; 4 | allow healthd sysfs_smart_charger:file rw_file_perms; 5 | -------------------------------------------------------------------------------- /health/android.hardware.health@2.0-service.kuntao.rc: -------------------------------------------------------------------------------- 1 | service vendor.health-hal-2-0 /vendor/bin/hw/android.hardware.health@2.0-service.kuntao 2 | class hal 3 | user system 4 | group system 5 | file /dev/kmsg w 6 | -------------------------------------------------------------------------------- /gps/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | LOCAL_PATH := $(call my-dir) 3 | include $(LOCAL_PATH)/build/target_specific_features.mk 4 | 5 | include $(call all-makefiles-under,$(LOCAL_PATH)) 6 | endif 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /sepolicy/mm-qcamerad.te: -------------------------------------------------------------------------------- 1 | allow mm-qcamerad persist_file:dir search; 2 | allow mm-qcamerad persist_file:file r_file_perms; 3 | allow mm-qcamerad system_data_file:dir w_dir_perms; 4 | allow mm-qcamerad system_data_file:file open; 5 | set_prop(mm-qcamerad, debug_prop) 6 | -------------------------------------------------------------------------------- /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/gnsspps/gnsspps.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: gnsspps 7 | Description: QTI GPS gnsspps 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgnsspps 10 | Cflags: -I${includedir}/gnsspps 11 | -------------------------------------------------------------------------------- /sensors/android.hardware.sensors@1.0-service.kuntao.rc: -------------------------------------------------------------------------------- 1 | service vendor.sensors-hal-1-0 /vendor/bin/hw/android.hardware.sensors@1.0-service.kuntao 2 | class hal 3 | user system 4 | group system input wakelock 5 | capabilities BLOCK_SUSPEND 6 | rlimit rtprio 10 10 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /sepolicy/hal_sensors_default.te: -------------------------------------------------------------------------------- 1 | allow hal_sensors_default iio_device:chr_file r_file_perms; 2 | 3 | allow hal_sensors_default system_data_file:dir create_dir_perms; 4 | allow hal_sensors_default sensors_data_file:file create_file_perms; 5 | 6 | set_prop(hal_sensors_default, sensors_prop); 7 | -------------------------------------------------------------------------------- /perf/perf-profile6.conf: -------------------------------------------------------------------------------- 1 | [files] 2 | 2 /sys/class/devfreq/cpubw/bw_hwmon/sample_ms 3 | 1200 /sys/class/devfreq/cpubw/bw_hwmon/idle_mbps 4 | 20 /sys/class/devfreq/cpubw/bw_hwmon/low_power_io_percent 5 | 20 /sys/class/devfreq/cpubw/bw_hwmon/io_percent 6 | [priority] # Gaming workload profile 7 | 125 8 | -------------------------------------------------------------------------------- /superior.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository": "android_kernel_lenovo_msm8953", 4 | "target_path": "kernel/lenovo/msm8953" 5 | }, 6 | { 7 | "repository": "android_packages_resources_devicesettings", 8 | "target_path": "packages/resources/devicesettings" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /perf/perf-profile2.conf: -------------------------------------------------------------------------------- 1 | [locks] 2 | 0x1B01 # Interactive io_is_busy 3 | 0x4805 # CPUhwmon Decay Rate 5 4 | 0x490A # CPUhwmon io_percent 10 5 | 0x101 # PM QOS OFF for A57 6 | [files] 7 | 35 /proc/sys/kernel/sched_downmigrate 8 | 55 /proc/sys/kernel/sched_upmigrate 9 | [priority] 10 | 96 11 | -------------------------------------------------------------------------------- /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/tee.te: -------------------------------------------------------------------------------- 1 | allow tee proc:file write; 2 | allow tee fingerprintd_data_file:file rw_file_perms; 3 | allow tee fingerprintd_data_file:dir r_dir_perms; 4 | allow tee system_data_file:dir r_dir_perms; 5 | allow tee fingerprintd_data_file:dir create_dir_perms; 6 | allow tee fingerprintd_data_file:file create_file_perms; 7 | -------------------------------------------------------------------------------- /seccomp/mediacodec.policy: -------------------------------------------------------------------------------- 1 | # device specific syscalls 2 | # extension of services/mediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy 3 | pselect6: 1 4 | eventfd2: 1 5 | sendto: 1 6 | recvfrom: 1 7 | _llseek: 1 8 | sysinfo: 1 9 | getcwd: 1 10 | getdents64: 1 11 | inotify_init1: 1 12 | inotify_add_watch: 1 13 | -------------------------------------------------------------------------------- /sepolicy/property_contexts: -------------------------------------------------------------------------------- 1 | nosecure.akm.resetdoe u:object_r:sensors_prop:s0 2 | persist.vendor.fp.gesture u:object_r:vendor_fp_gesture_prop:s0 3 | persist.vendor.camera.dbglog u:object_r:vendor_camera_prop:s0 4 | 5 | # Spectrum 6 | persist.spectrum.profile u:object_r:spectrum_prop:s0 7 | -------------------------------------------------------------------------------- /configs/camera/external_camera_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 0 6 | 1 7 | 2 8 | 32 9 | 33 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /sepolicy/rmt_storage.te: -------------------------------------------------------------------------------- 1 | allow rmt_storage firmware_file:dir r_dir_perms; 2 | allow rmt_storage firmware_file:file r_file_perms; 3 | allow rmt_storage fsg_file:dir search; 4 | allow rmt_storage fsg_file:file { read open }; 5 | allow rmt_storage self:capability { dac_override net_raw }; 6 | allow rmt_storage modem_efs_partition_device:blk_file rw_file_perms; 7 | allow rmt_storage fsg_file:lnk_file { read }; 8 | -------------------------------------------------------------------------------- /biometrics/android.hardware.biometrics.fingerprint@2.0-service.kuntao.rc: -------------------------------------------------------------------------------- 1 | service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.0-service.kuntao 2 | # "class hal" causes a race condition on some devices due to files created 3 | # in /data. As a workaround, postpone startup until later in boot once 4 | # /data is mounted. 5 | class late_start 6 | user system 7 | group system input 8 | writepid /dev/cpuset/system-background/tasks 9 | -------------------------------------------------------------------------------- /thermal-engine/Android.mk: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # @file device/qcom/common/thermal-engine/Android.mk 3 | # @Makefile for installing thermal-engine client header on Android. 4 | ################################################################################ 5 | 6 | LOCAL_PATH:= $(call my-dir) 7 | 8 | include $(CLEAR_VARS) 9 | 10 | LOCAL_COPY_HEADERS_TO := thermal-engine 11 | LOCAL_COPY_HEADERS := ./thermal_client.h 12 | 13 | include $(BUILD_COPY_HEADERS) 14 | -------------------------------------------------------------------------------- /perf/perf-profile3.conf: -------------------------------------------------------------------------------- 1 | [locks] 2 | 0x4805 # CPUhwmon Decay Rate 5 3 | 0x490A # CPUhwmon io_percent 10 4 | [files] 5 | 19000 /sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay 6 | 59000 /sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time 7 | 65 1400000:68 1700000:70 /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads 8 | 1824000 /sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq 9 | 99 /proc/sys/kernel/sched_init_task_load 10 | [priority] # Single-threaded workload profile for A57s only 11 | 95 12 | -------------------------------------------------------------------------------- /sepolicy/init.te: -------------------------------------------------------------------------------- 1 | # Unsure what init is doing here 2 | allow init app_data_file:dir setattr; 3 | allow init sdcardd_exec:file getattr; 4 | 5 | allow init firmware_file:dir mounton; 6 | allow init firmware_file:blk_file { getattr read open }; 7 | allow init fsg_file:dir mounton; 8 | allow init pstorefs:dir mounton; 9 | 10 | allow init fingerprintd_data_file:chr_file { lock }; 11 | allow init fingerprintd_data_file:file { lock }; 12 | allow init fingerprintd:process { signull }; 13 | allow init device:fifo_file { lock }; 14 | allow init tee_device:chr_file { read write ioctl open }; 15 | -------------------------------------------------------------------------------- /gps/build/target_specific_features.mk: -------------------------------------------------------------------------------- 1 | GNSS_CFLAGS := \ 2 | -Werror \ 3 | -Wno-error=unused-parameter \ 4 | -Wno-error=format \ 5 | -Wno-error=macro-redefined \ 6 | -Wno-error=reorder \ 7 | -Wno-error=missing-braces \ 8 | -Wno-error=self-assign \ 9 | -Wno-error=enum-conversion \ 10 | -Wno-error=logical-op-parentheses \ 11 | -Wno-error=null-arithmetic \ 12 | -Wno-error=null-conversion \ 13 | -Wno-error=parentheses-equality \ 14 | -Wno-error=undefined-bool-conversion \ 15 | -Wno-error=tautological-compare \ 16 | -Wno-error=switch \ 17 | -Wno-error=date-time 18 | -------------------------------------------------------------------------------- /rootdir/etc/move_widevine_data.sh: -------------------------------------------------------------------------------- 1 | #!/vendor/bin/sh 2 | 3 | DEST_PATH="/data/vendor/mediadrm" 4 | FILES_MOVED="/data/vendor/mediadrm/files_moved" 5 | SRC_PATH="/data/mediadrm" 6 | 7 | if [ ! -f "$FILES_MOVED" ]; then 8 | for i in "$SRC_PATH/IDM"*; do 9 | dest_path=$DEST_PATH/"${i#$SRC_PATH/}" 10 | if [ -d "$i" ]; then 11 | mkdir -p $dest_path -m 700 12 | mv $i "$DEST_PATH" 13 | find $dest_path -print0 | while IFS= read -r -d '' file 14 | do 15 | chgrp media "$file" 16 | done 17 | fi 18 | done 19 | restorecon -R "$DEST_PATH" 20 | echo 1 > "$FILES_MOVED" 21 | fi 22 | -------------------------------------------------------------------------------- /perf/perf-profile5.conf: -------------------------------------------------------------------------------- 1 | [locks] 2 | 0x4805 # CPUhwmon Decay Rate 5 3 | 0x490A # CPUhwmon io_percent 10 4 | [files] 5 | 19000 /sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay 6 | 85 /sys/devices/system/cpu/cpu2/cpufreq/interactive/go_hispeed_load 7 | 1632000 /sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq 8 | 99000 /sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time 9 | 60 1300000:63 1500000:65 1900000:70 /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads 10 | 99 /proc/sys/kernel/sched_init_task_load 11 | [priority] # 2nd Multi-threaded workload profile for A57s only 12 | 120 13 | -------------------------------------------------------------------------------- /perf/perf-profile4.conf: -------------------------------------------------------------------------------- 1 | [locks] 2 | 0x2310 # Lowering the scaling_max_freq on A57 to 1.6GHz 3 | 0x4805 # CPUhwmon Decay Rate 5 4 | 0x490A # CPUhwmon io_percent 10 5 | [files] 6 | 19000 /sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay 7 | 85 /sys/devices/system/cpu/cpu2/cpufreq/interactive/go_hispeed_load 8 | 1632000 /sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq 9 | 99000 /sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time 10 | 60 1300000:63 1500000:65 1900000:70 /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads 11 | 99 /proc/sys/kernel/sched_init_task_load 12 | [priority] # Multi-threaded workload profile for A57s only 13 | 97 14 | -------------------------------------------------------------------------------- /AndroidProducts.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017-2018 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 | PRODUCT_MAKEFILES := \ 17 | $(LOCAL_DIR)/superior_kuntao.mk 18 | -------------------------------------------------------------------------------- /keylayout/Validity_Navigation_Sensor.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017 The LineageOS Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | key 562 BACK VIRTUAL 16 | key 563 APP_SWITCH VIRTUAL 17 | -------------------------------------------------------------------------------- /sepolicy/smart_charger.te: -------------------------------------------------------------------------------- 1 | # Fast charger 2 | type smart_charger, domain; 3 | type smart_charger_exec, exec_type, vendor_file_type, file_type; 4 | 5 | init_daemon_domain(smart_charger) 6 | 7 | allow smart_charger sysfs_smart_charger:file rw_file_perms; 8 | allow smart_charger sysfs_smart_charger:file setattr; 9 | allow smart_charger sysfs_smart_charger:dir search; 10 | allow smart_charger sysfs:file { read open }; 11 | allow smart_charger device:dir write; 12 | allow smart_charger kmsg_device:chr_file { write open }; 13 | allow smart_charger self:netlink_kobject_uevent_socket { read create bind setopt }; 14 | allow smart_charger sysfs:file write; 15 | allow smart_charger self:capability net_admin; 16 | allow smart_charger self:capability2 block_suspend; 17 | -------------------------------------------------------------------------------- /gps/etc/lowi.conf: -------------------------------------------------------------------------------- 1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | # 3 | # LOWI Config file 4 | # 5 | # GENERAL DESCRIPTION 6 | # This file contains the config params for LOWI 7 | # 8 | # Copyright (c) 2012-2013 Qualcomm Atheros, Inc. 9 | # All Rights Reserved. 10 | # Qualcomm Atheros Confidential and Proprietary. 11 | # 12 | # Export of this technology or software is regulated by the U.S. Government. 13 | # Diversion contrary to U.S. law prohibited. 14 | #=============================================================================*/ 15 | 16 | # X86 ONLY - UBUNTU: 17 | # Copy this file in the same directory where the executable is 18 | 19 | # Log level 20 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 21 | LOWI_LOG_LEVEL = 3 22 | -------------------------------------------------------------------------------- /vndk/vndk-sp-libs.mk: -------------------------------------------------------------------------------- 1 | VNDK_SP_LIBRARIES := \ 2 | android.hardware.graphics.allocator@2.0 \ 3 | android.hardware.graphics.mapper@2.0 \ 4 | android.hardware.graphics.mapper@2.1 \ 5 | android.hardware.graphics.common@1.0 \ 6 | android.hardware.graphics.common@1.1 \ 7 | android.hardware.renderscript@1.0 \ 8 | android.hidl.memory@1.0 \ 9 | libRSCpuRef \ 10 | libRSDriver \ 11 | libRS_internal \ 12 | libbacktrace \ 13 | libbase \ 14 | libbcinfo \ 15 | libblas \ 16 | libc++ \ 17 | libcompiler_rt \ 18 | libcutils \ 19 | libft2 \ 20 | libhardware \ 21 | libhidlbase \ 22 | libhidlmemory \ 23 | libhidltransport \ 24 | libhwbinder \ 25 | libion \ 26 | liblzma \ 27 | libpng \ 28 | libunwind \ 29 | libunwindstack \ 30 | libutils \ 31 | libutilscallstack \ 32 | libdexfile 33 | -------------------------------------------------------------------------------- /camera/Android.mk: -------------------------------------------------------------------------------- 1 | MM_V4L2_DRIVER_LIST += msm8960 2 | MM_V4L2_DRIVER_LIST += msm8974 3 | MM_V4L2_DRIVER_LIST += msm8916 4 | MM_V4L2_DRIVER_LIST += msm8226 5 | MM_V4L2_DRIVER_LIST += msm8610 6 | MM_V4L2_DRIVER_LIST += apq8084 7 | MM_V4L2_DRIVER_LIST += mpq8092 8 | MM_V4L2_DRIVER_LIST += msm_bronze 9 | MM_V4L2_DRIVER_LIST += msm8916 10 | MM_V4L2_DRIVER_LIST += msm8994 11 | MM_V4L2_DRIVER_LIST += msm8084 12 | MM_V4L2_DRIVER_LIST += msm8909 13 | MM_V4L2_DRIVER_LIST += msm8952 14 | MM_V4L2_DRIVER_LIST += msm8996 15 | MM_V4L2_DRIVER_LIST += msm8992 16 | MM_V4L2_DRIVER_LIST += msm8937 17 | MM_V4L2_DRIVER_LIST += msm8953 18 | MM_V4L2_DRIVER_LIST += msmcobalt 19 | 20 | ifneq (,$(filter $(MM_V4L2_DRIVER_LIST),$(TARGET_BOARD_PLATFORM))) 21 | ifneq ($(strip $(USE_CAMERA_STUB)),true) 22 | ifneq ($(BUILD_TINY_ANDROID),true) 23 | include $(call all-subdir-makefiles) 24 | endif 25 | endif 26 | endif 27 | -------------------------------------------------------------------------------- /camera/mm-image-codec/qomx_core/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | # ------------------------------------------------------------------------------ 4 | # Make the shared library (libqomx_core) 5 | # ------------------------------------------------------------------------------ 6 | 7 | include $(CLEAR_VARS) 8 | LOCAL_MODULE_TAGS := optional 9 | 10 | LOCAL_CFLAGS := -Werror \ 11 | -g -O0 12 | 13 | LOCAL_C_INCLUDES := frameworks/native/include/media/openmax \ 14 | $(LOCAL_PATH)/../qexif 15 | 16 | LOCAL_INC_FILES := qomx_core.h \ 17 | QOMX_JpegExtensions.h 18 | 19 | LOCAL_SRC_FILES := qomx_core.c 20 | 21 | LOCAL_MODULE := libqomx_core 22 | LOCAL_VENDOR_MODULE := true 23 | LOCAL_SHARED_LIBRARIES := libcutils libdl liblog libutils 24 | 25 | LOCAL_32_BIT_ONLY := true 26 | include $(BUILD_SHARED_LIBRARY) 27 | -------------------------------------------------------------------------------- /gps/gnsspps/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_MODULE := libgnsspps 7 | LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib 8 | LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64 9 | LOCAL_MODULE_TAGS := optional 10 | 11 | LOCAL_SHARED_LIBRARIES := \ 12 | libutils \ 13 | libcutils \ 14 | libgps.utils \ 15 | liblog 16 | 17 | LOCAL_SRC_FILES += \ 18 | gnsspps.c 19 | 20 | LOCAL_CFLAGS += \ 21 | -fno-short-enums \ 22 | -D_ANDROID_ 23 | 24 | ## Includes 25 | LOCAL_HEADER_LIBRARIES := \ 26 | libgps.utils_headers \ 27 | libloc_pla_headers 28 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 29 | include $(BUILD_SHARED_LIBRARY) 30 | 31 | include $(CLEAR_VARS) 32 | LOCAL_MODULE := libgnsspps_headers 33 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 34 | include $(BUILD_HEADER_LIBRARY) 35 | 36 | endif 37 | -------------------------------------------------------------------------------- /libnfcdummy/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2018 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 | LOCAL_PATH:= $(call my-dir) 18 | 19 | include $(CLEAR_VARS) 20 | 21 | LOCAL_SRC_FILES := power.c 22 | LOCAL_MODULE := libnfcdummy 23 | LOCAL_MODULE_TAGS := optional 24 | LOCAL_VENDOR_MODULE := true 25 | 26 | include $(BUILD_SHARED_LIBRARY) 27 | -------------------------------------------------------------------------------- /libnfcdummy/power.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define UNUSED(x) UNUSED_ ## x __attribute__((__unused__)) 18 | 19 | int acquire_wake_lock(int UNUSED(lock), const char* UNUSED(id)) { 20 | return 0; 21 | } 22 | 23 | int release_wake_lock(const char* UNUSED(id)) { 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | true 21 | -------------------------------------------------------------------------------- /overlay/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | true 16 | 4 17 | 18 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 5dp 16 | 94.6% 17 | 18 | -------------------------------------------------------------------------------- /overlay-lineage/frameworks/base/core/res/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 0 22 | 23 | -------------------------------------------------------------------------------- /gps/pla/Android.mk: -------------------------------------------------------------------------------- 1 | GNSS_CFLAGS := \ 2 | -Werror \ 3 | -Wno-error=unused-parameter \ 4 | -Wno-error=format \ 5 | -Wno-error=macro-redefined \ 6 | -Wno-error=reorder \ 7 | -Wno-error=missing-braces \ 8 | -Wno-error=self-assign \ 9 | -Wno-error=enum-conversion \ 10 | -Wno-error=logical-op-parentheses \ 11 | -Wno-error=null-arithmetic \ 12 | -Wno-error=null-conversion \ 13 | -Wno-error=parentheses-equality \ 14 | -Wno-error=undefined-bool-conversion \ 15 | -Wno-error=tautological-compare \ 16 | -Wno-error=switch \ 17 | -Wno-error=date-time 18 | 19 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 20 | ifneq ($(BUILD_TINY_ANDROID),true) 21 | 22 | LOCAL_PATH := $(call my-dir) 23 | 24 | include $(CLEAR_VARS) 25 | LOCAL_MODULE := libloc_pla_headers 26 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/android 27 | include $(BUILD_HEADER_LIBRARY) 28 | 29 | endif # not BUILD_TINY_ANDROID 30 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 31 | -------------------------------------------------------------------------------- /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++11 11 | 12 | libgnss_la_SOURCES = \ 13 | location_gnss.cpp \ 14 | GnssAdapter.cpp \ 15 | XtraSystemStatusObserver.cpp \ 16 | Agps.cpp 17 | 18 | if USE_GLIB 19 | libgnss_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 20 | libgnss_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -avoid-version 21 | libgnss_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 22 | else 23 | libgnss_la_CFLAGS = $(AM_CFLAGS) 24 | libgnss_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 25 | libgnss_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 26 | endif 27 | 28 | libgnss_la_LIBADD = -lstdc++ $(GPSUTILS_LIBS) $(LOCCORE_LIBS) 29 | 30 | #Create and Install libraries 31 | lib_LTLIBRARIES = libgnss.la 32 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | Lenovo P2a42 18 | 19 | -------------------------------------------------------------------------------- /gps/location/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := liblocation_api 9 | LOCAL_VENDOR_MODULE := true 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | LOCAL_SHARED_LIBRARIES := \ 13 | libutils \ 14 | libcutils \ 15 | libgps.utils \ 16 | libdl \ 17 | liblog 18 | 19 | LOCAL_SRC_FILES += \ 20 | LocationAPI.cpp \ 21 | LocationAPIClientBase.cpp 22 | 23 | LOCAL_CFLAGS += \ 24 | -fno-short-enums 25 | 26 | LOCAL_HEADER_LIBRARIES := \ 27 | libloc_pla_headers \ 28 | libgps.utils_headers 29 | 30 | LOCAL_PRELINK_MODULE := false 31 | 32 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 33 | include $(BUILD_SHARED_LIBRARY) 34 | 35 | include $(CLEAR_VARS) 36 | LOCAL_MODULE := liblocation_api_headers 37 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 38 | include $(BUILD_HEADER_LIBRARY) 39 | 40 | endif # not BUILD_TINY_ANDROID 41 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 42 | -------------------------------------------------------------------------------- /devicesettings/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | Fingerprint gestures key 19 | Fingerprint gestures 20 | Tap to go back, long press to view recents 21 | 22 | -------------------------------------------------------------------------------- /thermal/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2015 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 | LOCAL_PATH := $(call my-dir) 16 | 17 | include $(CLEAR_VARS) 18 | 19 | LOCAL_MODULE := thermal.msm8952 20 | LOCAL_MODULE_RELATIVE_PATH := hw 21 | LOCAL_PROPRIETARY_MODULE := true 22 | LOCAL_SRC_FILES := thermal.c 23 | 24 | LOCAL_SHARED_LIBRARIES := liblog libcutils 25 | LOCAL_MODULE_TAGS := optional 26 | LOCAL_CFLAGS := -Wno-unused-parameter 27 | 28 | include $(BUILD_SHARED_LIBRARY) 29 | -------------------------------------------------------------------------------- /gps/gnsspps/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | $(LOCPLA_CFLAGS) \ 3 | $(GPSUTILS_CFLAGS) \ 4 | -I$(WORKSPACE)/system/core/include \ 5 | -I./ 6 | 7 | ACLOCAL_AMFLAGS = -I m4 8 | 9 | libgnsspps_la_SOURCES = \ 10 | gnsspps.c 11 | 12 | if USE_GLIB 13 | libgnsspps_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 14 | libgnsspps_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 15 | libgnsspps_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 16 | else 17 | libgnsspps_la_CFLAGS = $(AM_CFLAGS) 18 | libgnsspps_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 19 | libgnsspps_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 20 | endif 21 | 22 | libgnsspps_la_LIBADD = -lstdc++ $(GPSUTILS_LIBS) 23 | 24 | library_include_HEADERS = \ 25 | gnsspps.h 26 | 27 | #Create and Install libraries 28 | lib_LTLIBRARIES = libgnsspps.la 29 | 30 | library_includedir = $(pkgincludedir) 31 | pkgconfigdir = $(libdir)/pkgconfig 32 | pkgconfig_DATA = gnsspps.pc 33 | EXTRA_DIST = $(pkgconfig_DATA) 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /gps/gnss/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libgnss 9 | LOCAL_VENDOR_MODULE := true 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | LOCAL_SHARED_LIBRARIES := \ 13 | libutils \ 14 | libcutils \ 15 | libdl \ 16 | liblog \ 17 | libloc_core \ 18 | libgps.utils 19 | 20 | LOCAL_SRC_FILES += \ 21 | location_gnss.cpp \ 22 | GnssAdapter.cpp \ 23 | Agps.cpp \ 24 | XtraSystemStatusObserver.cpp 25 | 26 | LOCAL_CFLAGS += \ 27 | -fno-short-enums \ 28 | 29 | ifeq ($(TARGET_BUILD_VARIANT),user) 30 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 31 | endif 32 | 33 | LOCAL_HEADER_LIBRARIES := \ 34 | libgps.utils_headers \ 35 | libloc_core_headers \ 36 | libloc_pla_headers \ 37 | liblocation_api_headers 38 | 39 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 40 | 41 | LOCAL_PRELINK_MODULE := false 42 | 43 | include $(BUILD_SHARED_LIBRARY) 44 | 45 | endif # not BUILD_TINY_ANDROID 46 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 47 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-lib2d-interface/Android.mk: -------------------------------------------------------------------------------- 1 | OLD_LOCAL_PATH := $(LOCAL_PATH) 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 7 | LOCAL_CFLAGS+= -D_ANDROID_ -DQCAMERA_REDEFINE_LOG 8 | 9 | LOCAL_CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter 10 | 11 | LOCAL_HEADER_LIBRARIES := generated_kernel_headers 12 | 13 | IMGLIB_HEADER_PATH := $(TARGET_OUT_INTERMEDIATES)/include/mm-camera/imglib 14 | 15 | LOCAL_C_INCLUDES += \ 16 | $(IMGLIB_HEADER_PATH) \ 17 | $(LOCAL_PATH)/inc \ 18 | $(LOCAL_PATH)/../common 19 | $(LOCAL_PATH)/../mm-camera-interface/inc \ 20 | 21 | ifeq ($(strip $(TARGET_USES_ION)),true) 22 | LOCAL_CFLAGS += -DUSE_ION 23 | endif 24 | 25 | 26 | LOCAL_SRC_FILES := \ 27 | src/mm_lib2d.c 28 | 29 | LOCAL_MODULE := libmmlib2d_interface 30 | LOCAL_SHARED_LIBRARIES := libdl libcutils liblog 31 | LOCAL_MODULE_TAGS := optional 32 | LOCAL_VENDOR_MODULE := true 33 | 34 | LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 35 | include $(BUILD_SHARED_LIBRARY) 36 | 37 | LOCAL_PATH := $(OLD_LOCAL_PATH) 38 | -------------------------------------------------------------------------------- /sepolicy/fingerprintd.te: -------------------------------------------------------------------------------- 1 | allow fingerprintd tee_device:chr_file { read write ioctl open }; 2 | r_dir_file(fingerprintd, firmware_file) 3 | allow fingerprintd storage_file:dir search; 4 | allow fingerprintd uhid_device:chr_file rw_file_perms; 5 | allow fingerprintd system_data_file:file { open }; 6 | allow fingerprintd init:process { signull }; 7 | allow fingerprintd device:fifo_file { write lock open read create }; 8 | allow fingerprintd fingerprintd_data_file:fifo_file { write lock open read create }; 9 | allow fingerprintd fingerprintd_data_file:dir rw_dir_perms; 10 | allow fingerprintd fingerprintd_data_file:file create_file_perms; 11 | allow fingerprintd fingerprintd_data_file:sock_file create_file_perms; 12 | allow fingerprintd input_device:dir r_dir_perms; 13 | allow fingerprintd input_device:chr_file r_file_perms; 14 | allow fingerprintd firmware_file:file { read getattr open }; 15 | allow fingerprintd sysfs:file write; 16 | allow fingerprintd system_data_file:dir { write remove_name add_name }; 17 | allow fingerprintd system_data_file:sock_file { create unlink }; 18 | allow fingerprintd vfmService:process { signull }; 19 | -------------------------------------------------------------------------------- /lights/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2008 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 | LOCAL_PATH:= $(call my-dir) 16 | # HAL module implemenation stored in 17 | # hw/..so 18 | include $(CLEAR_VARS) 19 | 20 | LOCAL_SRC_FILES := lights.c 21 | LOCAL_MODULE_RELATIVE_PATH := hw 22 | LOCAL_SHARED_LIBRARIES := liblog 23 | LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdlights\" 24 | LOCAL_MODULE := lights.$(TARGET_BOARD_PLATFORM) 25 | LOCAL_MODULE_TAGS := optional 26 | LOCAL_VENDOR_MODULE := true 27 | 28 | include $(BUILD_SHARED_LIBRARY) 29 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 24 | 25 | 0 26 | -1 27 | -1 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /gps/android/service.cpp: -------------------------------------------------------------------------------- 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 | #define LOG_TAG "android.hardware.gnss@1.1-service-qti" 22 | 23 | #include 24 | #include 25 | 26 | using android::hardware::gnss::V1_0::IGnss; 27 | using android::hardware::defaultPassthroughServiceImplementation; 28 | 29 | int main() { 30 | return defaultPassthroughServiceImplementation(); 31 | } 32 | -------------------------------------------------------------------------------- /libhidl/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017 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 | include $(CLEAR_VARS) 17 | LOCAL_SHARED_LIBRARIES := libhidltransport 18 | LOCAL_MODULE := android.hidl.base@1.0 19 | LOCAL_MODULE_TAGS := optional 20 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 21 | LOCAL_VENDOR_MODULE := true 22 | include $(BUILD_SHARED_LIBRARY) 23 | 24 | include $(CLEAR_VARS) 25 | LOCAL_SHARED_LIBRARIES := libhidltransport 26 | LOCAL_MODULE := android.hidl.manager@1.0 27 | LOCAL_MODULE_TAGS := optional 28 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 29 | LOCAL_VENDOR_MODULE := true 30 | include $(BUILD_SHARED_LIBRARY) 31 | -------------------------------------------------------------------------------- /sepolicy/vfmService.te: -------------------------------------------------------------------------------- 1 | # vfmService daemon 2 | type vfmService, domain; 3 | type vfmService_exec, exec_type, vendor_file_type, file_type; 4 | 5 | init_daemon_domain(vfmService) 6 | 7 | allow vfmService device:dir { write add_name setattr }; 8 | allow vfmService device:file { read write open lock create }; 9 | allow vfmService fingerprintd_data_file:file create_file_perms; 10 | 11 | allow vfmService firmware_file:dir search; 12 | allow vfmService firmware_file:file r_file_perms; 13 | 14 | allow vfmService hal_fingerprint_default:process signull; 15 | 16 | allow vfmService ion_device:chr_file rw_file_perms; 17 | 18 | allow vfmService system_server:process signull; 19 | 20 | allow vfmService tee_device:chr_file rw_file_perms; 21 | 22 | allow vfmService uhid_device:chr_file rw_file_perms; 23 | 24 | allow vfmService vfsspi_data_file:dir rw_dir_perms; 25 | allow vfmService vfsspi_data_file:file create_file_perms; 26 | 27 | allow vfmService vfsspi_device:dir create_dir_perms; 28 | allow vfmService vfsspi_device:chr_file rw_file_perms; 29 | allow vfmService vfsspi_device:fifo_file create_file_perms; 30 | allow vfmService vfsspi_device:file create_file_perms; 31 | 32 | set_prop(vfmService, vendor_fp_gesture_prop); 33 | -------------------------------------------------------------------------------- /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_GLIB 15 | liblocation_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 16 | liblocation_api_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 17 | liblocation_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 18 | else 19 | liblocation_api_la_CFLAGS = $(AM_CFLAGS) 20 | liblocation_api_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 21 | liblocation_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 22 | endif 23 | 24 | liblocation_api_la_LIBADD = -lstdc++ -ldl $(GPSUTILS_LIBS) 25 | 26 | library_include_HEADERS = \ 27 | LocationAPI.h \ 28 | LocationAPIClientBase.h \ 29 | location_interface.h 30 | 31 | #Create and Install libraries 32 | lib_LTLIBRARIES = liblocation_api.la 33 | 34 | library_includedir = $(pkgincludedir) 35 | 36 | pkgconfigdir = $(libdir)/pkgconfig 37 | pkgconfig_DATA = location-api.pc 38 | EXTRA_DIST = $(pkgconfig_DATA) 39 | -------------------------------------------------------------------------------- /lineagehw/src/org/lineageos/hardware/SynapticsDummy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 com.synaptics.fingerprint; 18 | 19 | // Set of dummy classes from SystemNavigation.apk (stock) to suppress errors 20 | 21 | class CapturedImageData { 22 | } 23 | 24 | class DeviceInfo { 25 | } 26 | 27 | class EnrollProgress { 28 | } 29 | 30 | class EnrollResult { 31 | } 32 | 33 | class FingerprintEvent { 34 | } 35 | 36 | class IdentifyResult { 37 | } 38 | 39 | class NavigationReport { 40 | } 41 | 42 | class NavigationEvent { 43 | } 44 | 45 | class VcsInt { 46 | public int num; 47 | } 48 | -------------------------------------------------------------------------------- /sensors/Android.bp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 The LineageOS Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | cc_binary { 16 | name: "android.hardware.sensors@1.0-service.kuntao", 17 | relative_install_path: "hw", 18 | vendor: true, 19 | init_rc: ["android.hardware.sensors@1.0-service.kuntao.rc"], 20 | defaults: ["hidl_defaults"], 21 | srcs: ["service.cpp"], 22 | 23 | shared_libs: [ 24 | "liblog", 25 | "libcutils", 26 | "libdl", 27 | "libbase", 28 | "libutils", 29 | "libhidlbase", 30 | "libhidltransport", 31 | "android.hardware.sensors@1.0", 32 | "libhwbinder", 33 | ], 34 | } 35 | -------------------------------------------------------------------------------- /gps/etc/apdr.conf: -------------------------------------------------------------------------------- 1 | # AP DR SENSOR Configuration file 2 | # 3 | # SENSOR_SERVICE options are one of below 4 | # accel,gyro,vehicle_accel,vehicle_gyro,pedometer,vehicle_odometry,accel_temp, 5 | # gyro_temp,baro,mag_calib,mag_uncalib,amd,rmd. 6 | # 7 | # SENSOR_PROVIDER options is one of -- default,native,ssc,samlite. 8 | # 9 | # SENSOR_RATE = 1~100 (Hz) 10 | # 11 | # SENSOR_SAMPLES = 1~N 12 | # 13 | # SENSOR_STATISTIC_ENABLED 14 | # bit 0: Diag Print Enabled 15 | # bit 1: Adb Print Enabled 16 | # SENSOR_STATISTIC_PRINT_COUNT 17 | # Skip Number of Print 18 | # 19 | 20 | SENSOR_SERVICE = accel 21 | SENSOR_PROVIDER = native 22 | SENSOR_RATE = 100 23 | SENSOR_SAMPLES = 1 24 | SENSOR_STATISTIC_ENABLED = 3 25 | SENSOR_STATISTIC_PRINT_COUNT = 50 26 | 27 | SENSOR_SERVICE = vehicle_accel 28 | SENSOR_PROVIDER = native 29 | SENSOR_RATE = 10 30 | SENSOR_SAMPLES = 1 31 | SENSOR_STATISTIC_ENABLED = 3 32 | SENSOR_STATISTIC_PRINT_COUNT = 50 33 | 34 | SENSOR_SERVICE = gyro 35 | SENSOR_PROVIDER = native 36 | SENSOR_RATE = 100 37 | SENSOR_SAMPLES = 1 38 | SENSOR_STATISTIC_ENABLED = 3 39 | SENSOR_STATISTIC_PRINT_COUNT = 50 40 | 41 | GNSS_POS_STATISTIC_ENABLED = 3 42 | GNSS_POS_STATISTIC_PRNTCNT = 10 43 | GNSS_MSR_STATISTIC_ENABLED = 3 44 | GNSS_MSR_STATISTIC_PRNTCNT = 10 45 | -------------------------------------------------------------------------------- /audio_amplifier/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017 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 | LOCAL_PATH := $(call my-dir) 18 | 19 | include $(CLEAR_VARS) 20 | 21 | LOCAL_C_INCLUDES += $(call project-path-for,qcom-audio)/hal 22 | 23 | LOCAL_HEADER_LIBRARIES := generated_kernel_headers 24 | 25 | LOCAL_MODULE := audio_amplifier.$(TARGET_BOARD_PLATFORM) 26 | LOCAL_MODULE_RELATIVE_PATH := hw 27 | LOCAL_SRC_FILES := audio_amplifier.c 28 | LOCAL_SHARED_LIBRARIES := liblog libcutils 29 | LOCAL_MODULE_TAGS := optional 30 | LOCAL_CFLAGS := -Wno-unused-parameter 31 | LOCAL_VENDOR_MODULE := true 32 | LOCAL_HEADER_LIBRARIES += libhardware_headers 33 | 34 | include $(BUILD_SHARED_LIBRARY) 35 | -------------------------------------------------------------------------------- /sensors/service.cpp: -------------------------------------------------------------------------------- 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 | #define LOG_TAG "android.hardware.sensors@1.0-service.kuntao" 18 | 19 | #include 20 | #include 21 | 22 | using android::hardware::sensors::V1_0::ISensors; 23 | using android::hardware::defaultPassthroughServiceImplementation; 24 | 25 | int main() { 26 | /* Sensors framework service needs at least two threads. 27 | * One thread blocks on a "poll" 28 | * The second thread is needed for all other HAL methods. 29 | */ 30 | return defaultPassthroughServiceImplementation(2); 31 | } 32 | -------------------------------------------------------------------------------- /overlay/packages/apps/Bluetooth/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | false 15 | false 16 | false 17 | false 18 | 19 | 22 | false 23 | 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Device configuration for Lenovo P2a42 2 | 3 | ## Spec Sheet 4 | 5 | | Feature | Specification | 6 | | :---------------------- | :---------------------------------------------| 7 | | CPU | Octa-core 2.0 GHz Cortex-A53 | 8 | | Chipset | Qualcomm MSM8953 Snapdragon 625 | 9 | | GPU | Adreno 506 | 10 | | Memory | 3/4GB RAM | 11 | | Shipped Android Version | Android 6.0.1 (Marshmallow) | 12 | | Storage | 32 GB | 13 | | MicroSD | Up to 128GB | 14 | | Battery | 5100 mAh | 15 | | Dimensions | 153 x 76 x 8.3 mm | 16 | | Display | 1080 x 1920 pixels | 17 | | Camera | 13 MP | 18 | | Release Date | November, 2016 | 19 | 20 | ## Device Picture 21 | 22 | ![Lenovo P2](http://cdn2.gsmarena.com/vv/pics/lenovo/lenovo-p2-1.jpg "Lenovo P2") 23 | 24 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 17 | true 18 | 19 | 25 | 1 26 | 27 | 28 | -------------------------------------------------------------------------------- /devicesettings/res/xml/button_panel.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 22 | 23 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /biometrics/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2017 The Android Open Source Project 3 | // Copyright (C) 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 | cc_binary { 17 | name: "android.hardware.biometrics.fingerprint@2.0-service.kuntao", 18 | defaults: ["hidl_defaults"], 19 | relative_install_path: "hw", 20 | init_rc: ["android.hardware.biometrics.fingerprint@2.0-service.kuntao.rc"], 21 | srcs: ["service.cpp", "BiometricsFingerprint.cpp"], 22 | shared_libs: [ 23 | "libutils", 24 | "liblog", 25 | "libhidlbase", 26 | "libhidltransport", 27 | "libhardware", 28 | "libhwbinder", 29 | "android.hardware.biometrics.fingerprint@2.1", 30 | ], 31 | proprietary: true, 32 | } 33 | -------------------------------------------------------------------------------- /full_kuntao.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2015 The CyanogenMod 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 | # Inherit from those products. Most specific first. 18 | $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) 19 | $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) 20 | $(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_m.mk) 21 | 22 | # Inherit from kuntao device 23 | $(call inherit-product, device/lenovo/kuntao/device.mk) 24 | 25 | # Device vendor 26 | $(call inherit-product-if-exists, vendor/lenovo/kuntao/kuntao-vendor.mk) 27 | 28 | # Device identifier. This must come after all inclusions 29 | PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0 30 | PRODUCT_DEVICE := kuntao 31 | PRODUCT_NAME := full_kuntao 32 | PRODUCT_BRAND := Lenovo 33 | PRODUCT_MODEL := Lenovo P2a42 34 | PRODUCT_MANUFACTURER := Lenovo 35 | -------------------------------------------------------------------------------- /config.fs: -------------------------------------------------------------------------------- 1 | [AID_VENDOR_QTI_DIAG] 2 | value:2901 3 | 4 | [AID_VENDOR_QDSS] 5 | value:2902 6 | 7 | [AID_VENDOR_RFS] 8 | value:2903 9 | 10 | [AID_VENDOR_RFS_SHARED] 11 | value:2904 12 | 13 | [AID_VENDOR_ADPL_ODL] 14 | value:2905 15 | 16 | [AID_VENDOR_QRTR] 17 | value:2906 18 | 19 | [vendor/bin/pm-service] 20 | mode: 0755 21 | user: AID_SYSTEM 22 | group: AID_SYSTEM 23 | caps: NET_BIND_SERVICE 24 | 25 | [vendor/bin/imsdatadaemon] 26 | mode: 0755 27 | user: AID_SYSTEM 28 | group: AID_SYSTEM 29 | caps: NET_BIND_SERVICE 30 | 31 | [vendor/bin/ims_rtp_daemon] 32 | mode: 0755 33 | user: AID_SYSTEM 34 | group: AID_RADIO 35 | caps: NET_BIND_SERVICE 36 | 37 | [vendor/bin/imsrcsd] 38 | mode: 0755 39 | user: AID_SYSTEM 40 | group: AID_RADIO 41 | caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM 42 | 43 | [vendor/bin/cnd] 44 | mode: 0755 45 | user: AID_SYSTEM 46 | group: AID_SYSTEM 47 | caps: NET_BIND_SERVICE BLOCK_SUSPEND NET_ADMIN 48 | 49 | [vendor/bin/loc_launcher] 50 | mode: 0755 51 | user: AID_GPS 52 | group: AID_GPS 53 | caps: SETUID SETGID 54 | 55 | [firmware/] 56 | mode: 0771 57 | user: AID_SYSTEM 58 | group: AID_SYSTEM 59 | caps: 0 60 | 61 | [firmware/image/*] 62 | mode: 0771 63 | user: AID_SYSTEM 64 | group: AID_SYSTEM 65 | caps: 0 66 | 67 | [vendor/firmware_mnt/image/*] 68 | mode: 0771 69 | user: AID_ROOT 70 | group: AID_SYSTEM 71 | caps: 0 72 | 73 | [persist/] 74 | mode: 0771 75 | user: AID_SYSTEM 76 | group: AID_SYSTEM 77 | caps: 0 78 | 79 | [dsp/] 80 | mode: 0771 81 | user: AID_MEDIA 82 | group: AID_MEDIA 83 | caps: 0 84 | -------------------------------------------------------------------------------- /superior_kuntao.mk: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) 2016 The CyanogenMod 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 | # Inherit device configuration 17 | $(call inherit-product, device/lenovo/kuntao/full_kuntao.mk) 18 | 19 | # Inherit some common Superior stuff. 20 | $(call inherit-product, vendor/superior/config/common.mk) 21 | 22 | # Boot animation 23 | TARGET_SCREEN_WIDTH := 1080 24 | TARGET_SCREEN_HEIGHT := 1920 25 | 26 | # Google 27 | PRODUCT_GMS_CLIENTID_BASE := android-lenovo 28 | 29 | # Override build properties. 30 | PRODUCT_BUILD_PROP_OVERRIDES += \ 31 | PRIVATE_BUILD_DESC="kuntao_row-user 7.0 NRD90N P2a42_S251_171107_ROW release-keys" 32 | 33 | BUILD_FINGERPRINT := Lenovo/kuntao_row/P2a42:7.0/NRD90N/P2a42_S251_171107_ROW:user/release-keys 34 | 35 | ## Device identifier. This must come after all inclusions 36 | PRODUCT_DEVICE := kuntao 37 | PRODUCT_NAME := superior_kuntao 38 | PRODUCT_BRAND := Lenovo 39 | PRODUCT_MANUFACTURER := LENOVO 40 | PRODUCT_RELEASE_NAME := kuntao 41 | 42 | -------------------------------------------------------------------------------- /setup-makefiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017 The LineageOS Project 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | set -e 20 | 21 | DEVICE=kuntao 22 | VENDOR=lenovo 23 | 24 | INITIAL_COPYRIGHT_YEAR=2017 25 | 26 | # Load extract_utils and do some sanity checks 27 | MY_DIR="${BASH_SOURCE%/*}" 28 | if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi 29 | 30 | LINEAGE_ROOT="$MY_DIR"/../../.. 31 | 32 | HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh 33 | if [ ! -f "$HELPER" ]; then 34 | echo "Unable to find helper script at $HELPER" 35 | exit 1 36 | fi 37 | . "$HELPER" 38 | 39 | # Initialize the helper 40 | setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" 41 | 42 | # Copyright headers and guards 43 | write_headers 44 | 45 | write_makefiles "$MY_DIR"/proprietary-files.txt true 46 | echo "" >> "$PRODUCTMK" 47 | write_makefiles "$MY_DIR"/proprietary-files-qc.txt true 48 | 49 | # Finish 50 | write_footers 51 | -------------------------------------------------------------------------------- /lineagehw/src/org/lineageos/hardware/KeyDisabler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The CyanogenMod Project 3 | * Copyright (C) 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.hardware; 19 | 20 | import com.synaptics.fingerprint.Fingerprint; 21 | 22 | /* 23 | * Disable fingerprint gestures 24 | */ 25 | public class KeyDisabler { 26 | private static Fingerprint sFingerprint = new Fingerprint(null); 27 | 28 | /* 29 | * Always return true in our case 30 | */ 31 | public static boolean isSupported() { 32 | return true; 33 | } 34 | 35 | /* 36 | * Are the fingerprint gestures currently disabled? 37 | */ 38 | public static boolean isActive() { 39 | return Fingerprint.isNavEnabled(); 40 | } 41 | 42 | /* 43 | * Disable fingerprint gestures 44 | */ 45 | public static boolean setActive(boolean state) { 46 | return Fingerprint.enableNav(!state) == 0; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /health/Android.bp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 The LineageOS Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | cc_binary { 16 | name: "android.hardware.health@2.0-service.kuntao", 17 | init_rc: ["android.hardware.health@2.0-service.kuntao.rc"], 18 | proprietary: true, 19 | relative_install_path: "hw", 20 | srcs: [ 21 | "HealthService.cpp", 22 | ], 23 | 24 | cflags: [ 25 | "-Wall", 26 | "-Werror", 27 | ], 28 | 29 | static_libs: [ 30 | "android.hardware.health@2.0-impl", 31 | "android.hardware.health@1.0-convert", 32 | "libhealthservice", 33 | "libbatterymonitor", 34 | ], 35 | 36 | shared_libs: [ 37 | "libbase", 38 | "libcutils", 39 | "libhidlbase", 40 | "libhidltransport", 41 | "libhwbinder", 42 | "libutils", 43 | "android.hardware.health@2.0", 44 | ], 45 | 46 | header_libs: ["libhealthd_headers"], 47 | 48 | overrides: [ 49 | "healthd", 50 | ], 51 | } 52 | -------------------------------------------------------------------------------- /bluetooth/bdroid_buildcfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The CyanogenMod 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 _BDROID_BUILDCFG_H 18 | #define _BDROID_BUILDCFG_H 19 | 20 | #define BTM_DEF_LOCAL_NAME "Lenovo P2a42" 21 | #define BLUETOOTH_QTI_SW TRUE 22 | 23 | // Disables read remote device feature 24 | #define BTA_SKIP_BLE_READ_REMOTE_FEAT FALSE 25 | #define MAX_ACL_CONNECTIONS 7 26 | #define MAX_L2CAP_CHANNELS 16 27 | #define BLE_VND_INCLUDED TRUE 28 | 29 | // skips conn update at conn completion 30 | #define BTA_BLE_SKIP_CONN_UPD FALSE 31 | #define BLE_PERIPHERAL_ADV_NAME FALSE 32 | #define BT_CLEAN_TURN_ON_DISABLED TRUE 33 | #define BTM_SCO_ENHANCED_SYNC_ENABLED FALSE 34 | 35 | #define BTA_DISABLE_DELAY 1000 /* in milliseconds */ 36 | #define BTM_WBS_INCLUDED TRUE 37 | #define BTIF_HF_WBS_PREFERRED TRUE 38 | 39 | /* Increasing SEPs to 12 from 6 to support SHO/MCast i.e. two streams per codec */ 40 | #define AVDT_NUM_SEPS 12 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /gps/utils/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | #Compile this library only for builds with the latest modem image 4 | 5 | LOCAL_PATH := $(call my-dir) 6 | 7 | include $(CLEAR_VARS) 8 | 9 | 10 | ## Libs 11 | LOCAL_SHARED_LIBRARIES := \ 12 | libutils \ 13 | libcutils \ 14 | liblog 15 | 16 | LOCAL_SRC_FILES += \ 17 | loc_log.cpp \ 18 | loc_cfg.cpp \ 19 | msg_q.c \ 20 | linked_list.c \ 21 | loc_target.cpp \ 22 | LocHeap.cpp \ 23 | LocTimer.cpp \ 24 | LocThread.cpp \ 25 | MsgTask.cpp \ 26 | loc_misc_utils.cpp \ 27 | loc_nmea.cpp \ 28 | LocIpc.cpp 29 | 30 | # Flag -std=c++11 is not accepted by compiler when LOCAL_CLANG is set to true 31 | LOCAL_CFLAGS += \ 32 | -fno-short-enums \ 33 | -D_ANDROID_ 34 | 35 | ifeq ($(TARGET_BUILD_VARIANT),user) 36 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 37 | endif 38 | 39 | LOCAL_LDFLAGS += -Wl,--export-dynamic 40 | 41 | ## Includes 42 | LOCAL_HEADER_LIBRARIES := \ 43 | libutils_headers \ 44 | libloc_pla_headers \ 45 | liblocation_api_headers 46 | 47 | LOCAL_MODULE := libgps.utils 48 | LOCAL_VENDOR_MODULE := true 49 | LOCAL_MODULE_TAGS := optional 50 | 51 | LOCAL_PRELINK_MODULE := false 52 | 53 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 54 | 55 | include $(BUILD_SHARED_LIBRARY) 56 | 57 | include $(CLEAR_VARS) 58 | LOCAL_MODULE := libgps.utils_headers 59 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 60 | include $(BUILD_HEADER_LIBRARY) 61 | 62 | endif # not BUILD_TINY_ANDROID 63 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 64 | -------------------------------------------------------------------------------- /camera/QCamera2/HAL/tsMakeuplib/include/ts_makeup_data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014,2015 Thundersoft Corporation 3 | * All rights Reserved 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 | #ifndef __TS_MAKEUP_DATA_H__ 19 | #define __TS_MAKEUP_DATA_H__ 20 | 21 | #define TS_OK (0x00000000) //Successful 22 | #define TS_ERROR_PARAM (0x00000001) //Parameters error 23 | #define TS_ERROR_IO (0x00000002) //Input or output error 24 | #define TS_ERROR_INTERNAL (0x00000003) //Internal error 25 | #define TS_NO_MEMORY (0x00000004) //No memory error 26 | 27 | 28 | /* 29 | * Data struct : rectangle 30 | */ 31 | typedef struct __tag_tsrect 32 | { 33 | long left; 34 | long top; 35 | long right; 36 | long bottom; 37 | } TSRect; 38 | 39 | /* 40 | * Data struct : point 41 | */ 42 | typedef struct __tag_tsmakeuppoint 43 | { 44 | long x; 45 | long y; 46 | } TSPoint; 47 | 48 | 49 | #endif // __TS_MAKEUP_DATA_H__ 50 | -------------------------------------------------------------------------------- /keylayout/synaptics_dsx_i2c.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 143 WAKEUP VIRTUAL 29 | -------------------------------------------------------------------------------- /vndk/Android.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(BOARD_VNDK_VERSION),) 2 | $(warning ************* BOARD VNDK is not enabled - compiling vndk-sp ***************************) 3 | LOCAL_PATH := $(call my-dir) 4 | 5 | include $(LOCAL_PATH)/vndk-sp-libs.mk 6 | 7 | vndk_sp_dir := vndk-sp-$(PLATFORM_VNDK_VERSION) 8 | 9 | define define-vndk-sp-lib 10 | include $$(CLEAR_VARS) 11 | LOCAL_MODULE := $1.vndk-sp-gen 12 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 13 | LOCAL_PREBUILT_MODULE_FILE := $$(TARGET_OUT_INTERMEDIATE_LIBRARIES)/$1.so 14 | LOCAL_STRIP_MODULE := false 15 | LOCAL_MULTILIB := first 16 | LOCAL_MODULE_TAGS := optional 17 | LOCAL_INSTALLED_MODULE_STEM := $1.so 18 | LOCAL_MODULE_SUFFIX := .so 19 | LOCAL_MODULE_RELATIVE_PATH := $(vndk_sp_dir) 20 | include $$(BUILD_PREBUILT) 21 | 22 | ifneq ($$(TARGET_2ND_ARCH),) 23 | ifneq ($$(TARGET_TRANSLATE_2ND_ARCH),true) 24 | include $$(CLEAR_VARS) 25 | LOCAL_MODULE := $1.vndk-sp-gen 26 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 27 | LOCAL_PREBUILT_MODULE_FILE := $$($$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES)/$1.so 28 | LOCAL_STRIP_MODULE := false 29 | LOCAL_MULTILIB := 32 30 | LOCAL_MODULE_TAGS := optional 31 | LOCAL_INSTALLED_MODULE_STEM := $1.so 32 | LOCAL_MODULE_SUFFIX := .so 33 | LOCAL_MODULE_RELATIVE_PATH := $(vndk_sp_dir) 34 | include $$(BUILD_PREBUILT) 35 | endif # TARGET_TRANSLATE_2ND_ARCH is not true 36 | endif # TARGET_2ND_ARCH is not empty 37 | endef 38 | 39 | $(foreach lib,$(VNDK_SP_LIBRARIES),\ 40 | $(eval $(call define-vndk-sp-lib,$(lib)))) 41 | 42 | include $(CLEAR_VARS) 43 | LOCAL_MODULE := vndk-sp 44 | LOCAL_MODULE_TAGS := optional 45 | LOCAL_REQUIRED_MODULES := $(addsuffix .vndk-sp-gen,$(VNDK_SP_LIBRARIES)) 46 | include $(BUILD_PHONY_PACKAGE) 47 | 48 | vndk_sp_dir := 49 | endif 50 | -------------------------------------------------------------------------------- /gps/core/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libloc_core 9 | LOCAL_VENDOR_MODULE := true 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | ifeq ($(TARGET_DEVICE),apq8026_lw) 13 | LOCAL_CFLAGS += -DPDK_FEATURE_SET 14 | else ifeq ($(BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET),true) 15 | LOCAL_CFLAGS += -DPDK_FEATURE_SET 16 | endif 17 | 18 | LOCAL_SHARED_LIBRARIES := \ 19 | liblog \ 20 | libutils \ 21 | libcutils \ 22 | libgps.utils \ 23 | libdl \ 24 | liblog 25 | 26 | LOCAL_SRC_FILES += \ 27 | LocApiBase.cpp \ 28 | LocAdapterBase.cpp \ 29 | ContextBase.cpp \ 30 | LocDualContext.cpp \ 31 | loc_core_log.cpp \ 32 | data-items/DataItemsFactoryProxy.cpp \ 33 | SystemStatusOsObserver.cpp \ 34 | SystemStatus.cpp 35 | 36 | LOCAL_CFLAGS += \ 37 | -fno-short-enums \ 38 | -D_ANDROID_ 39 | 40 | LOCAL_C_INCLUDES:= \ 41 | $(LOCAL_PATH)/data-items \ 42 | $(LOCAL_PATH)/data-items/common \ 43 | $(LOCAL_PATH)/observer \ 44 | 45 | LOCAL_HEADER_LIBRARIES := \ 46 | libutils_headers \ 47 | libgps.utils_headers \ 48 | libloc_pla_headers \ 49 | liblocation_api_headers 50 | 51 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 52 | 53 | include $(BUILD_SHARED_LIBRARY) 54 | 55 | include $(CLEAR_VARS) 56 | LOCAL_MODULE := libloc_core_headers 57 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ 58 | $(LOCAL_PATH) \ 59 | $(LOCAL_PATH)/data-items \ 60 | $(LOCAL_PATH)/data-items/common \ 61 | $(LOCAL_PATH)/observer 62 | include $(BUILD_HEADER_LIBRARY) 63 | 64 | endif # not BUILD_TINY_ANDROID 65 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 66 | -------------------------------------------------------------------------------- /keylayout/ft5x06_ts.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 158 BACK 29 | key 139 APP_SWITCH 30 | key 172 HOME 31 | key 217 SEARCH 32 | -------------------------------------------------------------------------------- /keylayout/synaptics_dsx.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 158 BACK 29 | key 139 APP_SWITCH 30 | key 172 HOME 31 | key 217 SEARCH 32 | -------------------------------------------------------------------------------- /configs/nfc/libnfc-nci-20797b00.conf: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Firmware patch file 3 | #FW_PATCH="/vendor/firmware/BCM20797B0_002.001.043.0005.0010_Generic_NCD_Unsigned_configdata.ncd" 4 | #FW_PATCH="/vendor/firmware/BCM20797B0_002.001.043.0005.0007_Generic_NCD_Unsigned_configdata.ncd" 5 | ############################################################################### 6 | # LPTD mode configuration 7 | # increment 0xE8 (Configuration data set version) in NFA_DM_START_UP_CFG when modifying LPTD_CFG 8 | # OFFSET={--:--:--:00:01:02:03:04:05:06:07:08:09:10:11: 9 | #LPTD_CFG={} 10 | 11 | ############################################################################### 12 | # Startup Configuration (256 bytes maximum) 13 | NFA_DM_START_UP_CFG={9d:E8:02:01:00:80:01:00:C2:02:01:02:C4:02:03:13:CA:05:02:0F:0D:00:08:D6:0B:30:01:02:00:00:00:01:00:01:00:07:DD:09:00:00:01:18:01:85:33:00:33:E0:07:00:60:93:1c:63:3e:0A:E1:02:96:02:E2:04:5A:0C:0B:10:E3:08:17:00:1D:0F:10:0C:2B:0B:E4:01:37:E5:1E:F0:3D:02:12:00:0A:00:10:04:57:54:54:54:2B:52:50:53:4E:21:2D:0A:0C:02:07:00:8C:70:8C:70:20:E6:2D:01:68:00:77:00:8B:00:A7:00:D6:00:22:01:C0:01:8C:58:4C:40:33:2B:26:20:68:00:77:00:8B:00:A7:00:D6:00:22:01:C0:01:8C:68:5C:50:43:37:2B:20} 14 | 15 | ############################################################################### 16 | # Pre-Discovery Startup Configuration (256 bytes maximum) 17 | #NFA_DM_PRE_DISCOVERY_CFG={} 18 | 19 | ############################################################################### 20 | # Snooze Mode Settings 21 | SNOOZE_MODE_CFG={08:00:00:01:01} 22 | 23 | ############################################################################### 24 | # Choose the presence-check algorithm for type-4 tag. 25 | PRESENCE_CHECK_ALGORITHM=1 26 | -------------------------------------------------------------------------------- /keylayout/synaptics_dsxv26.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014,2016, 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 158 BACK 29 | key 139 APP_SWITCH 30 | key 172 HOME 31 | key 217 SEARCH 32 | -------------------------------------------------------------------------------- /keylayout/synaptics_rmi4_i2c.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 158 BACK 29 | key 139 APP_SWITCH 30 | key 172 HOME 31 | key 217 SEARCH 32 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml/power_profile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 87.2 4 | 102.46 5 | 93.7 6 | 1.63 7 | 19.61 8 | 127 9 | 111.39 10 | 66.06 11 | 162.55 12 | 39.57 13 | 448.46 14 | 60.48 15 | 3.6 16 | 30.54 17 | 18 | 7.11 19 | 20 | 21 | 652800 22 | 1036800 23 | 1401600 24 | 1689600 25 | 1804800 26 | 1958400 27 | 2016000 28 | 29 | 30 | 96 31 | 109 32 | 123 33 | 144 34 | 160 35 | 171 36 | 181 37 | 38 | 39 | .0002 40 | .002 41 | .02 42 | .2 43 | 2 44 | 45 | 93 46 | 4.23 47 | 5100 48 | 49 | -------------------------------------------------------------------------------- /keylayout/gpio-keys.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 115 VOLUME_UP 29 | key 114 VOLUME_DOWN 30 | key 102 HOME 31 | key 528 FOCUS 32 | key 766 CAMERA 33 | key 172 HOMEPAGE 34 | -------------------------------------------------------------------------------- /update-sha1sums.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017 The LineageOS Project 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | from hashlib import sha1 20 | 21 | device='kuntao' 22 | vendor='lenovo' 23 | 24 | lines = [ line for line in open('proprietary-files-qc.txt', 'r') ] 25 | vendorPath = '../../../vendor/' + vendor + '/' + device + '/proprietary' 26 | needSHA1 = False 27 | 28 | for index, line in enumerate(lines): 29 | # Remove '\n' character 30 | line = line[:-1] 31 | 32 | # Skip empty lines 33 | if len(line) == 0: 34 | continue 35 | 36 | # Check if we need to set SHA1 hash for the next files 37 | if line[0] == '#': 38 | needSHA1 = (' - from' in line) 39 | continue 40 | 41 | if needSHA1: 42 | # Remove existing SHA1 hash 43 | line = line.split('|')[0] 44 | 45 | if line[0] == '-': 46 | file = open('%s/%s' % (vendorPath, line[1:]), 'rb').read() 47 | else: 48 | file = open('%s/%s' % (vendorPath, line), 'rb').read() 49 | 50 | hash = sha1(file).hexdigest() 51 | lines[index] = '%s|%s\n' % (line, hash) 52 | 53 | with open('proprietary-files-qc.txt', 'w') as file: 54 | for line in lines: 55 | file.write(line) 56 | 57 | file.close() 58 | -------------------------------------------------------------------------------- /biometrics/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "android.hardware.biometrics.fingerprint@2.0-service.kuntao" 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include "BiometricsFingerprint.h" 25 | 26 | using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint; 27 | using android::hardware::biometrics::fingerprint::V2_1::implementation::BiometricsFingerprint; 28 | using android::hardware::configureRpcThreadpool; 29 | using android::hardware::joinRpcThreadpool; 30 | using android::sp; 31 | 32 | int main() { 33 | android::sp bio = BiometricsFingerprint::getInstance(); 34 | 35 | configureRpcThreadpool(1, true /*callerWillJoin*/); 36 | 37 | if (bio != nullptr) { 38 | if (::android::OK != bio->registerAsService()) { 39 | return 1; 40 | } 41 | } else { 42 | ALOGE("Can't create instance of BiometricsFingerprint, nullptr"); 43 | } 44 | 45 | joinRpcThreadpool(); 46 | 47 | return 0; // should never get here 48 | } 49 | -------------------------------------------------------------------------------- /lineagehw/src/org/lineageos/hardware/Fingerprint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 com.synaptics.fingerprint; 18 | 19 | import android.content.Context; 20 | 21 | public class Fingerprint extends FingerprintCore { 22 | // Dummy jni functions to suppress errors 23 | private native int jniEnableSensorDevice(int i); 24 | 25 | private native int jniEnrollUser(Object obj); 26 | 27 | private native int jniGetTUIDList(Object obj, Object obj2); 28 | 29 | private native int jniNavGetConfig(Object obj); 30 | 31 | private native int jniNavSetConfig(Object obj); 32 | 33 | private native int jniNotify(int i, Object obj); 34 | 35 | private native int jniRemoveEnrolledFinger(Object obj); 36 | 37 | private native int jniRequest(int i, Object obj); 38 | 39 | // Actually used jni functions (redeclared to static) 40 | private static native int jniEnableNav(boolean z); 41 | 42 | private static native boolean jniIsNavEnabled(); 43 | 44 | public Fingerprint(Context context) { 45 | super(context); 46 | } 47 | 48 | public static int enableNav(boolean z) { 49 | return jniEnableNav(z); 50 | } 51 | 52 | public static boolean isNavEnabled() { 53 | return jniIsNavEnabled(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /camera/QCamera2/HAL/tsMakeuplib/include/ts_makeup_image.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014,2015 Thundersoft Corporation 3 | * All rights Reserved 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 | #ifndef __TS_MAKEUP_IMGAGE_H__ 19 | #define __TS_MAKEUP_IMGAGE_H__ 20 | 21 | /* 22 | * Data struct : TSMakeupData 23 | */ 24 | typedef struct __tag_tsmakeupdata 25 | { 26 | int frameWidth; //NV21 Frame width.MUST > 0. 27 | int frameHeight; //NV21 Frame height. MUST > 0. 28 | unsigned char *yBuf; //NV21 Y buffer pointer.MUST not null. 29 | unsigned char *uvBuf; //NV21 UV buffer pointer.MUST not null. 30 | }TSMakeupData; 31 | 32 | /* 33 | * Data struct : TSMakeupDataEx 34 | */ 35 | typedef struct __tag_tsmakeupdataEx 36 | { 37 | int frameWidth; //NV21 Frame width.MUST > 0. 38 | int frameHeight; //NV21 Frame height. MUST > 0. 39 | unsigned char *yBuf; //NV21 Y buffer pointer.MUST not null. 40 | unsigned char *uvBuf; //NV21 UV buffer pointer.MUST not null. 41 | int yStride; //NV21 Y buffer stride len 42 | int uvStride; //NV21 uv buffer stride len 43 | }TSMakeupDataEx; 44 | 45 | 46 | #endif // __TS_MAKEUP_IMGAGE_H__ 47 | -------------------------------------------------------------------------------- /devicesettings/res/drawable/ic_double_tap.xml: -------------------------------------------------------------------------------- 1 | 13 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /sepolicy/file_contexts: -------------------------------------------------------------------------------- 1 | # Audio 2 | /dev/i2c_smartpa(/.*)? u:object_r:audio_device:s0 3 | 4 | /vendor/bin/vfmService u:object_r:vfmService_exec:s0 5 | 6 | # Fastcharger 7 | /sys/devices/soc/78b8000.i2c/i2c-4/4-0057/power_supply/ext-charger(/.*)? u:object_r:sysfs_smart_charger:s0 8 | /sys/devices/soc/7af5000.i2c/i2c-4/4-001d/power_supply/ext-charger-dual(/.*)? u:object_r:sysfs_smart_charger:s0 9 | /vendor/bin/smart_charger u:object_r:smart_charger_exec:s0 10 | /sys/devices/virtual/hwmon/hwmon5/temp1_input u:object_r:sysfs_temperature:s0 11 | 12 | # Camera 13 | /data/cam_socket[12] u:object_r:camera_socket:s0 14 | 15 | # Fingerprint 16 | /dev/vfsspi u:object_r:vfs_device:s0 17 | /dev/validity(/.*)? u:object_r:fingerprintd_data_file:s0 18 | /data/validity(/.*)? u:object_r:fingerprintd_data_file:s0 19 | 20 | # Partitions 21 | /dev/block/bootdevice/by-name/cache u:object_r:cache_block_device:s0 22 | 23 | # NFC 24 | /dev/bcm2079x-i2c u:object_r:nfc_device:s0 25 | 26 | # Sensors 27 | /vendor/bin/hw/android\.hardware\.sensors@1\.0-service\.kuntao u:object_r:hal_sensors_default_exec:s0 28 | /data/misc/akmd_set\.txt u:object_r:sensors_data_file:s0 29 | /data/STSensorHAL/iNemoEngine_gbias\.dat u:object_r:sensors_data_file:s0 30 | /persist/GSSET\.txt u:object_r:sensors_persist_file:s0 31 | /sys/bus/iio/devices u:object_r:sysfs_sensors:s0 32 | /sys/devices/iio:device[0-9](/.*)? u:object_r:sysfs_sensors:s0 33 | /sys/devices/platform/elan_alsps(/.*)? u:object_r:sysfs_sensors:s0 34 | -------------------------------------------------------------------------------- /gps/android/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 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | true 25 | 26 | 27 | 7 28 | 8 29 | 30 | 32 | true 33 | 34 | 35 | 10s,30s,60s,180s 36 | 37 | 38 | true 39 | 40 | 41 | 0 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /framework_manifest.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 31 | vendor.qti.hardware.radio.atcmdfwd 32 | hwbinder 33 | 1.0 34 | 35 | IAtCmdFwd 36 | AtCmdFwdService 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /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++11 \ 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 | loc_misc_utils.h \ 27 | loc_nmea.h \ 28 | gps_extended_c.h \ 29 | gps_extended.h \ 30 | loc_gps.h \ 31 | log_util.h 32 | 33 | libgps_utils_la_c_sources = \ 34 | linked_list.c \ 35 | msg_q.c \ 36 | loc_cfg.cpp \ 37 | loc_log.cpp \ 38 | loc_target.cpp \ 39 | LocHeap.cpp \ 40 | LocTimer.cpp \ 41 | LocThread.cpp \ 42 | LocIpc.cpp \ 43 | MsgTask.cpp \ 44 | loc_misc_utils.cpp \ 45 | loc_nmea.cpp 46 | 47 | library_includedir = $(pkgincludedir) 48 | 49 | library_include_HEADERS = $(libgps_utils_la_h_sources) 50 | 51 | libgps_utils_la_SOURCES = $(libgps_utils_la_c_sources) 52 | 53 | if USE_GLIB 54 | libgps_utils_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 55 | libgps_utils_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 56 | libgps_utils_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 57 | else 58 | libgps_utils_la_CFLAGS = $(AM_CFLAGS) 59 | libgps_utils_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 60 | libgps_utils_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 61 | endif 62 | 63 | libgps_utils_la_LIBADD = $(CUTILS_LIBS) 64 | 65 | #Create and Install libraries 66 | lib_LTLIBRARIES = libgps_utils.la 67 | 68 | pkgconfigdir = $(libdir)/pkgconfig 69 | pkgconfig_DATA = gps-utils.pc 70 | EXTRA_DIST = $(pkgconfig_DATA) 71 | -------------------------------------------------------------------------------- /rootdir/etc/init.qcom.early_boot.sh: -------------------------------------------------------------------------------- 1 | #!/vendor/bin/sh 2 | # Copyright (c) 2012-2013,2016,2018 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 | boot_reason=`cat /proc/sys/kernel/boot_reason` 32 | reboot_reason=`getprop ro.boot.alarmboot` 33 | if [ "$boot_reason" = "3" ] || [ "$reboot_reason" = "true" ]; then 34 | setprop ro.vendor.alarm_boot true 35 | else 36 | setprop ro.vendor.alarm_boot false 37 | fi 38 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /fixmerge: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #Auto fix git merge/cherry-pick conflicts in files 3 | #Revision 1 4 | 5 | #Startup check 6 | if [[ -e /tmp/conflicts ]]; then 7 | rm -f /tmp/conflicts 8 | fi; 9 | 10 | #HEADER 11 | echo "--- GIT Conflict Resolver v1.0" 12 | echo "-- Created by broodplank" 13 | echo "- broodplank.net" 14 | echo 15 | echo "-> Checking for .git folder" 16 | echo -n "Result: " 17 | 18 | #Check for .git folder for behavior 19 | if [[ -d ${PWD}/.git ]]; then 20 | 21 | echo "found, using git diff" 22 | echo 23 | echo "-> Finding conflicts..." 24 | git diff --name-only --diff-filter=U > /tmp/conflicts 25 | 26 | else 27 | 28 | echo "not found, using native tools" 29 | echo 30 | echo "-> Finding conflicts..." 31 | grep -l -H -r '<<<<<<< HEAD' ${PWD}/* | awk '!a[$0]++' > /tmp/conflicts 32 | 33 | fi; 34 | 35 | 36 | #Check if conflicts exist 37 | if [[ `cat /tmp/conflicts` != "" ]]; then 38 | echo 39 | echo "-> Conflicts found in files:" 40 | while read F ; do 41 | echo '- '$F 42 | done Fixing conflicts..." 51 | echo 52 | while read G ; do 53 | echo "--> Working on file: $G" 54 | echo "Removing text between HEAD and middle" 55 | sed -i -s '/<<<<<<< HEAD/,/=======/d' $G 56 | echo "Removing conflict footer" 57 | sed -i -s '/>>>>>>>/d' $G 58 | echo 59 | done Conflicts have been automatically fixed!" 63 | echo 64 | echo "Please note:" 65 | echo "Although most of the conflicts can be resolved this way, It does not count for all conflicts." 66 | echo "If you experience errors on compiling please review the changes made" 67 | echo 68 | 69 | #Stage commit? 70 | if [[ -d ${PWD}/.git ]]; then 71 | echo "Would you like to stage the commit? () [Y/n]" 72 | echo -n ": " 73 | read choice 74 | if [[ $choice != "n" ]]; then 75 | git add . 76 | git commit 77 | fi 78 | 79 | 80 | fi; 81 | echo 82 | echo "All done!" -------------------------------------------------------------------------------- /fixmerge.1: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #Auto fix git merge/cherry-pick conflicts in files 3 | #Revision 1 4 | 5 | #Startup check 6 | if [[ -e /tmp/conflicts ]]; then 7 | rm -f /tmp/conflicts 8 | fi; 9 | 10 | #HEADER 11 | echo "--- GIT Conflict Resolver v1.0" 12 | echo "-- Created by broodplank" 13 | echo "- broodplank.net" 14 | echo 15 | echo "-> Checking for .git folder" 16 | echo -n "Result: " 17 | 18 | #Check for .git folder for behavior 19 | if [[ -d ${PWD}/.git ]]; then 20 | 21 | echo "found, using git diff" 22 | echo 23 | echo "-> Finding conflicts..." 24 | git diff --name-only --diff-filter=U > /tmp/conflicts 25 | 26 | else 27 | 28 | echo "not found, using native tools" 29 | echo 30 | echo "-> Finding conflicts..." 31 | grep -l -H -r '<<<<<<< HEAD' ${PWD}/* | awk '!a[$0]++' > /tmp/conflicts 32 | 33 | fi; 34 | 35 | 36 | #Check if conflicts exist 37 | if [[ `cat /tmp/conflicts` != "" ]]; then 38 | echo 39 | echo "-> Conflicts found in files:" 40 | while read F ; do 41 | echo '- '$F 42 | done Fixing conflicts..." 51 | echo 52 | while read G ; do 53 | echo "--> Working on file: $G" 54 | echo "Removing text between HEAD and middle" 55 | sed -i -s '/<<<<<<< HEAD/,/=======/d' $G 56 | echo "Removing conflict footer" 57 | sed -i -s '/>>>>>>>/d' $G 58 | echo 59 | done Conflicts have been automatically fixed!" 63 | echo 64 | echo "Please note:" 65 | echo "Although most of the conflicts can be resolved this way, It does not count for all conflicts." 66 | echo "If you experience errors on compiling please review the changes made" 67 | echo 68 | 69 | #Stage commit? 70 | if [[ -d ${PWD}/.git ]]; then 71 | echo "Would you like to stage the commit? () [Y/n]" 72 | echo -n ": " 73 | read choice 74 | if [[ $choice != "n" ]]; then 75 | git add . 76 | git commit 77 | fi 78 | 79 | 80 | fi; 81 | echo 82 | echo "All done!" -------------------------------------------------------------------------------- /camera/QCamera2/HAL/android/QCamera2External.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2016, 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 __QCAMERA2EXTERNAL_H__ 31 | #define __QCAMERA2EXTERNAL_H__ 32 | 33 | // System dependencies 34 | #include 35 | 36 | // Display dependencies 37 | #include "QServiceUtils.h" 38 | 39 | namespace qcamera { 40 | 41 | inline android::status_t setCameraLaunchStatus(uint32_t on) { 42 | return ::setCameraLaunchStatus(on); 43 | } 44 | 45 | }; // namespace qcamera 46 | 47 | #endif /* __QCAMERA2EXTERNAL_H__ */ 48 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-camera-interface/Android.mk: -------------------------------------------------------------------------------- 1 | OLD_LOCAL_PATH := $(LOCAL_PATH) 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(CLEAR_VARS) 5 | 6 | MM_CAM_FILES := \ 7 | src/mm_camera_interface.c \ 8 | src/mm_camera.c \ 9 | src/mm_camera_channel.c \ 10 | src/mm_camera_stream.c \ 11 | src/mm_camera_thread.c \ 12 | src/mm_camera_sock.c 13 | 14 | # System header file path prefix 15 | LOCAL_CFLAGS += -DSYSTEM_HEADER_PREFIX=sys 16 | 17 | ifeq ($(strip $(TARGET_USES_ION)),true) 18 | LOCAL_CFLAGS += -DUSE_ION 19 | endif 20 | 21 | ifneq (,$(filter msm8974 msm8916 msm8226 msm8610 msm8916 apq8084 msm8084 msm8994 msm8992 msm8952 msm8937 msm8953 msm8996,$(TARGET_BOARD_PLATFORM))) 22 | LOCAL_CFLAGS += -DVENUS_PRESENT 23 | endif 24 | 25 | ifneq (,$(filter msm8996,$(TARGET_BOARD_PLATFORM))) 26 | LOCAL_CFLAGS += -DUBWC_PRESENT 27 | endif 28 | 29 | LOCAL_CFLAGS += -D_ANDROID_ -DQCAMERA_REDEFINE_LOG 30 | LOCAL_COPY_HEADERS_TO := mm-camera-interface 31 | LOCAL_COPY_HEADERS += ../common/cam_intf.h 32 | LOCAL_COPY_HEADERS += ../common/cam_types.h 33 | 34 | LOCAL_C_INCLUDES := \ 35 | $(LOCAL_PATH)/inc \ 36 | $(LOCAL_PATH)/../common \ 37 | hardware/libhardware/include/hardware \ 38 | hardware/qcom/media/mm-core/inc \ 39 | system/media/camera/include \ 40 | 41 | LOCAL_CFLAGS += -DCAMERA_ION_HEAP_ID=ION_IOMMU_HEAP_ID 42 | 43 | ifneq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 17 ))" ))) 44 | LOCAL_CFLAGS += -include bionic/libc/kernel/common/linux/socket.h 45 | LOCAL_CFLAGS += -include bionic/libc/kernel/common/linux/un.h 46 | endif 47 | 48 | LOCAL_CFLAGS += -Wall -Wextra -Werror 49 | 50 | LOCAL_SRC_FILES := $(MM_CAM_FILES) 51 | 52 | LOCAL_MODULE := libmmcamera_interface 53 | LOCAL_SHARED_LIBRARIES := libdl libcutils liblog libutils 54 | LOCAL_HEADER_LIBRARIES := libhardware_headers 55 | LOCAL_HEADER_LIBRARIES += generated_kernel_headers 56 | LOCAL_MODULE_TAGS := optional 57 | LOCAL_VENDOR_MODULE := true 58 | 59 | LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 60 | include $(BUILD_SHARED_LIBRARY) 61 | 62 | LOCAL_PATH := $(OLD_LOCAL_PATH) 63 | -------------------------------------------------------------------------------- /camera/QCamera2/HAL3/android/QCamera3External.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015-2016, 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 __QCAMERA3EXTERNAL_H__ 31 | #define __QCAMERA3EXTERNAL_H__ 32 | 33 | // System dependencies 34 | #include 35 | 36 | // Display dependencies 37 | #include "QServiceUtils.h" 38 | 39 | namespace qcamera { 40 | 41 | inline android::status_t setCameraLaunchStatus(uint32_t on) { 42 | return ::setCameraLaunchStatus(on); 43 | } 44 | 45 | }; // namespace qcamera 46 | 47 | #endif /* __QCAMERA3EXTERNAL_H__ */ 48 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_mpo.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015-2016, 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 MM_JPEG_MPO_H_ 31 | #define MM_JPEG_MPO_H_ 32 | 33 | // JPEG dependencies 34 | #include "mm_jpeg_interface.h" 35 | #include "qmpo.h" 36 | 37 | #define TRUE 1 38 | #define FALSE 0 39 | 40 | extern int mm_jpeg_mpo_compose(mm_jpeg_mpo_info_t *mpo_info); 41 | 42 | extern int get_mpo_size(mm_jpeg_output_t jpeg_buffer[MM_JPEG_MAX_MPO_IMAGES], 43 | int num_of_images); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /lineagehw/src/org/lineageos/hardware/FingerprintCore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 com.synaptics.fingerprint; 18 | 19 | import android.content.Context; 20 | import android.util.Log; 21 | 22 | public class FingerprintCore { 23 | protected static final String TAG = "Fingerprint"; 24 | protected Context mContext = null; 25 | 26 | private native int jniCancelOp(); 27 | 28 | private native int jniCleanupVcs(); 29 | 30 | private native int jniGetEnrolledFingerList(String str, VcsInt vcsInt); 31 | 32 | private native int jniGetFingerprintImage(); 33 | 34 | private native Object[] jniGetUserList(VcsInt vcsInt); 35 | 36 | private native String jniGetVersion(); 37 | 38 | private native int jniIdentify(String str); 39 | 40 | private native int jniIdentifyEx(String str, Object obj); 41 | 42 | private native int jniInitVcs(FingerprintCore fingerprintCore); 43 | 44 | public FingerprintCore(Context context) { 45 | this.mContext = context; 46 | int jniInitVcs = jniInitVcs(this); 47 | if (jniInitVcs != 0) { 48 | Log.e(TAG, "Initialization failed, result:" + jniInitVcs); 49 | } 50 | } 51 | 52 | public synchronized void FingerprintEventCallback(FingerprintEvent fingerprintEvent) { 53 | } 54 | 55 | static { 56 | try { 57 | System.loadLibrary("vcsfp"); 58 | } catch (Throwable th) { 59 | Log.e(TAG, "Error loading library libvcsfp: " + th); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /configs/privapp-permissions-qti.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /extract-files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017 The LineageOS Project 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | set -e 20 | 21 | DEVICE=kuntao 22 | VENDOR=lenovo 23 | INITIAL_COPYRIGHT_YEAR=2017 24 | 25 | # Load extract_utils and do some sanity checks 26 | MY_DIR="${BASH_SOURCE%/*}" 27 | if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi 28 | 29 | LINEAGE_ROOT="$MY_DIR"/../../.. 30 | 31 | HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh 32 | if [ ! -f "$HELPER" ]; then 33 | echo "Unable to find helper script at $HELPER" 34 | exit 1 35 | fi 36 | . "$HELPER" 37 | 38 | # Default to sanitizing the vendor folder before extraction 39 | CLEAN_VENDOR=true 40 | 41 | while [ "$1" != "" ]; do 42 | case $1 in 43 | -n | --no-cleanup ) CLEAN_VENDOR=false 44 | ;; 45 | -s | --section ) shift 46 | SECTION=$1 47 | CLEAN_VENDOR=false 48 | ;; 49 | * ) SRC=$1 50 | ;; 51 | esac 52 | shift 53 | done 54 | 55 | if [ -z "$SRC" ]; then 56 | SRC=adb 57 | fi 58 | 59 | # Initialize the helper 60 | setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" false "$CLEAN_VENDOR" 61 | 62 | extract "$MY_DIR"/proprietary-files.txt "$SRC" "$SECTION" 63 | extract "$MY_DIR"/proprietary-files-qc.txt "$SRC" "$SECTION" 64 | 65 | COMMON_BLOB_ROOT="$LINEAGE_ROOT"/vendor/"$VENDOR"/"$DEVICE"/proprietary 66 | 67 | "$MY_DIR"/setup-makefiles.sh 68 | -------------------------------------------------------------------------------- /gps/gnsspps/gnsspps.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2015, 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 Foundatoin, 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 | #ifndef _GNSSPPS_H 29 | #define _GNSSPPS_H 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | /* opens the device and fetches from PPS source */ 36 | int initPPS(char *devname); 37 | /* updates the fine time stamp */ 38 | int getPPS(struct timespec *current_ts, struct timespec *current_boottime, struct timespec *last_boottime); 39 | /* stops fetching and closes the device */ 40 | void deInitPPS(); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | #endif 46 | -------------------------------------------------------------------------------- /power/list.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, 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 | struct list_node { 31 | struct list_node *next; 32 | void *data; 33 | int (*compare)(void *data1, void *data2); 34 | void (*dump)(void *data); 35 | }; 36 | 37 | int init_list_head(struct list_node *head); 38 | struct list_node * add_list_node(struct list_node *head, void *data); 39 | int remove_list_node(struct list_node *head, struct list_node *del_node); 40 | void dump_list(struct list_node *head); 41 | struct list_node *find_node(struct list_node *head, void *comparison_data); 42 | -------------------------------------------------------------------------------- /power/hint-data.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, 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 | #include "hint-data.h" 31 | 32 | int hint_compare(struct hint_data *first_hint, 33 | struct hint_data *other_hint) { 34 | if (first_hint == other_hint) { 35 | return 0; 36 | } else if ((first_hint && other_hint) && 37 | (first_hint->hint_id == other_hint->hint_id)) { 38 | return 0; 39 | } else { 40 | return 1; 41 | } 42 | } 43 | 44 | void hint_dump(struct hint_data *hint) 45 | { 46 | /*ALOGI("hint_id: %lu", hint->hint_id);*/ 47 | } 48 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-jpeg-interface/Android.mk: -------------------------------------------------------------------------------- 1 | OLD_LOCAL_PATH := $(LOCAL_PATH) 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 7 | LOCAL_CFLAGS+= -D_ANDROID_ -DQCAMERA_REDEFINE_LOG 8 | 9 | LOCAL_CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter 10 | 11 | LOCAL_HEADER_LIBRARIES := generated_kernel_headers 12 | 13 | LOCAL_C_INCLUDES += \ 14 | frameworks/native/include/media/openmax \ 15 | $(LOCAL_PATH)/inc \ 16 | $(LOCAL_PATH)/../common \ 17 | $(LOCAL_PATH)/../mm-camera-interface/inc \ 18 | $(LOCAL_PATH)/../../.. \ 19 | $(LOCAL_PATH)/../../../mm-image-codec/qexif \ 20 | $(LOCAL_PATH)/../../../mm-image-codec/qomx_core 21 | 22 | ifeq ($(strip $(TARGET_USES_ION)),true) 23 | LOCAL_CFLAGS += -DUSE_ION 24 | endif 25 | 26 | ifneq (,$(filter msm8610,$(TARGET_BOARD_PLATFORM))) 27 | LOCAL_CFLAGS+= -DLOAD_ADSP_RPC_LIB 28 | endif 29 | 30 | DUAL_JPEG_TARGET_LIST := msm8974 31 | DUAL_JPEG_TARGET_LIST += msm8994 32 | 33 | ifneq (,$(filter $(DUAL_JPEG_TARGET_LIST),$(TARGET_BOARD_PLATFORM))) 34 | LOCAL_CFLAGS+= -DMM_JPEG_CONCURRENT_SESSIONS_COUNT=2 35 | else 36 | LOCAL_CFLAGS+= -DMM_JPEG_CONCURRENT_SESSIONS_COUNT=1 37 | endif 38 | 39 | JPEG_PIPELINE_TARGET_LIST := msm8994 40 | JPEG_PIPELINE_TARGET_LIST += msm8992 41 | JPEG_PIPELINE_TARGET_LIST += msm8996 42 | 43 | ifneq (,$(filter $(JPEG_PIPELINE_TARGET_LIST),$(TARGET_BOARD_PLATFORM))) 44 | LOCAL_CFLAGS+= -DMM_JPEG_USE_PIPELINE 45 | endif 46 | 47 | # System header file path prefix 48 | LOCAL_CFLAGS += -DSYSTEM_HEADER_PREFIX=sys 49 | 50 | LOCAL_SRC_FILES := \ 51 | src/mm_jpeg_queue.c \ 52 | src/mm_jpeg_exif.c \ 53 | src/mm_jpeg.c \ 54 | src/mm_jpeg_interface.c \ 55 | src/mm_jpeg_ionbuf.c \ 56 | src/mm_jpegdec_interface.c \ 57 | src/mm_jpegdec.c \ 58 | src/mm_jpeg_mpo_composer.c 59 | 60 | LOCAL_MODULE := libmmjpeg_interface 61 | LOCAL_SHARED_LIBRARIES := libdl libcutils liblog libqomx_core libmmcamera_interface libutils 62 | LOCAL_MODULE_TAGS := optional 63 | LOCAL_VENDOR_MODULE := true 64 | 65 | LOCAL_32_BIT_ONLY := $(BOARD_QTI_CAMERA_32BIT_ONLY) 66 | include $(BUILD_SHARED_LIBRARY) 67 | 68 | LOCAL_PATH := $(OLD_LOCAL_PATH) 69 | -------------------------------------------------------------------------------- /power/powerhintparser.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2016, 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 __POWERHINTPARSER__ 31 | #define __POWERHINTPARSER__ 32 | 33 | #define POWERHINT_XML "/vendor/etc/powerhint.xml" 34 | #define MAX_HINT 6 35 | #define MAX_PARAM 30 36 | 37 | typedef struct perflock_param_t { 38 | int type; 39 | int numParams; 40 | int paramList[MAX_PARAM];//static limit on number of hints - 15 41 | }perflock_param_t; 42 | 43 | static perflock_param_t powerhint[MAX_HINT]; 44 | 45 | int parsePowerhintXML(); 46 | int *getPowerhint(int, int*); 47 | 48 | #endif /* __POWERHINTPARSER__ */ 49 | -------------------------------------------------------------------------------- /lineagehw/src/org/lineageos/hardware/HighTouchSensitivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The CyanogenMod 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.hardware; 18 | 19 | import org.lineageos.internal.util.FileUtils; 20 | 21 | /** 22 | * Glove mode / high touch sensitivity 23 | */ 24 | public class HighTouchSensitivity { 25 | private static final String CONTROL_PATH = "/sys/board_properties/tpd_glove_status"; 26 | 27 | /** 28 | * Whether device supports high touch sensitivity. 29 | * 30 | * @return boolean Supported devices must return always true 31 | */ 32 | public static boolean isSupported() { 33 | return FileUtils.isFileReadable(CONTROL_PATH) && 34 | FileUtils.isFileWritable(CONTROL_PATH); 35 | } 36 | 37 | /** This method returns the current activation status of high touch sensitivity 38 | * 39 | * @return boolean Must be false if high touch sensitivity is not supported or not activated, 40 | * or the operation failed while reading the status; true in any other case. 41 | */ 42 | public static boolean isEnabled() { 43 | return FileUtils.readOneLine(CONTROL_PATH).equals("1"); 44 | } 45 | 46 | /** 47 | * This method allows to setup high touch sensitivity status. 48 | * 49 | * @param state The new high touch sensitivity status 50 | * @return boolean Must be false if high touch sensitivity is not supported or the operation 51 | * failed; true in any other case. 52 | */ 53 | public static boolean setEnabled(boolean state) { 54 | return FileUtils.writeLine(CONTROL_PATH, (state ? "1" : "0")); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /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 | LocDualContext.h \ 19 | LBSProxyBase.h \ 20 | UlpProxyBase.h \ 21 | loc_core_log.h \ 22 | LocAdapterProxyBase.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 | LocDualContext.cpp \ 38 | loc_core_log.cpp \ 39 | data-items/DataItemsFactoryProxy.cpp \ 40 | SystemStatusOsObserver.cpp \ 41 | SystemStatus.cpp 42 | 43 | library_includedir = $(pkgincludedir) 44 | 45 | library_include_HEADERS = $(libloc_core_la_h_sources) 46 | 47 | libloc_core_la_SOURCES = $(libloc_core_la_c_sources) 48 | 49 | if USE_GLIB 50 | libloc_core_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 51 | libloc_core_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 52 | libloc_core_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 53 | else 54 | libloc_core_la_CFLAGS = $(AM_CFLAGS) 55 | libloc_core_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 56 | libloc_core_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 57 | endif 58 | 59 | libloc_core_la_LIBADD = -ldl $(GPSUTILS_LIBS) 60 | 61 | #Create and Install libraries 62 | lib_LTLIBRARIES = libloc_core.la 63 | 64 | pkgconfigdir = $(libdir)/pkgconfig 65 | pkgconfig_DATA = loc-core.pc 66 | EXTRA_DIST = $(pkgconfig_DATA) 67 | -------------------------------------------------------------------------------- /gps/gnsspps/configure.ac: -------------------------------------------------------------------------------- 1 | # configure.ac -- Autoconf script for gps lbs-core 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 lbs-core package version 1.0.0 8 | AC_INIT([gnsspps],1.0.0) 9 | # Does not strictly follow GNU Coding standards 10 | AM_INIT_AUTOMAKE([foreign]) 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 | AC_ARG_WITH([locpla_includes], 37 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 38 | [Specify the path to locpla-includes in loc-pla_git.bb]), 39 | [locpla_incdir=$withval], 40 | with_locpla_includes=no) 41 | 42 | if test "x${with_locpla_includes}" != "xno"; then 43 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 44 | fi 45 | 46 | AC_ARG_WITH([glib], 47 | AC_HELP_STRING([--with-glib], 48 | [enable glib, building HLOS systems which use glib])) 49 | 50 | if (test "x${with_glib}" = "xyes"); then 51 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 52 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 53 | AC_MSG_ERROR(GThread >= 2.16 is required)) 54 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 55 | AC_MSG_ERROR(GLib >= 2.16 is required)) 56 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 57 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 58 | 59 | AC_SUBST(GLIB_CFLAGS) 60 | AC_SUBST(GLIB_LIBS) 61 | fi 62 | 63 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 64 | 65 | AC_CONFIG_FILES([ \ 66 | Makefile \ 67 | gnsspps.pc 68 | ]) 69 | 70 | AC_OUTPUT 71 | -------------------------------------------------------------------------------- /camera/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 | $(call add-clean-step, find $(OUT_DIR) -name "camera.msm8953*" -print0 | xargs -0 rm -rf) 48 | -------------------------------------------------------------------------------- /camera/QCamera2/stack/mm-jpeg-interface/inc/mm_jpeg_dbg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2016, 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 __MM_JPEG_DBG_H__ 31 | #define __MM_JPEG_DBG_H__ 32 | 33 | #ifdef QCAMERA_REDEFINE_LOG 34 | #define CAM_MODULE CAM_JPEG_MODULE 35 | #include "mm_camera_dbg.h" 36 | #endif 37 | 38 | extern volatile uint32_t gKpiDebugLevel; 39 | 40 | #ifndef KPI_DEBUG 41 | #define KPI_DEBUG 42 | #define ATRACE_TAG ATRACE_TAG_CAMERA 43 | #include 44 | 45 | #define KPI_APT 1 46 | #define KPI_DBG 2 47 | 48 | #define KPI_ATRACE_INT(name,val) ({\ 49 | if (gKpiDebugLevel >= KPI_APT) { \ 50 | atrace_int(ATRACE_TAG, name, val); \ 51 | }\ 52 | }) 53 | 54 | #endif 55 | #endif /* __MM_JPEG_DBG_H__ */ 56 | -------------------------------------------------------------------------------- /audio/audio_output_policy.conf: -------------------------------------------------------------------------------- 1 | # List of profiles for the output device session where stream is routed. 2 | # A stream opened with the inputs attributes which match the "flags" and 3 | # "formats" as specified in the profile is routed to a device at 4 | # sample rate specified under "sampling_rates" and bit width under 5 | # "bit_width" and the topology extracted from the acdb data against 6 | # the "app_type". 7 | # 8 | # the flags and formats are specified using the strings corresponding to 9 | # enums in audio.h and audio_policy.h. They are concatenated with "|" 10 | # without space or "\n". 11 | # the flags and formats should match the ones in "audio_policy.conf" 12 | 13 | outputs { 14 | default { 15 | flags AUDIO_OUTPUT_FLAG_PRIMARY 16 | formats AUDIO_FORMAT_PCM_16_BIT 17 | sampling_rates 48000 18 | bit_width 16 19 | app_type 69937 20 | } 21 | deep_buffer { 22 | flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER 23 | formats AUDIO_FORMAT_PCM_16_BIT 24 | sampling_rates 48000 25 | bit_width 16 26 | app_type 69936 27 | } 28 | direct_pcm_16 { 29 | flags AUDIO_OUTPUT_FLAG_DIRECT 30 | formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT 31 | sampling_rates 44100|48000|96000|192000 32 | bit_width 16 33 | app_type 69936 34 | } 35 | direct_pcm_24 { 36 | flags AUDIO_OUTPUT_FLAG_DIRECT 37 | formats AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT 38 | sampling_rates 44100|48000|96000|192000 39 | bit_width 24 40 | app_type 69940 41 | } 42 | compress_offload_16 { 43 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING 44 | formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AC3|AUDIO_FORMAT_E_AC3|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_AAC_ADTS_LC|AUDIO_FORMAT_AAC_ADTS_HE_V1|AUDIO_FORMAT_AAC_ADTS_HE_V2 45 | sampling_rates 44100|48000|96000|192000 46 | bit_width 16 47 | app_type 69936 48 | } 49 | compress_offload_24 { 50 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING 51 | formats AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_VORBIS 52 | sampling_rates 44100|48000|96000|192000 53 | bit_width 24 54 | app_type 69940 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /health/HealthService.cpp: -------------------------------------------------------------------------------- 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 | #define LOG_TAG "android.hardware.health@2.0-service.kuntao" 17 | #include 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #include 25 | #include 26 | 27 | #include 28 | #include 29 | 30 | using android::hardware::health::V2_0::DiskStats; 31 | using android::hardware::health::V2_0::StorageInfo; 32 | 33 | void healthd_board_init(struct healthd_config*) { 34 | } 35 | 36 | int healthd_board_battery_update(struct android::BatteryProperties*) { 37 | // return 0 to log periodic polled battery status to kernel log 38 | return 1; 39 | } 40 | 41 | const char kDiskStatsFile[] = "/sys/block/mmcblk0/stat"; 42 | const char kMMCName[] = "MMC0"; 43 | 44 | void get_storage_info(std::vector&) { 45 | // Use defaults. 46 | } 47 | 48 | void get_disk_stats(std::vector& vec_stats) { 49 | const size_t kDiskStatsSize = 11; 50 | struct DiskStats stats = {}; 51 | 52 | stats.attr.isInternal = true; 53 | stats.attr.isBootDevice = true; 54 | stats.attr.name = std::string(kMMCName); 55 | 56 | 57 | std::string buffer; 58 | if (!android::base::ReadFileToString(std::string(kDiskStatsFile), &buffer)) { 59 | LOG(ERROR) << kDiskStatsFile << ": ReadFileToString failed."; 60 | return; 61 | } 62 | 63 | // Regular diskstats entries 64 | std::stringstream ss(buffer); 65 | for (uint i = 0; i < kDiskStatsSize; ++i) { 66 | ss >> *(reinterpret_cast(&stats) + i); 67 | } 68 | vec_stats.resize(1); 69 | vec_stats[0] = stats; 70 | 71 | return; 72 | } 73 | 74 | int main() { 75 | return health_service_main(); 76 | } 77 | -------------------------------------------------------------------------------- /gps/android/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := android.hardware.gnss@1.0-impl-qti 5 | LOCAL_VENDOR_MODULE := true 6 | LOCAL_MODULE_RELATIVE_PATH := hw 7 | LOCAL_SRC_FILES := \ 8 | AGnss.cpp \ 9 | Gnss.cpp \ 10 | GnssBatching.cpp \ 11 | GnssGeofencing.cpp \ 12 | GnssMeasurement.cpp \ 13 | GnssNi.cpp \ 14 | GnssConfiguration.cpp \ 15 | GnssDebug.cpp \ 16 | AGnssRil.cpp 17 | 18 | LOCAL_SRC_FILES += \ 19 | location_api/LocationUtil.cpp \ 20 | location_api/GnssAPIClient.cpp \ 21 | location_api/GeofenceAPIClient.cpp \ 22 | location_api/BatchingAPIClient.cpp \ 23 | location_api/MeasurementAPIClient.cpp \ 24 | 25 | LOCAL_C_INCLUDES:= \ 26 | $(LOCAL_PATH)/location_api 27 | LOCAL_HEADER_LIBRARIES := \ 28 | libgps.utils_headers \ 29 | libloc_core_headers \ 30 | libloc_pla_headers \ 31 | liblocation_api_headers 32 | 33 | LOCAL_SHARED_LIBRARIES := \ 34 | liblog \ 35 | libhidlbase \ 36 | libhidltransport \ 37 | libhwbinder \ 38 | libcutils \ 39 | libutils \ 40 | android.hardware.gnss@1.0 \ 41 | 42 | LOCAL_SHARED_LIBRARIES += \ 43 | libloc_core \ 44 | libgps.utils \ 45 | libdl \ 46 | liblocation_api \ 47 | 48 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 49 | include $(BUILD_SHARED_LIBRARY) 50 | 51 | BUILD_GNSS_HIDL_SERVICE := true 52 | ifneq ($(BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET), true) 53 | ifneq ($(LW_FEATURE_SET),true) 54 | BUILD_GNSS_HIDL_SERVICE := false 55 | endif # LW_FEATURE_SET 56 | endif # BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET 57 | 58 | ifeq ($(BUILD_GNSS_HIDL_SERVICE), true) 59 | include $(CLEAR_VARS) 60 | LOCAL_MODULE := android.hardware.gnss@1.0-service-qti 61 | LOCAL_VENDOR_MODULE := true 62 | LOCAL_MODULE_RELATIVE_PATH := hw 63 | LOCAL_INIT_RC := android.hardware.gnss@1.0-service-qti.rc 64 | LOCAL_SRC_FILES := \ 65 | service.cpp \ 66 | 67 | LOCAL_C_INCLUDES:= \ 68 | $(LOCAL_PATH)/location_api 69 | LOCAL_HEADER_LIBRARIES := \ 70 | libgps.utils_headers \ 71 | libloc_core_headers \ 72 | libloc_pla_headers \ 73 | liblocation_api_headers 74 | 75 | 76 | LOCAL_SHARED_LIBRARIES := \ 77 | liblog \ 78 | libcutils \ 79 | libdl \ 80 | libbase \ 81 | libutils \ 82 | 83 | LOCAL_SHARED_LIBRARIES += \ 84 | libhwbinder \ 85 | libhidlbase \ 86 | libhidltransport \ 87 | android.hardware.gnss@1.0 \ 88 | 89 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 90 | include $(BUILD_EXECUTABLE) 91 | endif # BUILD_GNSS_HIDL_SERVICE 92 | -------------------------------------------------------------------------------- /power/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012-2013,2015-2017, 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 | #include 31 | 32 | int sysfs_read(char *path, char *s, int num_bytes); 33 | int sysfs_write(char *path, char *s); 34 | int get_scaling_governor(char governor[], int size); 35 | int get_scaling_governor_check_cores(char governor[], int size,int core_num); 36 | int is_interactive_governor(char*); 37 | 38 | void vote_ondemand_io_busy_off(); 39 | void unvote_ondemand_io_busy_off(); 40 | void vote_ondemand_sdf_low(); 41 | void unvote_ondemand_sdf_low(); 42 | void perform_hint_action(int hint_id, int resource_values[], 43 | int num_resources); 44 | void undo_hint_action(int hint_id); 45 | void release_request(int lock_handle); 46 | int interaction_with_handle(int lock_handle, int duration, int num_args, int opt_list[]); 47 | int perf_hint_enable(int hint_id, int duration); 48 | -------------------------------------------------------------------------------- /power/metadata-defs.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012, 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 | #define ATTRIBUTE_VALUE_DELIM ('=') 31 | #define ATTRIBUTE_STRING_DELIM (";") 32 | 33 | #define METADATA_PARSING_ERR (-1) 34 | #define METADATA_PARSING_CONTINUE (0) 35 | #define METADATA_PARSING_DONE (1) 36 | 37 | #define MIN(x,y) (((x)>(y))?(y):(x)) 38 | 39 | struct video_encode_metadata_t { 40 | int hint_id; 41 | int state; 42 | }; 43 | 44 | struct video_decode_metadata_t { 45 | int hint_id; 46 | int state; 47 | }; 48 | 49 | int parse_metadata(char *metadata, char **metadata_saveptr, 50 | char *attribute, int attribute_size, char *value, int value_size); 51 | int parse_video_encode_metadata(char *metadata, 52 | struct video_encode_metadata_t *video_encode_metadata); 53 | int parse_video_decode_metadata(char *metadata, 54 | struct video_decode_metadata_t *video_decode_metadata); 55 | -------------------------------------------------------------------------------- /perf/targetconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 27 | 28 | 38 | 39 | 42 | 43 | 44 | 45 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /gps/android/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 lppProfile) 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 | -------------------------------------------------------------------------------- /camera/QCamera2/util/QCameraCommon.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2016, 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 __QCAMERA_COMMON_H__ 31 | #define __QCAMERA_COMMON_H__ 32 | 33 | #include 34 | 35 | // Camera dependencies 36 | #include "cam_types.h" 37 | #include "cam_intf.h" 38 | 39 | namespace qcamera { 40 | 41 | #define ALIGN(a, b) (((a) + (b)) & ~(b)) 42 | #define MAX(a, b) ((a) > (b) ? (a) : (b)) 43 | 44 | class QCameraCommon { 45 | public: 46 | QCameraCommon(); 47 | ~QCameraCommon(); 48 | 49 | int32_t init(cam_capability_t *cap); 50 | 51 | int32_t getAnalysisInfo( 52 | bool fdVideoEnabled, bool hal3, cam_feature_mask_t featureMask, 53 | cam_analysis_info_t *pAnalysisInfo); 54 | static uint32_t calculateLCM(int32_t num1, int32_t num2); 55 | static nsecs_t getBootToMonoTimeOffset(); 56 | 57 | private: 58 | cam_capability_t *m_pCapability; 59 | 60 | }; 61 | 62 | }; // namespace qcamera 63 | #endif /* __QCAMERA_COMMON_H__ */ 64 | 65 | -------------------------------------------------------------------------------- /gps/android/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/pla/android/loc_pla.h: -------------------------------------------------------------------------------- 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 | 29 | #ifndef __LOC_PLA__ 30 | #define __LOC_PLA__ 31 | 32 | #ifdef __cplusplus 33 | #include 34 | #define uptimeMillis android::uptimeMillis 35 | #endif 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | #include 42 | #include 43 | #include 44 | 45 | #define LOC_PATH_GPS_CONF_STR "/vendor/etc/gps.conf" 46 | #define LOC_PATH_IZAT_CONF_STR "/vendor/etc/izat.conf" 47 | #define LOC_PATH_FLP_CONF_STR "/vendor/etc/flp.conf" 48 | #define LOC_PATH_LOWI_CONF_STR "/vendor/etc/lowi.conf" 49 | #define LOC_PATH_SAP_CONF_STR "/vendor/etc/sap.conf" 50 | #define LOC_PATH_APDR_CONF_STR "/vendor/etc/apdr.conf" 51 | #define LOC_PATH_XTWIFI_CONF_STR "/vendor/etc/xtwifi.conf" 52 | #define LOC_PATH_QUIPC_CONF_STR "/vendor/etc/quipc.conf" 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif /*__cplusplus */ 57 | 58 | #endif /* __LOC_PLA__ */ 59 | -------------------------------------------------------------------------------- /gps/utils/configure.ac: -------------------------------------------------------------------------------- 1 | # configure.ac -- Autoconf script for gps gps-utils 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 gps-utils package version 1.0.0 8 | AC_INIT([gps-utils],1.0.0) 9 | # Does not strictly follow GNU Coding standards 10 | AM_INIT_AUTOMAKE([foreign]) 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([CUTILS], [libcutils]) 33 | AC_SUBST([CUTILS_CFLAGS]) 34 | AC_SUBST([CUTILS_LIBS]) 35 | 36 | AC_ARG_WITH([core_includes], 37 | AC_HELP_STRING([--with-core-includes=@<:@dir@:>@], 38 | [Specify the location of the core headers]), 39 | [core_incdir=$withval], 40 | with_core_includes=no) 41 | 42 | if test "x$with_core_includes" != "xno"; then 43 | CPPFLAGS="${CPPFLAGS} -I${core_incdir}" 44 | fi 45 | 46 | AC_ARG_WITH([locpla_includes], 47 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 48 | [specify the path to locpla-includes in loc-pla_git.bb]), 49 | [locpla_incdir=$withval], 50 | with_locpla_includes=no) 51 | 52 | if test "x$with_locpla_includes" != "xno"; then 53 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 54 | fi 55 | 56 | AC_SUBST([CPPFLAGS]) 57 | 58 | AC_ARG_WITH([glib], 59 | AC_HELP_STRING([--with-glib], 60 | [enable glib, building HLOS systems which use glib])) 61 | 62 | if (test "x${with_glib}" = "xyes"); then 63 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 64 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 65 | AC_MSG_ERROR(GThread >= 2.16 is required)) 66 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 67 | AC_MSG_ERROR(GLib >= 2.16 is required)) 68 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 69 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 70 | 71 | AC_SUBST(GLIB_CFLAGS) 72 | AC_SUBST(GLIB_LIBS) 73 | fi 74 | 75 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 76 | 77 | AC_CONFIG_FILES([ \ 78 | Makefile \ 79 | gps-utils.pc 80 | ]) 81 | 82 | AC_OUTPUT 83 | -------------------------------------------------------------------------------- /gps/core/configure.ac: -------------------------------------------------------------------------------- 1 | # configure.ac -- Autoconf script for gps loc-core 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 loc-hal package version 1.0.0 8 | AC_INIT([loc-core],1.0.0) 9 | # Does not strictly follow GNU Coding standards 10 | AM_INIT_AUTOMAKE([foreign]) 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([loc-core.pc.in]) 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 | AC_ARG_WITH([core_includes], 37 | AC_HELP_STRING([--with-core-includes=@<:@dir@:>@], 38 | [Specify the location of the core headers]), 39 | [core_incdir=$withval], 40 | with_core_includes=no) 41 | 42 | if test "x$with_core_includes" != "xno"; then 43 | CPPFLAGS="${CPPFLAGS} -I${core_incdir}" 44 | fi 45 | 46 | AC_ARG_WITH([locpla_includes], 47 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 48 | [specify the path to locpla-includes in loc-pla_git.bb]), 49 | [locpla_incdir=$withval], 50 | with_locpla_includes=no) 51 | 52 | if test "x$with_locpla_includes" != "xno"; then 53 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 54 | fi 55 | 56 | AC_SUBST([CPPFLAGS]) 57 | 58 | AC_ARG_WITH([glib], 59 | AC_HELP_STRING([--with-glib], 60 | [enable glib, building HLOS systems which use glib])) 61 | 62 | if (test "x${with_glib}" = "xyes"); then 63 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 64 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 65 | AC_MSG_ERROR(GThread >= 2.16 is required)) 66 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 67 | AC_MSG_ERROR(GLib >= 2.16 is required)) 68 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 69 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 70 | 71 | AC_SUBST(GLIB_CFLAGS) 72 | AC_SUBST(GLIB_LIBS) 73 | fi 74 | 75 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 76 | 77 | AC_CONFIG_FILES([ \ 78 | Makefile \ 79 | loc-core.pc \ 80 | ]) 81 | 82 | AC_OUTPUT 83 | -------------------------------------------------------------------------------- /gps/etc/sap.conf: -------------------------------------------------------------------------------- 1 | ################################ 2 | # Sensor Settings 3 | ################################ 4 | #The following parameters are optional. 5 | #Internal defaults support MEMS sensors 6 | #native to most handset devices. 7 | #Device specific sensor characterization 8 | #for improved performance is possible as 9 | #described in SAP application notes. 10 | #GYRO_BIAS_RANDOM_WALK= 11 | #ACCEL_RANDOM_WALK_SPECTRAL_DENSITY= 12 | #ANGLE_RANDOM_WALK_SPECTRAL_DENSITY= 13 | #RATE_RANDOM_WALK_SPECTRAL_DENSITY= 14 | #VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY= 15 | 16 | # Sensor Sampling Rate Parameters for Low-Data Rate Filter (should be greater than 0) 17 | # used in loc_eng_reinit 18 | SENSOR_ACCEL_BATCHES_PER_SEC=2 19 | SENSOR_ACCEL_SAMPLES_PER_BATCH=5 20 | SENSOR_GYRO_BATCHES_PER_SEC=2 21 | SENSOR_GYRO_SAMPLES_PER_BATCH=5 22 | # Sensor Sampling Rate Parameters for High-Data Rate Filter (should be greater than 0) 23 | SENSOR_ACCEL_BATCHES_PER_SEC_HIGH=4 24 | SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH=25 25 | SENSOR_GYRO_BATCHES_PER_SEC_HIGH=4 26 | SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH=25 27 | 28 | # Sensor Control Mode (0=AUTO, 1=FORCE_ON) 29 | # used in loc_eng_reinit 30 | SENSOR_CONTROL_MODE=0 31 | 32 | # Enable or Disable Sensors for GPS use (0=Enable, 1=Disable) 33 | # used in loc_eng_reinit 34 | SENSOR_USAGE=0 35 | 36 | # Choose GSIFF sensor provider (1=Snapdragon Sensors Core, 2=Android NDK) 37 | SENSOR_PROVIDER=1 38 | 39 | # Bit mask used to define which sensor algorithms are used. 40 | # Setting each bit has the following definition: 41 | # 0x1 - DISABLE_INS_POSITIONING_FILTER 42 | # 0x0 - ENABLE_INS_POSITIONING_FILTER 43 | SENSOR_ALGORITHM_CONFIG_MASK=0x1 44 | 45 | #Vehicle Network Provider configuration 46 | 47 | #Service configuration strings 48 | #The number before colon in VN_X items defines version of the format of the rest of the string 49 | #VN_ACCEL_CFG=0:5 50 | #VN_GYRO_CFG=0:5.5 51 | #VN_ODOMETRY_CFG=0:2,4.5 52 | VN_ACCEL_CFG=1:128,0,12,0.0048828125,12,12,0.0048828125,24,12,0.0048828125 53 | VN_GYRO_CFG=1:129,0,16,0.00006103515625,16,16,0.00006103515625,32,16,0.00006103515625 54 | VN_ODOMETRY_CFG=1:130,0,1,5,6,32 55 | VN_SPEED_CFG=1:131,5,8,1,2,3,1,1,9,2,14,2 56 | VN_DWS_CFG=1:132,5,8,1,2,3,1,1,5,2,7,2,9,2,11,2,13,2,15,2,17,2,19,2 57 | VN_GEAR_CFG=1:422,20,4,0,4,1,9,0,1,2,3,4,5,6,7,8 58 | 59 | #Procesors clock ratio: AP and CAN bus microcontroller 60 | VN_PROC_CLOCK_RATIO=1.93165618815148 61 | 62 | # Time source used by Sensor HAL 63 | # Setting this value controls accuracy of location sensor services. 64 | # 0 - Unknown 65 | # 1 - CLOCK_BOOTTIME 66 | # 2 - CLOCK_MONOTONIC 67 | # 3 - CLOCK_REALTIME 68 | # 4 - CLOCK_BOOTTIME using Alarm timer interface 69 | NDK_PROVIDER_TIME_SOURCE=1 70 | 71 | -------------------------------------------------------------------------------- /perf/whitelistedapps.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 33 | 34 | 37 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | 52 | 53 | 54 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /gps/android/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/utils/loc_nmea.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2013, 2015-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 LOC_ENG_NMEA_H 31 | #define LOC_ENG_NMEA_H 32 | 33 | #include 34 | #include 35 | #include 36 | #define NMEA_SENTENCE_MAX_LENGTH 200 37 | 38 | void loc_nmea_generate_sv(const GnssSvNotification &svNotify, 39 | std::vector &nmeaArraystr); 40 | 41 | void loc_nmea_generate_pos(const UlpLocation &location, 42 | const GpsLocationExtended &locationExtended, 43 | unsigned char generate_nmea, 44 | std::vector &nmeaArraystr); 45 | 46 | #define DEBUG_NMEA_MINSIZE 6 47 | #define DEBUG_NMEA_MAXSIZE 4096 48 | inline bool loc_nmea_is_debug(const char* nmea, int length) { 49 | return ((nullptr != nmea) && 50 | (length >= DEBUG_NMEA_MINSIZE) && (length <= DEBUG_NMEA_MAXSIZE) && 51 | (nmea[0] == '$') && (nmea[1] == 'P') && (nmea[2] == 'Q') && (nmea[3] == 'W')); 52 | } 53 | 54 | #endif // LOC_ENG_NMEA_H 55 | -------------------------------------------------------------------------------- /gps/location/configure.ac: -------------------------------------------------------------------------------- 1 | # configure.ac -- Autoconf script for gps location-api-iface 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-api-iface package version 1.0.0 8 | AC_INIT([location-api-iface],1.0.0) 9 | # Does not strictly follow GNU Coding standards 10 | AM_INIT_AUTOMAKE([foreign]) 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([location-api.pc.in]) 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 | AC_ARG_WITH([core_includes], 37 | AC_HELP_STRING([--with-core-includes=@<:@dir@:>@], 38 | [Specify the location of the core headers]), 39 | [core_incdir=$withval], 40 | with_core_includes=no) 41 | 42 | if test "x$with_core_includes" != "xno"; then 43 | CPPFLAGS="${CPPFLAGS} -I${core_incdir}" 44 | fi 45 | 46 | AC_ARG_WITH([locpla_includes], 47 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 48 | [Specify the path to locpla-includes in loc-pla_git.bb]), 49 | [locpla_incdir=$withval], 50 | with_locpla_includes=no) 51 | 52 | if test "x${with_locpla_includes}" != "xno"; then 53 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 54 | fi 55 | 56 | AC_SUBST([CPPFLAGS]) 57 | 58 | AC_ARG_WITH([glib], 59 | AC_HELP_STRING([--with-glib], 60 | [enable glib, building HLOS systems which use glib])) 61 | 62 | if (test "x${with_glib}" = "xyes"); then 63 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 64 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 65 | AC_MSG_ERROR(GThread >= 2.16 is required)) 66 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 67 | AC_MSG_ERROR(GLib >= 2.16 is required)) 68 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 69 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 70 | 71 | AC_SUBST(GLIB_CFLAGS) 72 | AC_SUBST(GLIB_LIBS) 73 | fi 74 | 75 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 76 | 77 | AC_CONFIG_FILES([ \ 78 | Makefile \ 79 | location-api.pc \ 80 | ]) 81 | 82 | AC_OUTPUT 83 | -------------------------------------------------------------------------------- /gps/android/location_api/LocationUtil.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2017-2018, 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 LOCATION_UTIL_H 31 | #define LOCATION_UTIL_H 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | namespace android { 38 | namespace hardware { 39 | namespace gnss { 40 | namespace V1_0 { 41 | namespace implementation { 42 | 43 | void convertGnssLocation(Location& in, V1_0::GnssLocation& out); 44 | void convertGnssLocation(const V1_0::GnssLocation& in, Location& out); 45 | void convertGnssConstellationType(GnssSvType& in, V1_0::GnssConstellationType& out); 46 | void convertGnssEphemerisType(GnssEphemerisType& in, GnssDebug::SatelliteEphemerisType& out); 47 | void convertGnssEphemerisSource(GnssEphemerisSource& in, GnssDebug::SatelliteEphemerisSource& out); 48 | void convertGnssEphemerisHealth(GnssEphemerisHealth& in, GnssDebug::SatelliteEphemerisHealth& out); 49 | 50 | } // namespace implementation 51 | } // namespace V1_0 52 | } // namespace gnss 53 | } // namespace hardware 54 | } // namespace android 55 | #endif // LOCATION_UTIL_H 56 | -------------------------------------------------------------------------------- /gps/core/loc_core_log.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2013, 2016-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 LOC_CORE_LOG_H 31 | #define LOC_CORE_LOG_H 32 | 33 | #include 34 | #include 35 | 36 | #ifdef __cplusplus 37 | extern "C" 38 | { 39 | #endif 40 | 41 | const char* loc_get_gps_status_name(LocGpsStatusValue gps_status); 42 | const char* loc_get_position_mode_name(LocGpsPositionMode mode); 43 | const char* loc_get_position_recurrence_name(LocGpsPositionRecurrence recur); 44 | const char* loc_get_aiding_data_mask_names(LocGpsAidingData data); 45 | const char* loc_get_agps_type_name(LocAGpsType type); 46 | const char* loc_get_ni_type_name(LocGpsNiType type); 47 | const char* loc_get_ni_response_name(LocGpsUserResponseType response); 48 | const char* loc_get_ni_encoding_name(LocGpsNiEncodingType encoding); 49 | const char* loc_get_agps_bear_name(AGpsBearerType bear); 50 | const char* loc_get_server_type_name(LocServerType type); 51 | const char* loc_get_position_sess_status_name(enum loc_sess_status status); 52 | const char* loc_get_agps_status_name(LocAGpsStatusValue status); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif /* LOC_CORE_LOG_H */ 59 | -------------------------------------------------------------------------------- /gps/pla/oe/loc_pla.h: -------------------------------------------------------------------------------- 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 | 29 | #ifndef __LOC_PLA__ 30 | #define __LOC_PLA__ 31 | 32 | #ifdef __cplusplus 33 | #include 34 | #define uptimeMillis android::uptimeMillis 35 | 36 | extern "C" { 37 | #endif 38 | 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #ifndef OFF_TARGET 46 | #include 47 | #define strlcat g_strlcat 48 | #define strlcpy g_strlcpy 49 | #else 50 | #define strlcat strncat 51 | #define strlcpy strncpy 52 | #endif 53 | 54 | #define LOC_PATH_GPS_CONF_STR "/etc/gps.conf" 55 | #define LOC_PATH_IZAT_CONF_STR "/etc/izat.conf" 56 | #define LOC_PATH_FLP_CONF_STR "/etc/flp.conf" 57 | #define LOC_PATH_LOWI_CONF_STR "/etc/lowi.conf" 58 | #define LOC_PATH_SAP_CONF_STR "/etc/sap.conf" 59 | #define LOC_PATH_APDR_CONF_STR "/etc/apdr.conf" 60 | #define LOC_PATH_XTWIFI_CONF_STR "/etc/xtwifi.conf" 61 | #define LOC_PATH_QUIPC_CONF_STR "/etc/quipc.conf" 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif /*__cplusplus */ 66 | 67 | #endif /* __LOC_PLA__ */ 68 | --------------------------------------------------------------------------------