├── Android.bp ├── configs ├── sensors │ └── hals.conf ├── perf │ └── perf-profile0.conf ├── msm_irqbalance.conf ├── seccomp │ └── mediacodec-seccomp.policy ├── public.libraries.txt ├── component-overrides.xml ├── media │ └── media_codecs_vendor_audio.xml ├── privapp-permissions-qti.xml └── keylayout │ └── gpio-keys.kl ├── sepolicy ├── private │ └── system_app.te └── vendor │ ├── ueventd.te │ ├── zygote.te │ ├── bootanim.te │ ├── hal_bluetooth_qti.te │ ├── hal_wifi_default.te │ ├── hal_nfc_default.te │ ├── thermal-engine.te │ ├── hwservice.te │ ├── hal_sensors_default.te │ ├── hal_power_default.te │ ├── vndservice.te │ ├── device.te │ ├── hal_vibrator_default.te │ ├── init.te │ ├── system_app.te │ ├── radio.te │ ├── file.te │ ├── property.te │ ├── vendor_init.te │ ├── hal_audio_default.te │ ├── vndservice_contexts │ ├── genfs_contexts │ ├── app.te │ ├── hal_camera_default.te │ ├── nvram_btwifi.te │ ├── tee.te │ ├── init_btmac.te │ ├── system_server.te │ ├── hwservice_contexts │ ├── property_contexts │ ├── hal_fingerprint_default.te │ └── file_contexts ├── odm.prop ├── wifi ├── p2p_supplicant_overlay.conf └── wpa_supplicant_overlay.conf ├── gps ├── etc │ ├── gps.conf │ ├── lowi.conf │ ├── Android.mk │ └── flp.conf ├── android │ ├── 2.0 │ │ ├── android.hardware.gnss@2.0-service-qti.rc │ │ ├── android.hardware.gnss@2.0-service-qti.xml │ │ ├── GnssDebug.h │ │ ├── GnssNi.h │ │ ├── AGnss.h │ │ ├── GnssNi.cpp │ │ └── service.cpp │ ├── 1.0 │ │ ├── android.hardware.gnss@1.0-service-qti.rc │ │ ├── android.hardware.gnss@1.0-service-qti.xml │ │ ├── GnssDebug.h │ │ ├── GnssConfiguration.h │ │ ├── Android.mk │ │ ├── GnssNi.h │ │ ├── AGnss.h │ │ ├── location_api │ │ │ └── LocationUtil.h │ │ ├── GnssNi.cpp │ │ └── service.cpp │ ├── 1.1 │ │ ├── android.hardware.gnss@1.1-service-qti.rc │ │ ├── android.hardware.gnss@1.1-service-qti.xml │ │ ├── GnssDebug.h │ │ ├── GnssNi.h │ │ ├── Android.mk │ │ ├── AGnss.h │ │ ├── location_api │ │ │ └── LocationUtil.h │ │ ├── GnssNi.cpp │ │ └── service.cpp │ ├── Android.mk │ └── utils │ │ ├── Android.mk │ │ └── battery_listener.h ├── Android.mk ├── Makefile.am ├── gps_vendor_board.mk ├── core │ ├── loc-core.pc.in │ ├── Android.mk │ ├── Makefile.am │ ├── data-items │ │ └── DataItemsFactoryProxy.h │ ├── configure.ac │ └── loc_core_log.h ├── utils │ ├── gps-utils.pc.in │ ├── Android.mk │ ├── Makefile.am │ └── loc_log.h ├── location │ ├── location-api.pc.in │ ├── Android.mk │ ├── Makefile.am │ └── configure.ac ├── batching │ ├── location-batching.pc.in │ ├── Android.mk │ ├── Makefile.am │ └── configure.ac ├── geofence │ ├── location-geofence.pc.in │ ├── Android.mk │ ├── Makefile.am │ └── configure.ac ├── loc-hal.pc.in ├── gps_vendor_product.mk ├── pla │ ├── Android.mk │ └── android │ │ └── loc_pla.h ├── gnss │ ├── Makefile.am │ └── Android.mk ├── CleanSpec.mk ├── build │ └── target_specific_features.mk └── configure.ac ├── superior.dependencies ├── README.md ├── rro_overlays ├── WifiOverlay │ ├── Android.bp │ └── AndroidManifest.xml └── TetheringOverlay │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ └── values │ └── config.xml ├── product.prop ├── doze ├── proguard.flags ├── Android.mk ├── res │ ├── layout │ │ └── doze.xml │ └── xml │ │ └── doze_settings.xml ├── src │ └── org │ │ └── lineageos │ │ └── settings │ │ └── doze │ │ ├── DozeSettingsActivity.java │ │ └── BootCompletedReceiver.java └── AndroidManifest.xml ├── light ├── .clang-format ├── android.hardware.light@2.0-service.asus_sdm660.xml ├── android.hardware.light@2.0-service.asus_sdm660.rc ├── Android.bp └── Light.h ├── manifest_nfc.xml ├── recovery └── Android.mk ├── overlay-sup └── packages │ └── apps │ ├── Dialer │ └── java │ │ └── com │ │ └── android │ │ └── dialer │ │ └── callrecord │ │ └── res │ │ └── values │ │ └── config.xml │ ├── Settings │ └── res │ │ └── values │ │ └── custom_config.xml │ └── Snap │ └── res │ └── values │ └── config.xml ├── init └── Android.bp ├── audio └── audio_tuning_mixer.txt ├── overlay ├── packages │ ├── apps │ │ ├── CellBroadcastReceiver │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── config.xml │ │ └── Settings │ │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ └── services │ │ └── Telephony │ │ └── res │ │ └── values │ │ └── config.xml └── frameworks │ └── base │ ├── core │ └── res │ │ └── res │ │ ├── values-mcc310-mnc004 │ │ └── config.xml │ │ ├── values-mcc310-mnc260 │ │ └── config.xml │ │ ├── values-mcc310-mnc410 │ │ └── config.xml │ │ ├── values-mcc310-mnc120 │ │ └── config.xml │ │ ├── values-mcc460-mnc03 │ │ └── config.xml │ │ ├── values-mcc460-mnc11 │ │ └── config.xml │ │ ├── values-mcc312-mnc530 │ │ └── config.xml │ │ ├── values-mcc311-mnc480 │ │ └── config.xml │ │ └── values-mcc313-mnc100 │ │ └── config.xml │ └── packages │ └── SystemUI │ └── res │ └── values │ └── config.xml ├── setup-makefiles.sh ├── releasetools.py ├── framework_manifest.xml ├── config.fs ├── rootdir ├── etc │ ├── init.performance_level.rc │ └── fstab.qcom └── bin │ └── init.btmac.sh ├── bluetooth └── include │ └── bdroid_buildcfg.h ├── system.prop ├── extract-files.sh └── compatibility_matrix.xml /Android.bp: -------------------------------------------------------------------------------- 1 | soong_namespace { 2 | } 3 | -------------------------------------------------------------------------------- /configs/sensors/hals.conf: -------------------------------------------------------------------------------- 1 | sensors.ssc.so 2 | sensors.native.so 3 | -------------------------------------------------------------------------------- /sepolicy/private/system_app.te: -------------------------------------------------------------------------------- 1 | binder_call(system_app, storaged) 2 | -------------------------------------------------------------------------------- /odm.prop: -------------------------------------------------------------------------------- 1 | # QC framework value-adds 2 | ro.vendor.qti.va_odm.support=1 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/ueventd.te: -------------------------------------------------------------------------------- 1 | allow ueventd self:capability sys_nice; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/zygote.te: -------------------------------------------------------------------------------- 1 | get_prop(zygote, exported_camera_prop); 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/bootanim.te: -------------------------------------------------------------------------------- 1 | get_prop(bootanim, userspace_reboot_exported_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_bluetooth_qti.te: -------------------------------------------------------------------------------- 1 | set_prop(hal_bluetooth_qti, btmac_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_wifi_default.te: -------------------------------------------------------------------------------- 1 | allow hal_wifi_default proc_net:file { w_file_perms }; 2 | -------------------------------------------------------------------------------- /configs/perf/perf-profile0.conf: -------------------------------------------------------------------------------- 1 | [priority] # This profile is reserved for perflock requests 2 | 99 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_nfc_default.te: -------------------------------------------------------------------------------- 1 | allow hal_nfc_default nxpese_hwservice:hwservice_manager find; 2 | -------------------------------------------------------------------------------- /wifi/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_no_group_iface=1 3 | persistent_reconnect=1 4 | -------------------------------------------------------------------------------- /gps/etc/gps.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuperiorOS-Devices/device_asus_sdm660-common/eleven/gps/etc/gps.conf -------------------------------------------------------------------------------- /sepolicy/vendor/thermal-engine.te: -------------------------------------------------------------------------------- 1 | # Allow thermal-engine to read files in /sys 2 | r_dir_file(thermal-engine, sysfs) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice.te: -------------------------------------------------------------------------------- 1 | type focaltech_hwservice, hwservice_manager_type; 2 | type nxpese_hwservice, hwservice_manager_type; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_sensors_default.te: -------------------------------------------------------------------------------- 1 | # Allow hal_sensors_default to set nfc_sensors_prop 2 | set_prop(hal_sensors_default, nfc_sensors_prop) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_power_default.te: -------------------------------------------------------------------------------- 1 | # Allow powerhal to read/write to dt2w node 2 | allow hal_power_default proc_tpd_gesture:file rw_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/vndservice.te: -------------------------------------------------------------------------------- 1 | type focaltech_vndservice, vndservice_manager_type; 2 | type goodix_fingerprint_vndservice, vndservice_manager_type; 3 | -------------------------------------------------------------------------------- /superior.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository": "vendor_asus_sdm660-common", 4 | "target_path": "vendor/asus/sdm660-common" 5 | } 6 | ] 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/device.te: -------------------------------------------------------------------------------- 1 | # Biometrics 2 | type cdfinger_device, dev_type; 3 | type fingerprintd_device, dev_type; 4 | type focaltech_device, dev_type; 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Copyright (C) 2020 - The LineageOS Project 2 | 3 | Common device tree for SDM660 based ASUS devices 4 | ================================================ 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_vibrator_default.te: -------------------------------------------------------------------------------- 1 | allow hal_vibrator_default sysfs_leds:file { read write open getattr }; 2 | allow hal_vibrator_default sysfs:file { write open read getattr }; 3 | -------------------------------------------------------------------------------- /wifi/wpa_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_disabled=1 3 | tdls_external_control=1 4 | interworking=1 5 | hs20=1 6 | auto_interworking=0 7 | wowlan_triggers=magic_pkt 8 | -------------------------------------------------------------------------------- /configs/msm_irqbalance.conf: -------------------------------------------------------------------------------- 1 | PRIO=1,1,0,0,0,0,0,0 2 | #arch_timer, arm-pmu, arch_mem_timer, glink-smem-rpm, mpm irqs 3 | IGNORED_IRQ=19,22,39,200,203 4 | #WLAN irqs 5 | BLACKLIST_IRQ=446,455,456 6 | -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "WifiOverlay", 3 | theme: "WifiOverlay", 4 | sdk_version: "current", 5 | product_specific: true 6 | } 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/init.te: -------------------------------------------------------------------------------- 1 | dontaudit init bt_firmware_file:filesystem getattr; 2 | dontaudit init firmware_file:filesystem getattr; 3 | 4 | # Vibrator 5 | allow init sysfs_leds: file { open }; 6 | -------------------------------------------------------------------------------- /gps/android/2.0/android.hardware.gnss@2.0-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@2.0-service-qti 2 | class hal 3 | user gps 4 | group system gps radio 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/system_app.te: -------------------------------------------------------------------------------- 1 | # Battery Health 2 | r_dir_file(system_app, sysfs_battery_supply); 3 | 4 | allow system_app sysfs_zram:dir search; 5 | allow system_app sysfs_zram:file r_file_perms; 6 | -------------------------------------------------------------------------------- /product.prop: -------------------------------------------------------------------------------- 1 | # LMKD 2 | ro.lmk.low=1001 3 | ro.lmk.medium=800 4 | ro.lmk.critical=0 5 | ro.lmk.critical_upgrade=false 6 | ro.lmk.upgrade_pressure=100 7 | ro.lmk.downgrade_pressure=100 8 | ro.lmk.log_stats=true 9 | -------------------------------------------------------------------------------- /gps/android/1.0/android.hardware.gnss@1.0-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@1.0-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /gps/android/1.1/android.hardware.gnss@1.1-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@1.1-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /rro_overlays/TetheringOverlay/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "TetheringConfigOverlay", 3 | theme: "TetheringConfigOverlay", 4 | sdk_version: "current", 5 | product_specific: true 6 | } 7 | -------------------------------------------------------------------------------- /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 | include $(call all-makefiles-under,$(LOCAL_PATH)) 5 | endif 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/radio.te: -------------------------------------------------------------------------------- 1 | binder_call(radio, cnd) 2 | 3 | allow radio hal_datafactory_hwservice:hwservice_manager find; 4 | allow radio hal_iwlan_hwservice:hwservice_manager find; 5 | 6 | get_prop(radio, vendor_qcom_ims_prop) 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/file.te: -------------------------------------------------------------------------------- 1 | type cdfinger_data_file, core_data_file_type, data_file_type, file_type; 2 | type public_adsprpcd_file, file_type; 3 | type proc_tpd_gesture, fs_type, proc_type; 4 | type sysfs_call_status, sysfs_type, fs_type; 5 | -------------------------------------------------------------------------------- /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/vendor/property.te: -------------------------------------------------------------------------------- 1 | type btmac_prop, property_type; 2 | type nfc_sensors_prop, property_type; 3 | type vendor_camera_prop, property_type; 4 | type vendor_fingerprint_prop, property_type; 5 | 6 | # Dirac 7 | type dirac_prop, property_type; 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_init.te: -------------------------------------------------------------------------------- 1 | allow init adsprpcd_file:file mounton; 2 | 3 | # Allow vendor_init to set persist_camera_prop 4 | set_prop(vendor_init, vendor_persist_camera_prop) 5 | 6 | # Dirac 7 | allow vendor_init dirac_prop:property_service set; 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_audio_default.te: -------------------------------------------------------------------------------- 1 | dontaudit hal_audio_default sysfs:dir r_dir_perms; 2 | 3 | # Dirac 4 | allow hal_audio_default audio_prop:file { open read getattr }; 5 | get_prop(hal_audio_default, dirac_prop) 6 | set_prop(hal_audio_default, dirac_prop) 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/vndservice_contexts: -------------------------------------------------------------------------------- 1 | FocalFingerprintService u:object_r:focaltech_vndservice:s0 2 | android.hardware.fingerprint.IGoodixFingerprintDaemon u:object_r:goodix_fingerprint_vndservice:s0 3 | -------------------------------------------------------------------------------- /gps/gps_vendor_board.mk: -------------------------------------------------------------------------------- 1 | # Flags from BoardConfigVendor.mk 2 | ifneq ($(TARGET_USES_QMAA),true) 3 | BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default 4 | else ifneq ($(TARGET_USES_QMAA_OVERRIDE_GPS),false) 5 | BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default 6 | endif 7 | 8 | -------------------------------------------------------------------------------- /doze/proguard.flags: -------------------------------------------------------------------------------- 1 | -keepclasseswithmembers class * { 2 | public (android.content.Context, android.util.AttributeSet); 3 | } 4 | 5 | -keep class ** extends android.support.v14.preference.PreferenceFragment 6 | -keep class org.lineageos.settings.doze.* { 7 | *; 8 | } 9 | -------------------------------------------------------------------------------- /gps/core/loc-core.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: loc-core 7 | Description: QTI GPS Loc Core 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lloc_core 10 | Cflags: -I${includedir}/loc-core 11 | -------------------------------------------------------------------------------- /gps/utils/gps-utils.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: gps-utils 7 | Description: QTI GPS Location utils 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgps_utils 10 | Cflags: -I${includedir}/gps-utils 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /gps/batching/location-batching.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-batching 7 | Description: QTI GPS Batching 8 | Version: @VERSION 9 | Libs: -L${libdir} -lbatching 10 | Cflags: -I${includedir}/location-batching 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/genfs_contexts: -------------------------------------------------------------------------------- 1 | # Double tap to wake 2 | genfscon proc /tpd_gesture u:object_r:proc_tpd_gesture:s0 3 | 4 | # LED 5 | genfscon sysfs /devices/soc/800f000.qcom,spmi/spmi-0/spmi0-03/800f000.qcom,spmi:qcom,pm660l@3:qcom,leds@d000/leds u:object_r:sysfs_graphics:s0 6 | -------------------------------------------------------------------------------- /gps/geofence/location-geofence.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-geofence 7 | Description: QTI GPS Geofence 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgeofencing 10 | Cflags: -I${includedir}/location-geofence 11 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /light/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: Google 2 | AccessModifierOffset: -2 3 | AllowShortFunctionsOnASingleLine: Inline 4 | ColumnLimit: 100 5 | CommentPragmas: NOLINT:.* 6 | DerivePointerAlignment: false 7 | IndentWidth: 4 8 | PointerAlignment: Left 9 | TabWidth: 4 10 | UseTab: Never 11 | PenaltyExcessCharacter: 32 12 | -------------------------------------------------------------------------------- /sepolicy/vendor/app.te: -------------------------------------------------------------------------------- 1 | allow { appdomain -isolated_app } adsprpcd_file:dir r_dir_perms; 2 | allow { appdomain -isolated_app } public_adsprpcd_file:file r_file_perms; 3 | 4 | # Allow appdomain to get persist_camera_prop 5 | get_prop(appdomain, vendor_persist_camera_prop) 6 | 7 | get_prop(appdomain, exported_camera_prop); 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_camera_default.te: -------------------------------------------------------------------------------- 1 | allow hal_camera_default sysfs_sensors:dir r_dir_perms; 2 | allow hal_camera_default sysfs_sensors:file r_file_perms; 3 | allow hal_camera_default sysfs_sensors:lnk_file r_file_perms; 4 | 5 | set_prop(hal_camera_default, vendor_camera_prop) 6 | set_prop(hal_camera_default, vendor_video_prop) 7 | -------------------------------------------------------------------------------- /sepolicy/vendor/nvram_btwifi.te: -------------------------------------------------------------------------------- 1 | type nvram_btwifi, domain, coredomain; 2 | type nvram_btwifi_exec, system_file_type, exec_type, file_type; 3 | 4 | init_daemon_domain(nvram_btwifi) 5 | 6 | allow nvram_btwifi diag_device:chr_file rw_file_perms; 7 | 8 | # Set sys.nvram.* property 9 | set_prop(nvram_btwifi, system_prop) 10 | -------------------------------------------------------------------------------- /sepolicy/vendor/tee.te: -------------------------------------------------------------------------------- 1 | typeattribute tee data_between_core_and_vendor_violators; 2 | 3 | type_transition tee system_data_file:{ dir file } cdfinger_data_file; 4 | 5 | allow tee cdfinger_data_file:dir create_dir_perms; 6 | allow tee cdfinger_data_file:file create_file_perms; 7 | 8 | allow tee system_data_file:dir create_dir_perms; 9 | -------------------------------------------------------------------------------- /configs/seccomp/mediacodec-seccomp.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 | -------------------------------------------------------------------------------- /configs/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libqti-perfd-client.so 2 | libadsprpc.so 3 | libcdsprpc.so 4 | libsdsprpc.so 5 | libfastcvopt.so 6 | liblistenjni.so 7 | liblistensoundmodel2.so 8 | libOpenCL.so 9 | libnpu.so 10 | libhta_controller.so 11 | libhta_hexagon_runtime.so 12 | unnhal-acc-hta.so 13 | libprotobuf-cpp-full.so 14 | libprotobuf-cpp-lite.so 15 | -------------------------------------------------------------------------------- /sepolicy/vendor/init_btmac.te: -------------------------------------------------------------------------------- 1 | type init-btmac-sh, domain; 2 | type init-btmac-sh_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(init-btmac-sh) 5 | 6 | allow init-btmac-sh vendor_toolbox_exec:file rx_file_perms; 7 | 8 | # Set the persist.vendor.service.bdroid.bdaddr property 9 | set_prop(init-btmac-sh, vendor_bluetooth_prop) 10 | -------------------------------------------------------------------------------- /manifest_nfc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.hardware.nfc 4 | hwbinder 5 | 1.2 6 | 7 | INfc 8 | default 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sepolicy/vendor/system_server.te: -------------------------------------------------------------------------------- 1 | # Allow system_server to set persist_camera_prop 2 | get_prop(system_server, vendor_persist_camera_prop) 3 | 4 | # Smart charging 5 | allow system_server sysfs_battery_supply:file rw_file_perms; 6 | 7 | get_prop(system_server, exported_camera_prop); 8 | get_prop(system_server, userspace_reboot_config_prop) 9 | get_prop(system_server, userspace_reboot_exported_prop) 10 | -------------------------------------------------------------------------------- /light/android.hardware.light@2.0-service.asus_sdm660.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.hardware.light 4 | hwbinder 5 | 2.0 6 | 7 | ILight 8 | default 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice_contexts: -------------------------------------------------------------------------------- 1 | # Biometrics 2 | vendor.focaltech.fingerprint::IFocalFingerprintService u:object_r:focaltech_hwservice:s0 3 | vendor.goodix.hardware.fingerprint::IGoodixBiometricsFingerprint u:object_r:hal_fingerprint_hwservice:s0 4 | 5 | # NFC 6 | vendor.nxp.nxpese::INxpEse u:object_r:nxpese_hwservice:s0 7 | -------------------------------------------------------------------------------- /gps/android/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 3 | include $(CLEAR_VARS) 4 | DIR_LIST := $(LOCAL_PATH) 5 | include $(DIR_LIST)/utils/Android.mk 6 | ifeq ($(GNSS_HIDL_VERSION),2.0) 7 | include $(DIR_LIST)/2.0/Android.mk 8 | else 9 | ifeq ($(GNSS_HIDL_VERSION),1.1) 10 | include $(DIR_LIST)/1.1/Android.mk 11 | else 12 | include $(DIR_LIST)/1.0/Android.mk 13 | endif #GNSS HIDL 1.1 14 | endif #GNSS HIDL 2.0 15 | endif #BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 16 | -------------------------------------------------------------------------------- /rro_overlays/TetheringOverlay/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /recovery/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | ifneq ($(TARGET_PLATFORM_DEVICE_BASE),) 6 | LOCAL_CFLAGS += -DUSES_BOOTDEVICE_PATH 7 | endif 8 | 9 | LOCAL_C_INCLUDES := \ 10 | bootable/recovery \ 11 | bootable/recovery/edify/include \ 12 | bootable/recovery/otautil/include \ 13 | bootable/recovery/updater/include \ 14 | system/core/base/include 15 | 16 | LOCAL_SRC_FILES := recovery_updater.cpp 17 | LOCAL_MODULE := librecovery_updater_asus 18 | 19 | include $(BUILD_STATIC_LIBRARY) 20 | -------------------------------------------------------------------------------- /gps/gps_vendor_product.mk: -------------------------------------------------------------------------------- 1 | # HAL packages 2 | PRODUCT_PACKAGES += android.hardware.gnss@1.0-impl-qti 3 | PRODUCT_PACKAGES += android.hardware.gnss@1.0-service-qti 4 | PRODUCT_PACKAGES += android.hardware.gnss@1.1-impl-qti 5 | PRODUCT_PACKAGES += android.hardware.gnss@1.1-service-qti 6 | PRODUCT_PACKAGES += android.hardware.gnss@2.0-impl-qti 7 | PRODUCT_PACKAGES += android.hardware.gnss@2.0-service-qti 8 | PRODUCT_PACKAGES += gps.conf 9 | PRODUCT_PACKAGES += libloc_core 10 | PRODUCT_PACKAGES += libgnss 11 | PRODUCT_PACKAGES += liblocation_api 12 | PRODUCT_PACKAGES += libgps.utils 13 | PRODUCT_PACKAGES += libbatching 14 | PRODUCT_PACKAGES += libgeofencing 15 | -------------------------------------------------------------------------------- /sepolicy/vendor/property_contexts: -------------------------------------------------------------------------------- 1 | # Bluetooth 2 | ro.btmac u:object_r:btmac_prop:s0 3 | 4 | # Camera 5 | persist.vendor.camera.hdring u:object_r:vendor_camera_prop:s0 6 | persist.vendor.camera.pickres.prop_hdr u:object_r:vendor_camera_prop:s0 7 | 8 | # Fingerprint 9 | property.cdfinger.enablesave u:object_r:vendor_fingerprint_prop:s0 10 | persist.vendor.runin.fp u:object_r:vendor_fingerprint_prop:s0 11 | 12 | # NFC 13 | ro.hq.support.nfc u:object_r:nfc_sensors_prop:s0 14 | 15 | # Dirac 16 | persist.audio.dirac u:object_r:dirac_prop:s0 17 | -------------------------------------------------------------------------------- /doze/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE_TAGS := optional 5 | 6 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 7 | 8 | LOCAL_PACKAGE_NAME := Doze 9 | LOCAL_CERTIFICATE := platform 10 | LOCAL_PRIVATE_PLATFORM_APIS := true 11 | LOCAL_PRIVILEGED_MODULE := true 12 | 13 | LOCAL_USE_AAPT2 := true 14 | 15 | LOCAL_STATIC_ANDROID_LIBRARIES := \ 16 | androidx.core_core \ 17 | androidx.preference_preference 18 | 19 | LOCAL_RESOURCE_DIR := \ 20 | $(LOCAL_PATH)/res \ 21 | $(TOP)/packages/resources/devicesettings/res 22 | 23 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags 24 | 25 | include frameworks/base/packages/SettingsLib/common.mk 26 | 27 | include $(BUILD_PACKAGE) 28 | -------------------------------------------------------------------------------- /gps/android/utils/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE := liblocbatterylistener 5 | LOCAL_VENDOR_MODULE := true 6 | 7 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 8 | 9 | LOCAL_C_INCLUDES += \ 10 | $(LOCAL_PATH) \ 11 | 12 | LOCAL_SRC_FILES:= \ 13 | battery_listener.cpp 14 | LOCAL_SHARED_LIBRARIES := \ 15 | liblog \ 16 | libhidlbase \ 17 | libcutils \ 18 | libutils \ 19 | android.hardware.health@1.0 \ 20 | android.hardware.health@2.0 \ 21 | android.hardware.power@1.2 \ 22 | libbase 23 | 24 | LOCAL_STATIC_LIBRARIES := libhealthhalutils 25 | LOCAL_CFLAGS += -DBATTERY_LISTENER_ENABLED 26 | 27 | include $(BUILD_STATIC_LIBRARY) 28 | 29 | include $(CLEAR_VARS) 30 | LOCAL_MODULE := liblocbatterylistener_headers 31 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 32 | 33 | include $(BUILD_HEADER_LIBRARY) 34 | 35 | 36 | -------------------------------------------------------------------------------- /gps/batching/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 := libbatching 9 | LOCAL_VENDOR_MODULE := true 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | LOCAL_SHARED_LIBRARIES := \ 13 | libutils \ 14 | libcutils \ 15 | liblog \ 16 | libloc_core \ 17 | libgps.utils \ 18 | libdl 19 | 20 | LOCAL_SRC_FILES += \ 21 | location_batching.cpp \ 22 | BatchingAdapter.cpp 23 | 24 | LOCAL_HEADER_LIBRARIES := \ 25 | libgps.utils_headers \ 26 | libloc_core_headers \ 27 | libloc_pla_headers \ 28 | liblocation_api_headers 29 | 30 | LOCAL_PRELINK_MODULE := false 31 | 32 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 33 | include $(BUILD_SHARED_LIBRARY) 34 | 35 | endif # not BUILD_TINY_ANDROID 36 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 37 | -------------------------------------------------------------------------------- /gps/geofence/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 := libgeofencing 9 | LOCAL_VENDOR_MODULE := true 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | LOCAL_SRC_FILES:= \ 13 | GeofenceAdapter.cpp \ 14 | location_geofence.cpp 15 | 16 | LOCAL_SHARED_LIBRARIES := \ 17 | libutils \ 18 | libcutils \ 19 | libgps.utils \ 20 | liblog \ 21 | libloc_core 22 | 23 | LOCAL_HEADER_LIBRARIES := \ 24 | libgps.utils_headers \ 25 | libloc_core_headers \ 26 | libloc_pla_headers \ 27 | liblocation_api_headers 28 | 29 | LOCAL_PRELINK_MODULE := false 30 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 31 | include $(BUILD_SHARED_LIBRARY) 32 | 33 | endif # not BUILD_TINY_ANDROID 34 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 35 | 36 | -------------------------------------------------------------------------------- /overlay-sup/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | true 17 | 4 18 | 19 | -------------------------------------------------------------------------------- /init/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | cc_library_static { 18 | name: "libinit_sdm660", 19 | recovery_available: true, 20 | srcs: ["init_sdm660.cpp"], 21 | whole_static_libs: ["libbase"], 22 | include_dirs: [ 23 | "system/core/base/include", 24 | "system/core/init" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /light/android.hardware.light@2.0-service.asus_sdm660.rc: -------------------------------------------------------------------------------- 1 | on init 2 | # Notification LED 3 | chown system system /sys/class/leds/red/blink 4 | chown system system /sys/class/leds/red/brightness 5 | chown system system /sys/class/leds/green/blink 6 | chown system system /sys/class/leds/green/brightness 7 | 8 | chmod 0664 /sys/class/leds/red/blink 9 | chmod 0644 /sys/class/leds/red/brightness 10 | chmod 0664 /sys/class/leds/green/blink 11 | chmod 0644 /sys/class/leds/green/brightness 12 | 13 | # LCD backlight 14 | chown system system /sys/class/leds/lcd-backlight/brightness 15 | 16 | service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.asus_sdm660 17 | interface android.hardware.light@2.0::ILight default 18 | class hal 19 | user system 20 | group system 21 | # shutting off lights while powering-off 22 | shutdown critical 23 | writepid /dev/cpuset/system-background/tasks 24 | -------------------------------------------------------------------------------- /gps/pla/Android.mk: -------------------------------------------------------------------------------- 1 | GNSS_CFLAGS := \ 2 | -Werror \ 3 | -Wno-error=unused-parameter \ 4 | -Wno-error=macro-redefined \ 5 | -Wno-error=reorder \ 6 | -Wno-reorder-ctor \ 7 | -Wno-error=missing-braces \ 8 | -Wno-error=self-assign \ 9 | -Wno-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-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/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) 2019 Qualcomm Technologies, Inc. 9 | # All Rights Reserved. 10 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 11 | # 12 | # 2012-2013 Qualcomm Atheros, Inc. 13 | # All Rights Reserved. 14 | # Qualcomm Atheros Confidential and Proprietary. 15 | # 16 | # Export of this technology or software is regulated by the U.S. Government. 17 | # Diversion contrary to U.S. law prohibited. 18 | #=============================================================================*/ 19 | 20 | # X86 ONLY - UBUNTU: 21 | # Copy this file in the same directory where the executable is 22 | 23 | # Log level 24 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 25 | LOWI_LOG_LEVEL = 2 26 | LOWI_USE_LOWI_LP = 0 27 | 28 | -------------------------------------------------------------------------------- /gps/gnss/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | $(LOCPLA_CFLAGS) \ 3 | $(LOCHAL_CFLAGS) \ 4 | $(GPSUTILS_CFLAGS) \ 5 | $(LOCCORE_CFLAGS) \ 6 | -I./ \ 7 | -I../utils \ 8 | -I$(WORKSPACE)/hardware/qcom/gps/core/data-items \ 9 | -I../location \ 10 | -std=c++1y 11 | 12 | libgnss_la_SOURCES = \ 13 | location_gnss.cpp \ 14 | GnssAdapter.cpp \ 15 | XtraSystemStatusObserver.cpp \ 16 | Agps.cpp 17 | 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++ -ldl $(GPSUTILS_LIBS) $(LOCCORE_LIBS) 29 | 30 | #Create and Install libraries 31 | lib_LTLIBRARIES = libgnss.la 32 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /doze/res/layout/doze.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /audio/audio_tuning_mixer.txt: -------------------------------------------------------------------------------- 1 | #RAS_TEST_SPKR_PHONE_SPKR_STEREO 2 | acdb_dev_id:136 3 | !Playback 4 | Rxdevice:0 5 | 6 | enable 7 | INT4_MI2S_RX Channels:Two 8 | RX4 MIX1 INP1:RX4 9 | RX5 MIX1 INP1:RX5 10 | COMP1 Switch:1 11 | COMP2 Switch:1 12 | SpkrLeft COMP Switch:1 13 | SpkrLeft BOOST Switch:1 14 | SpkrLeft VISENSE Switch:1 15 | SpkrLeft SWR DAC_Port Switch:1 16 | SpkrRight COMP Switch:1 17 | SpkrRight BOOST Switch:1 18 | SpkrRight VISENSE Switch:1 19 | SpkrRight SWR DAC_Port Switch:1 20 | SpkrLeft WSA PA Mute:0 21 | SpkrRight WSA PA Mute:0 22 | INT4_MI2S_RX Audio Mixer MultiMedia1:1 23 | 24 | disable 25 | INT4_MI2S_RX Channels:One 26 | RX4 MIX1 INP1:ZERO 27 | RX5 MIX1 INP1:ZERO 28 | COMP1 Switch:0 29 | COMP2 Switch:0 30 | SpkrLeft COMP Switch:0 31 | SpkrLeft BOOST Switch:0 32 | SpkrLeft VISENSE Switch:0 33 | SpkrLeft SWR DAC_Port Switch:0 34 | SpkrRight COMP Switch:0 35 | SpkrRight BOOST Switch:0 36 | SpkrRight VISENSE Switch:0 37 | SpkrRight SWR DAC_Port Switch:0 38 | SpkrLeft WSA PA Mute:0 39 | SpkrRight WSA PA Mute:0 40 | INT4_MI2S_RX Audio Mixer MultiMedia1:0 41 | 42 | -------------------------------------------------------------------------------- /overlay/packages/apps/CellBroadcastReceiver/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | true 23 | 24 | -------------------------------------------------------------------------------- /configs/component-overrides.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /configs/media/media_codecs_vendor_audio.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /overlay-sup/packages/apps/Settings/res/values/custom_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 23 | 0 24 | 25 | 26 | true 27 | 28 | 29 | -------------------------------------------------------------------------------- /light/Android.bp: -------------------------------------------------------------------------------- 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 | cc_binary { 17 | defaults: ["hidl_defaults"], 18 | name: "android.hardware.light@2.0-service.asus_sdm660", 19 | init_rc: ["android.hardware.light@2.0-service.asus_sdm660.rc"], 20 | vintf_fragments: ["android.hardware.light@2.0-service.asus_sdm660.xml"], 21 | srcs: ["service.cpp", "Light.cpp"], 22 | shared_libs: [ 23 | "libbase", 24 | "libcutils", 25 | "libhardware", 26 | "libhidlbase", 27 | "libutils", 28 | "android.hardware.light@2.0", 29 | ], 30 | relative_install_path : "hw", 31 | vendor: true, 32 | } 33 | -------------------------------------------------------------------------------- /overlay-sup/packages/apps/Snap/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 18 | 19 | 20 | true 21 | 22 | 23 | false 24 | 25 | 26 | false 27 | 28 | -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 22 | 27 | 28 | -------------------------------------------------------------------------------- /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 | LocationDataTypes.h \ 31 | ILocationAPI.h 32 | 33 | #Create and Install libraries 34 | lib_LTLIBRARIES = liblocation_api.la 35 | 36 | library_includedir = $(pkgincludedir) 37 | 38 | pkgconfigdir = $(libdir)/pkgconfig 39 | pkgconfig_DATA = location-api.pc 40 | EXTRA_DIST = $(pkgconfig_DATA) 41 | -------------------------------------------------------------------------------- /doze/src/org/lineageos/settings/doze/DozeSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 The CyanogenMod Project 3 | * 2017 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.doze; 19 | 20 | import android.os.Bundle; 21 | import android.preference.PreferenceActivity; 22 | 23 | public class DozeSettingsActivity extends PreferenceActivity { 24 | 25 | private static final String TAG_DOZE = "doze"; 26 | 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | 31 | getFragmentManager().beginTransaction().replace(android.R.id.content, 32 | new DozeSettingsFragment(), TAG_DOZE).commit(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /setup-makefiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017-2020 The LineageOS Project 5 | # 6 | # SPDX-License-Identifier: Apache-2.0 7 | # 8 | 9 | set -e 10 | 11 | # Load extract_utils and do some sanity checks 12 | MY_DIR="${BASH_SOURCE%/*}" 13 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi 14 | 15 | ANDROID_ROOT="${MY_DIR}/../../.." 16 | 17 | HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh" 18 | if [ ! -f "${HELPER}" ]; then 19 | echo "Unable to find helper script at ${HELPER}" 20 | exit 1 21 | fi 22 | source "${HELPER}" 23 | 24 | # Initialize the helper for common 25 | setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true 26 | 27 | # Warning headers and guards 28 | write_headers "X00TD X01BD" 29 | 30 | # The standard common blobs 31 | write_makefiles "${MY_DIR}/proprietary-files.txt" true 32 | 33 | # Finish 34 | write_footers 35 | 36 | if [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then 37 | # Reinitialize the helper for device 38 | setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false 39 | 40 | # Warning headers and guards 41 | write_headers 42 | 43 | # The standard device blobs 44 | write_makefiles "${MY_DIR}/../${DEVICE}/proprietary-files.txt" true 45 | 46 | # Finish 47 | write_footers 48 | fi 49 | -------------------------------------------------------------------------------- /releasetools.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 The Android Open Source Project 2 | # Copyright (c) 2011, The Linux Foundation. All rights reserved. 3 | # Copyright (C) 2017-2018 The LineageOS Project 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | import hashlib 18 | import common 19 | import re 20 | 21 | def FullOTA_Assertions(info): 22 | AddModemAssertion(info) 23 | return 24 | 25 | def IncrementalOTA_Assertions(info): 26 | AddModemAssertion(info) 27 | return 28 | 29 | def AddModemAssertion(info): 30 | android_info = info.input_zip.read("OTA/android-info.txt") 31 | m = re.search(r'require\s+version-modem\s*=\s*(.+)', android_info) 32 | if m: 33 | version = m.group(1).rstrip() 34 | if len(version) and '*' not in version: 35 | cmd = 'assert(asus.verify_modem("' + version + '") == "1");' 36 | info.script.AppendExtra(cmd) 37 | return 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | true 24 | 25 | 26 | /sys/class/power_supply/bms/charge_full 27 | /sys/class/power_supply/bms/charge_now_raw 28 | /sys/class/power_supply/bms/cycle_count 29 | 30 | 31 | -------------------------------------------------------------------------------- /gps/batching/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | $(GPSUTILS_CFLAGS) \ 3 | $(LOCCORE_CFLAGS) \ 4 | -I./ \ 5 | -std=c++1y \ 6 | -D__func__=__PRETTY_FUNCTION__ \ 7 | -fno-short-enums 8 | 9 | ACLOCAL_AMFLAGS = -I m4 10 | 11 | requiredlibs = \ 12 | $(GPSUTILS_LIBS) \ 13 | $(LOCCORE_LIBS) \ 14 | -llog 15 | 16 | h_sources = \ 17 | BatchingAdapter.h 18 | 19 | libbatching_la_SOURCES = \ 20 | location_batching.cpp \ 21 | BatchingAdapter.cpp 22 | 23 | if USE_GLIB 24 | libbatching_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 25 | #libbatching_la_LDFLAGS = -lstdc++ -g -Wl,-z,defs -lpthread $(requiredlibs) @GLIB_LIBS@ -shared -avoid-version 26 | libbatching_la_LDFLAGS = -lstdc++ -g -Wl,-z,defs -lpthread $(requiredlibs) @GLIB_LIBS@ -avoid-version 27 | libbatching_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 28 | else 29 | libbatching_la_CFLAGS = $(AM_CFLAGS) 30 | libbatching_la_LDFLAGS = -Wl,-z,defs -lpthread $(requiredlibs) -shared -version-info 1:0:0 31 | libbatching_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 32 | endif 33 | 34 | library_include_HEADERS = $(h_sources) 35 | 36 | library_includedir = $(pkgincludedir) 37 | 38 | #Create and Install libraries 39 | lib_LTLIBRARIES = libbatching.la 40 | 41 | pkgconfigdir = $(libdir)/pkgconfig 42 | pkgconfig_DATA = location-batching.pc 43 | sysconf_DATA = $(WORKSPACE)/hardware/qcom/gps/etc/flp.conf 44 | EXTRA_DIST = $(pkgconfig_DATA) 45 | 46 | -------------------------------------------------------------------------------- /doze/src/org/lineageos/settings/doze/BootCompletedReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The CyanogenMod Project 3 | * 2017 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.doze; 19 | 20 | import android.content.BroadcastReceiver; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.util.Log; 24 | 25 | public class BootCompletedReceiver extends BroadcastReceiver { 26 | 27 | private static final boolean DEBUG = false; 28 | private static final String TAG = "Doze"; 29 | 30 | @Override 31 | public void onReceive(final Context context, Intent intent) { 32 | if (Utils.isDozeEnabled(context) && Utils.sensorsEnabled(context)) { 33 | if (DEBUG) Log.d(TAG, "Starting service"); 34 | Utils.startService(context); 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /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 | LOCAL_SHARED_LIBRARIES := \ 13 | liblog \ 14 | libutils \ 15 | libcutils \ 16 | libgps.utils \ 17 | libdl \ 18 | liblog 19 | 20 | LOCAL_SRC_FILES += \ 21 | LocApiBase.cpp \ 22 | LocAdapterBase.cpp \ 23 | ContextBase.cpp \ 24 | LocContext.cpp \ 25 | loc_core_log.cpp \ 26 | data-items/DataItemsFactoryProxy.cpp \ 27 | SystemStatusOsObserver.cpp \ 28 | SystemStatus.cpp 29 | 30 | LOCAL_CFLAGS += \ 31 | -fno-short-enums \ 32 | -D_ANDROID_ 33 | 34 | LOCAL_C_INCLUDES:= \ 35 | $(LOCAL_PATH)/data-items \ 36 | $(LOCAL_PATH)/data-items/common \ 37 | $(LOCAL_PATH)/observer \ 38 | 39 | LOCAL_HEADER_LIBRARIES := \ 40 | libutils_headers \ 41 | libgps.utils_headers \ 42 | libloc_pla_headers \ 43 | liblocation_api_headers 44 | 45 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 46 | 47 | include $(BUILD_SHARED_LIBRARY) 48 | 49 | include $(CLEAR_VARS) 50 | LOCAL_MODULE := libloc_core_headers 51 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ 52 | $(LOCAL_PATH) \ 53 | $(LOCAL_PATH)/data-items \ 54 | $(LOCAL_PATH)/data-items/common \ 55 | $(LOCAL_PATH)/observer 56 | include $(BUILD_HEADER_LIBRARY) 57 | 58 | endif # not BUILD_TINY_ANDROID 59 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 60 | -------------------------------------------------------------------------------- /gps/geofence/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -Wundef \ 2 | -Wno-trigraphs \ 3 | -g -O0 \ 4 | -fno-inline \ 5 | -fno-short-enums \ 6 | -fpic \ 7 | ${GPSUTILS_CFLAGS} \ 8 | ${LOCCORE_CFLAGS} \ 9 | $(LOCPLA_CFLAGS) \ 10 | -D__func__=__PRETTY_FUNCTION__ \ 11 | -std=c++1y 12 | 13 | AM_CPPFLAGS = $(AM_CFLAGS) 14 | 15 | ACLOCAL_AMFLAGS = -I m4 16 | 17 | requiredlibs = \ 18 | ${LOCCORE_LIBS} \ 19 | $(GPSUTILS_LIBS) \ 20 | -llog 21 | 22 | h_sources = \ 23 | GeofenceAdapter.h 24 | 25 | c_sources = \ 26 | GeofenceAdapter.cpp \ 27 | location_geofence.cpp 28 | 29 | libgeofencing_la_SOURCES = $(c_sources) 30 | if USE_GLIB 31 | libgeofencing_la_CFLAGS = -DUSE_GLIB @GLIB_CFLAGS@ $(AM_CFLAGS) 32 | libgeofencing_la_CPPFLAGS = -DUSE_GLIB @GLIB_CFLAGS@ $(AM_CFLAGS) $(AM_CPPFLAGS) 33 | libgeofencing_la_LDFLAGS = -lstdc++ -Wl,-z,defs @GLIB_LIBS@ $(requiredlibs) -shared -version-info 1:0:0 34 | libgeofencing_la_LIBDADD = $(requiredlibs) -lstdc++ @GLIB_LIBS@ 35 | else 36 | libgeofencing_la_CFLAGS = $(AM_CFLAGS) 37 | libgeofencing_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 38 | libgeofencing_la_LDFLAGS = -lstdc++ -Wl,-z,defs $(requiredlibs) -shared -version-info 1:0:0 39 | libgeofencing_la_LIBDADD = $(requiredlibs) -lstdc++ 40 | endif 41 | 42 | library_include_HEADERS = $(h_sources) 43 | 44 | library_includedir = $(pkgincludedir) 45 | 46 | lib_LTLIBRARIES = libgeofencing.la 47 | 48 | pkgconfigdir = $(libdir)/pkgconfig 49 | pkgconfig_DATA = location-geofence.pc 50 | EXTRA_DIST = $(pkgconfig_DATA) 51 | -------------------------------------------------------------------------------- /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 | libdl \ 13 | libutils \ 14 | libcutils \ 15 | liblog \ 16 | libprocessgroup 17 | 18 | LOCAL_SRC_FILES += \ 19 | loc_log.cpp \ 20 | loc_cfg.cpp \ 21 | msg_q.c \ 22 | linked_list.c \ 23 | loc_target.cpp \ 24 | LocHeap.cpp \ 25 | LocTimer.cpp \ 26 | LocThread.cpp \ 27 | MsgTask.cpp \ 28 | loc_misc_utils.cpp \ 29 | loc_nmea.cpp \ 30 | LocIpc.cpp 31 | 32 | # Flag -std=c++11 is not accepted by compiler when LOCAL_CLANG is set to true 33 | LOCAL_CFLAGS += \ 34 | -fno-short-enums \ 35 | -D_ANDROID_ 36 | 37 | ifeq ($(TARGET_BUILD_VARIANT),user) 38 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 39 | endif 40 | 41 | LOCAL_LDFLAGS += -Wl,--export-dynamic 42 | 43 | ## Includes 44 | LOCAL_HEADER_LIBRARIES := \ 45 | libutils_headers \ 46 | libloc_pla_headers \ 47 | liblocation_api_headers 48 | 49 | LOCAL_MODULE := libgps.utils 50 | LOCAL_VENDOR_MODULE := true 51 | LOCAL_MODULE_TAGS := optional 52 | 53 | LOCAL_PRELINK_MODULE := false 54 | 55 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 56 | 57 | include $(BUILD_SHARED_LIBRARY) 58 | 59 | include $(CLEAR_VARS) 60 | LOCAL_MODULE := libgps.utils_headers 61 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 62 | include $(BUILD_HEADER_LIBRARY) 63 | 64 | endif # not BUILD_TINY_ANDROID 65 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 66 | -------------------------------------------------------------------------------- /configs/privapp-permissions-qti.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_fingerprint_default.te: -------------------------------------------------------------------------------- 1 | typeattribute hal_fingerprint_default data_between_core_and_vendor_violators; 2 | 3 | vndbinder_use(hal_fingerprint_default) 4 | 5 | binder_call(hal_fingerprint_default, hal_perf_default) 6 | binder_call(hal_fingerprint_default, goodix_fingerprint_vndservice) 7 | 8 | allow hal_fingerprint_default cdfinger_device:chr_file rw_file_perms; 9 | allow hal_fingerprint_default fingerprintd_device:chr_file rw_file_perms; 10 | allow hal_fingerprint_default focaltech_device:chr_file rw_file_perms; 11 | allow hal_fingerprint_default tee_device:chr_file rw_file_perms; 12 | 13 | allow hal_fingerprint_default hal_perf_hwservice:hwservice_manager find; 14 | allow hal_fingerprint_default focaltech_hwservice:hwservice_manager { add find }; 15 | allow hal_fingerprint_default focaltech_vndservice:service_manager { add find }; 16 | allow hal_fingerprint_default goodix_fingerprint_vndservice:service_manager { add find }; 17 | 18 | # Allow hal_fingerprint_default to read, write and create files in persist 19 | allow hal_fingerprint_default persist_drm_file:file create_file_perms; 20 | allow hal_fingerprint_default persist_drm_file:dir rw_dir_perms; 21 | 22 | allow hal_fingerprint_default self:netlink_kobject_uevent_socket { read create setopt bind }; 23 | allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl; 24 | 25 | allow hal_fingerprint_default fingerprintd_data_file:file create_file_perms; 26 | allow hal_fingerprint_default fingerprintd_data_file:dir create_dir_perms; 27 | 28 | 29 | r_dir_file(hal_fingerprint_default, firmware_file) 30 | r_dir_file(hal_fingerprint_default, sysfs_usb_supply) 31 | 32 | set_prop(hal_fingerprint_default, vendor_fingerprint_prop) 33 | -------------------------------------------------------------------------------- /configs/keylayout/gpio-keys.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2013, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | key 115 VOLUME_UP 29 | key 114 VOLUME_DOWN 30 | key 102 HOME 31 | key 528 FOCUS 32 | key 766 CAMERA 33 | -------------------------------------------------------------------------------- /gps/android/1.0/android.hardware.gnss@1.0-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.0::IGnss/default 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /gps/android/1.1/android.hardware.gnss@1.1-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.1::IGnss/default 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /gps/android/utils/battery_listener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, The Linux Foundation. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are 6 | * met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer in the documentation and/or other materials provided 12 | * with the distribution. 13 | * * Neither the name of The Linux Foundation nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | typedef void (* battery_status_change_fn_t)(bool); 30 | void loc_extn_battery_properties_listener_init(battery_status_change_fn_t fn); 31 | void loc_extn_battery_properties_listener_deinit(); 32 | bool loc_extn_battery_properties_is_charging(); 33 | -------------------------------------------------------------------------------- /gps/android/1.0/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 18 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 19 | 20 | 21 | #include 22 | #include 23 | 24 | namespace android { 25 | namespace hardware { 26 | namespace gnss { 27 | namespace V1_0 { 28 | namespace implementation { 29 | 30 | using ::android::hardware::gnss::V1_0::IGnssDebug; 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | using ::android::hardware::hidl_vec; 34 | using ::android::hardware::hidl_string; 35 | using ::android::sp; 36 | 37 | /* Interface for GNSS Debug support. */ 38 | struct Gnss; 39 | struct GnssDebug : public IGnssDebug { 40 | GnssDebug(Gnss* gnss); 41 | ~GnssDebug() {}; 42 | 43 | /* 44 | * Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow. 45 | * These declarations were generated from IGnssDebug.hal. 46 | */ 47 | Return getDebugData(getDebugData_cb _hidl_cb) override; 48 | 49 | private: 50 | Gnss* mGnss = nullptr; 51 | }; 52 | 53 | } // namespace implementation 54 | } // namespace V1_0 55 | } // namespace gnss 56 | } // namespace hardware 57 | } // namespace android 58 | 59 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 60 | -------------------------------------------------------------------------------- /gps/android/1.1/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H 18 | #define ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H 19 | 20 | 21 | #include 22 | #include 23 | 24 | namespace android { 25 | namespace hardware { 26 | namespace gnss { 27 | namespace V1_1 { 28 | namespace implementation { 29 | 30 | using ::android::hardware::gnss::V1_0::IGnssDebug; 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | using ::android::hardware::hidl_vec; 34 | using ::android::hardware::hidl_string; 35 | using ::android::sp; 36 | 37 | /* Interface for GNSS Debug support. */ 38 | struct Gnss; 39 | struct GnssDebug : public IGnssDebug { 40 | GnssDebug(Gnss* gnss); 41 | ~GnssDebug() {}; 42 | 43 | /* 44 | * Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow. 45 | * These declarations were generated from IGnssDebug.hal. 46 | */ 47 | Return getDebugData(getDebugData_cb _hidl_cb) override; 48 | 49 | private: 50 | Gnss* mGnss = nullptr; 51 | }; 52 | 53 | } // namespace implementation 54 | } // namespace V1_1 55 | } // namespace gnss 56 | } // namespace hardware 57 | } // namespace android 58 | 59 | #endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H 60 | -------------------------------------------------------------------------------- /gps/etc/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := apdr.conf 5 | LOCAL_VENDOR_MODULE := true 6 | LOCAL_MODULE_TAGS := optional 7 | LOCAL_MODULE_CLASS := ETC 8 | LOCAL_SRC_FILES := apdr.conf 9 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC) 10 | include $(BUILD_PREBUILT) 11 | 12 | include $(CLEAR_VARS) 13 | LOCAL_MODULE := flp.conf 14 | LOCAL_VENDOR_MODULE := true 15 | LOCAL_MODULE_TAGS := optional 16 | LOCAL_MODULE_CLASS := ETC 17 | LOCAL_SRC_FILES := flp.conf 18 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC) 19 | include $(BUILD_PREBUILT) 20 | 21 | include $(CLEAR_VARS) 22 | LOCAL_MODULE := gps.conf 23 | LOCAL_VENDOR_MODULE := true 24 | LOCAL_MODULE_TAGS := optional 25 | LOCAL_MODULE_CLASS := ETC 26 | LOCAL_SRC_FILES := gps.conf 27 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC) 28 | include $(BUILD_PREBUILT) 29 | 30 | include $(CLEAR_VARS) 31 | LOCAL_MODULE := izat.conf 32 | LOCAL_VENDOR_MODULE := true 33 | LOCAL_MODULE_TAGS := optional 34 | LOCAL_MODULE_CLASS := ETC 35 | LOCAL_SRC_FILES := izat.conf 36 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC) 37 | include $(BUILD_PREBUILT) 38 | 39 | include $(CLEAR_VARS) 40 | LOCAL_MODULE := lowi.conf 41 | LOCAL_VENDOR_MODULE := true 42 | LOCAL_MODULE_TAGS := optional 43 | LOCAL_MODULE_CLASS := ETC 44 | LOCAL_SRC_FILES := lowi.conf 45 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC) 46 | include $(BUILD_PREBUILT) 47 | 48 | include $(CLEAR_VARS) 49 | LOCAL_MODULE := sap.conf 50 | LOCAL_VENDOR_MODULE := true 51 | LOCAL_MODULE_TAGS := optional 52 | LOCAL_MODULE_CLASS := ETC 53 | LOCAL_SRC_FILES := sap.conf 54 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC) 55 | include $(BUILD_PREBUILT) 56 | 57 | include $(CLEAR_VARS) 58 | LOCAL_MODULE := xtwifi.conf 59 | LOCAL_VENDOR_MODULE := true 60 | LOCAL_MODULE_TAGS := optional 61 | LOCAL_MODULE_CLASS := ETC 62 | LOCAL_SRC_FILES := xtwifi.conf 63 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC) 64 | include $(BUILD_PREBUILT) 65 | -------------------------------------------------------------------------------- /gps/android/2.0/android.hardware.gnss@2.0-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.1::IGnss/default 33 | @2.0::IGnss/default 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /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++14 \ 12 | $(LOCPLA_CFLAGS) 13 | 14 | libgps_utils_la_h_sources = \ 15 | msg_q.h \ 16 | linked_list.h \ 17 | loc_cfg.h \ 18 | loc_log.h \ 19 | loc_target.h \ 20 | loc_timer.h \ 21 | MsgTask.h \ 22 | LocHeap.h \ 23 | LocThread.h \ 24 | LocTimer.h \ 25 | LocIpc.h \ 26 | 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 | LocSharedLock.h \ 33 | LocUnorderedSetMap.h 34 | 35 | libgps_utils_la_c_sources = \ 36 | linked_list.c \ 37 | msg_q.c \ 38 | loc_cfg.cpp \ 39 | loc_log.cpp \ 40 | loc_target.cpp \ 41 | LocHeap.cpp \ 42 | LocTimer.cpp \ 43 | LocThread.cpp \ 44 | LocIpc.cpp \ 45 | MsgTask.cpp \ 46 | loc_misc_utils.cpp \ 47 | loc_nmea.cpp 48 | 49 | library_includedir = $(pkgincludedir) 50 | 51 | library_include_HEADERS = $(libgps_utils_la_h_sources) 52 | 53 | libgps_utils_la_SOURCES = $(libgps_utils_la_c_sources) 54 | 55 | if USE_GLIB 56 | libgps_utils_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 57 | libgps_utils_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 58 | libgps_utils_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 59 | else 60 | libgps_utils_la_CFLAGS = $(AM_CFLAGS) 61 | libgps_utils_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 62 | libgps_utils_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 63 | endif 64 | 65 | libgps_utils_la_LIBADD = $(CUTILS_LIBS) -ldl 66 | 67 | #Create and Install libraries 68 | lib_LTLIBRARIES = libgps_utils.la 69 | 70 | pkgconfigdir = $(libdir)/pkgconfig 71 | pkgconfig_DATA = gps-utils.pc 72 | EXTRA_DIST = $(pkgconfig_DATA) 73 | -------------------------------------------------------------------------------- /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 | [AID_VENDOR_THERMAL] 20 | value:2907 21 | 22 | [AID_VENDOR_FASTRPC] 23 | value:2908 24 | 25 | [vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti] 26 | mode: 0755 27 | user: AID_BLUETOOTH 28 | group: AID_BLUETOOTH 29 | caps: BLOCK_SUSPEND NET_ADMIN 30 | 31 | [vendor/bin/pm-service] 32 | mode: 0755 33 | user: AID_SYSTEM 34 | group: AID_SYSTEM 35 | caps: NET_BIND_SERVICE SYS_BOOT 36 | 37 | [vendor/bin/pd-mapper] 38 | mode: 0755 39 | user: AID_SYSTEM 40 | group: AID_SYSTEM 41 | caps: NET_BIND_SERVICE 42 | 43 | [vendor/bin/imsdatadaemon] 44 | mode: 0755 45 | user: AID_RADIO 46 | group: AID_RADIO 47 | caps: NET_BIND_SERVICE 48 | 49 | [vendor/bin/ims_rtp_daemon] 50 | mode: 0755 51 | user: AID_RADIO 52 | group: AID_RADIO 53 | caps: NET_BIND_SERVICE 54 | 55 | [vendor/bin/imsrcsd] 56 | mode: 0755 57 | user: AID_RADIO 58 | group: AID_RADIO 59 | caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM 60 | 61 | [vendor/bin/cnd] 62 | mode: 0755 63 | user: AID_SYSTEM 64 | group: AID_SYSTEM 65 | caps: NET_BIND_SERVICE BLOCK_SUSPEND NET_ADMIN 66 | 67 | [vendor/bin/slim_daemon] 68 | mode: 0755 69 | user: AID_GPS 70 | group: AID_GPS 71 | caps: NET_BIND_SERVICE 72 | 73 | [vendor/bin/loc_launcher] 74 | mode: 0755 75 | user: AID_GPS 76 | group: AID_GPS 77 | caps: SETUID SETGID 78 | 79 | [vendor/bin/xtwifi-client] 80 | mode: 0755 81 | user: AID_GPS 82 | group: AID_GPS 83 | caps: NET_BIND_SERVICE BLOCK_SUSPEND WAKE_ALARM 84 | 85 | [vendor/bin/sensors.qti] 86 | mode: 0755 87 | user: AID_SYSTEM 88 | group: AID_SYSTEM 89 | caps: NET_BIND_SERVICE 90 | 91 | [vendor/firmware_mnt/image/*] 92 | mode: 0771 93 | user: AID_SYSTEM 94 | group: AID_SYSTEM 95 | caps: 0 96 | 97 | [persist/] 98 | mode: 0771 99 | user: AID_SYSTEM 100 | group: AID_SYSTEM 101 | caps: 0 102 | -------------------------------------------------------------------------------- /gps/android/2.0/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 23 | 24 | 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V2_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V2_0::IGnssDebug; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | /* Interface for GNSS Debug support. */ 42 | struct Gnss; 43 | struct GnssDebug : public IGnssDebug { 44 | GnssDebug(Gnss* gnss); 45 | ~GnssDebug() {}; 46 | 47 | // Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow 48 | Return getDebugData(getDebugData_cb _hidl_cb) override; 49 | // Methods from ::android::hardware::gnss::V2_0::IGnssDebug follow. 50 | Return getDebugData_2_0(getDebugData_2_0_cb _hidl_cb) override; 51 | 52 | private: 53 | Gnss* mGnss = nullptr; 54 | }; 55 | 56 | } // namespace implementation 57 | } // namespace V2_0 58 | } // namespace gnss 59 | } // namespace hardware 60 | } // namespace android 61 | 62 | #endif // ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 63 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 3 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 3 36 | 37 | -------------------------------------------------------------------------------- /gps/geofence/configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ(2.61) 2 | AC_INIT([location-geofence], 1.0.0) 3 | AM_INIT_AUTOMAKE([foreign]) 4 | AC_CONFIG_SRCDIR([Makefile.am]) 5 | AC_CONFIG_HEADERS([config.h]) 6 | AC_CONFIG_MACRO_DIR([m4]) 7 | 8 | # Check for programs 9 | AC_PROG_LIBTOOL 10 | AC_PROG_CXX 11 | AC_PROG_CC 12 | AM_PROG_CC_C_O 13 | AC_PROG_AWK 14 | AC_PROG_CPP 15 | AC_PROG_INSTALL 16 | AC_PROG_LN_S 17 | AC_PROG_MAKE_SET 18 | PKG_PROG_PKG_CONFIG 19 | 20 | # Check for libraries 21 | PKG_CHECK_MODULES([GPSUTILS], [gps-utils]) 22 | AC_SUBST([GPSUTILS_CFLAGS]) 23 | AC_SUBST([GPSUTILS_LIBS]) 24 | 25 | PKG_CHECK_MODULES([LOCCORE], [loc-core]) 26 | AC_SUBST([LOCCORE_CFLAGS]) 27 | AC_SUBST([LOCCORE_LIBS]) 28 | 29 | AS_CASE([$host], 30 | [arm*], [ARM=yes], 31 | [ARM=no] 32 | ) 33 | 34 | AC_ARG_WITH([locpla_includes], 35 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 36 | [specify the path to locpla-includes in loc-pla_git.bb]), 37 | [locpla_incdir=$withval], 38 | with_locpla_includes=no) 39 | 40 | if test "x$with_locpla_includes" != "xno"; then 41 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 42 | fi 43 | 44 | AC_ARG_WITH([glib], 45 | AC_HELP_STRING([--with-glib], 46 | [enable glib, building HLOS systems which use glib])) 47 | 48 | if (test "x${with_glib}" = "xyes"); then 49 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 50 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 51 | AC_MSG_ERROR(GThread >= 2.16 is required)) 52 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 53 | AC_MSG_ERROR(GLib >= 2.16 is required)) 54 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 55 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 56 | 57 | AC_SUBST(GLIB_CFLAGS) 58 | AC_SUBST(GLIB_LIBS) 59 | fi 60 | 61 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 62 | 63 | AC_SUBST([CFLAGS]) 64 | AC_SUBST([CPPFLAGS]) 65 | AC_SUBST([LIBS]) 66 | 67 | AC_CONFIG_FILES([ \ 68 | Makefile \ 69 | location-geofence.pc 70 | ]) 71 | 72 | AC_OUTPUT 73 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc120/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc460-mnc03/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc460-mnc11/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc312-mnc530/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 30 | 31 | 32 | 33 | "0" 34 | "00" 35 | "*2" 36 | 37 | 38 | -------------------------------------------------------------------------------- /gps/etc/flp.conf: -------------------------------------------------------------------------------- 1 | ################################### 2 | ##### FLP settings ##### 3 | ################################### 4 | 5 | ################################### 6 | # FLP BATCH SIZE 7 | ################################### 8 | # The number of batched locations 9 | # requested to modem. The desired number 10 | # defined below may not be satisfied, as 11 | # the modem can only return the number 12 | # of batched locations that can be allocated, 13 | # which is limited by memory. The default 14 | # batch size defined as 20 as below. 15 | BATCH_SIZE=40 16 | 17 | ################################### 18 | # FLP OUTDOOR TRIP BATCH SIZE 19 | ################################### 20 | # The number of batched locations 21 | # requested to modem for outdoor 22 | # trip batching. The desired number 23 | # defined below may not be satisfied, as 24 | # the modem can only return the number 25 | # of batched locations that can be allocated, 26 | # which is limited by memory. The default 27 | # trip batch size defined as 600 as below. 28 | OUTDOOR_TRIP_BATCH_SIZE=600 29 | 30 | ################################### 31 | # FLP BATCHING SESSION TIMEOUT 32 | ################################### 33 | # Duration with which batch session timeout 34 | # happens in milliseconds. If not specified 35 | # or set to zero, batching session timeout 36 | # defaults to 20 seconds by the modem. 37 | # BATCH_SESSION_TIMEOUT=20000 38 | 39 | ################################### 40 | # FLP BATCHING ACCURACY 41 | ################################### 42 | # Set to one of the defined values below 43 | # to define the accuracy of batching. 44 | # If not specified, accuracy defaults 45 | # to LOW. 46 | # FLP BATCHING ACCURACY values: 47 | # Low accuracy = 0 48 | # Medium accuracy = 1 49 | # High accuracy = 2 50 | ACCURACY=1 51 | 52 | #################################### 53 | # By default if network fixes are not sensor assisted 54 | # these fixes must be dropped. This parameter adds an exception 55 | # for targets where there is no PDR and we still want to 56 | # report out network fixes 57 | # 0: MUST NOT ALLOW NETWORK FIXES 58 | # 1: ALLOW NETWORK FIXES 59 | #################################### 60 | ALLOW_NETWORK_FIXES = 0 61 | -------------------------------------------------------------------------------- /doze/res/xml/doze_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 24 | 25 | 28 | 29 | 34 | 35 | 36 | 37 | 40 | 41 | 46 | 47 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /rootdir/etc/init.performance_level.rc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2021 Chaldeaprjkt 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 | # 17 | # Preset for inactive game-mode 18 | # This only executed one-time right after game is closed 19 | # 20 | 21 | on property:sys.performance.level=-1 22 | chmod 644 /sys/class/thermal/thermal_message/sconfig 23 | write /sys/class/thermal/thermal_message/sconfig 0 24 | 25 | # 26 | # All presets from powersave to performance Mode 27 | # Note: Device-specific, you may need to adjust it accordingly 28 | # 29 | 30 | on property:sys.performance.level=0 31 | chmod 644 /sys/class/thermal/thermal_message/sconfig 32 | write /sys/class/thermal/thermal_message/sconfig 0 33 | 34 | on property:sys.performance.level=1 35 | chmod 644 /sys/class/thermal/thermal_message/sconfig 36 | write /sys/class/thermal/thermal_message/sconfig 14 37 | 38 | on property:sys.performance.level=2 39 | chmod 644 /sys/class/thermal/thermal_message/sconfig 40 | write /sys/class/thermal/thermal_message/sconfig 14 41 | 42 | on property:sys.performance.level=3 43 | chmod 644 /sys/class/thermal/thermal_message/sconfig 44 | write /sys/class/thermal/thermal_message/sconfig 10 45 | 46 | on property:sys.performance.level=4 47 | chmod 644 /sys/class/thermal/thermal_message/sconfig 48 | write /sys/class/thermal/thermal_message/sconfig 10 49 | 50 | on property:sys.performance.level=5 51 | chmod 644 /sys/class/thermal/thermal_message/sconfig 52 | write /sys/class/thermal/thermal_message/sconfig 13 53 | 54 | on property:sys.performance.level=6 55 | chmod 644 /sys/class/thermal/thermal_message/sconfig 56 | write /sys/class/thermal/thermal_message/sconfig 13 57 | -------------------------------------------------------------------------------- /bluetooth/include/bdroid_buildcfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2013, The Linux Foundation. All rights reserved. 4 | * Not a Contribution, Apache license notifications and license are retained 5 | * for attribution purposes only. 6 | * 7 | * Copyright (C) 2012 The Android Open Source Project 8 | * Copyright (C) 2018 The LineageOS Project 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | #ifndef _BDROID_BUILDCFG_H 24 | #define _BDROID_BUILDCFG_H 25 | 26 | #include 27 | #include 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | int property_get(const char *key, char *value, const char *default_value); 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #include "osi/include/osi.h" 38 | 39 | typedef struct { 40 | const char *product_device; 41 | const char *product_model; 42 | } device_t; 43 | 44 | static const device_t devices[] = { 45 | }; 46 | 47 | static inline const char *BtmGetDefaultName() 48 | { 49 | char product_device[92]; 50 | property_get("ro.product.device", product_device, ""); 51 | 52 | for (unsigned int i = 0; i < ARRAY_SIZE(devices); i++) { 53 | device_t device = devices[i]; 54 | 55 | if (strcmp(device.product_device, product_device) == 0) { 56 | return device.product_model; 57 | } 58 | } 59 | 60 | // Fallback to ro.product.model 61 | return ""; 62 | } 63 | 64 | #define BTM_DEF_LOCAL_NAME BtmGetDefaultName() 65 | // Disables read remote device feature 66 | #define MAX_ACL_CONNECTIONS 16 67 | #define MAX_L2CAP_CHANNELS 32 68 | #define BLE_VND_INCLUDED TRUE 69 | #define GATT_MAX_PHY_CHANNEL 10 70 | 71 | #define AVDT_NUM_SEPS 35 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /sepolicy/vendor/file_contexts: -------------------------------------------------------------------------------- 1 | # Fingerprint 2 | /dev/focaltech_fp u:object_r:focaltech_device:s0 3 | /dev/fpsdev0 u:object_r:cdfinger_device:s0 4 | /dev/goodix_fp u:object_r:fingerprintd_device:s0 5 | /data/system/cdfinger(/.*)? u:object_r:cdfinger_data_file:s0 6 | /data/vendor/focaltech(/.*)? u:object_r:fingerprint_vendor_data_file:s0 7 | 8 | /(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service_asus u:object_r:hal_fingerprint_default_exec:s0 9 | 10 | # Hexagon DSP-side executable needed for Halide operation 11 | # This is labeled as public_adsprpcd_file as it needs to be read by apps 12 | # (e.g. Google Camera App) 13 | /mnt/vendor/dsp/fastrpc_shell_3 u:object_r:public_adsprpcd_file:s0 14 | 15 | # Light HAL 16 | /(vendor|system/vendor)/bin/hw/android\.hardware\.light@2\.0-service\.asus_sdm660 u:object_r:hal_light_default_exec:s0 17 | 18 | # Nvram 19 | /system/bin/nvram_btwifi u:object_r:nvram_btwifi_exec:s0 20 | 21 | # Persist 22 | /persist(/.*)? u:object_r:mnt_vendor_file:s0 23 | 24 | # Power 25 | /(vendor|system/vendor)/bin/hw/android\.hardware\.power\.stats@1\.0-service\.mock u:object_r:hal_power_stats_default_exec:s0 26 | 27 | # Scripts 28 | /(vendor|system/vendor)/bin/init\.btmac\.sh u:object_r:init-btmac-sh_exec:s0 29 | 30 | # Sensors 31 | /sys/devices/virtual/input/input[0-9]+/stk3x[0-9]x-light(/.*)? u:object_r:sysfs_sensors:s0 32 | /sys/devices/virtual/input/input[0-9]+/stk3x[0-9]x-proximity(/.*)? u:object_r:sysfs_sensors:s0 33 | 34 | /sys/module/stk3x[0-9]x/parameters/call_status_flag u:object_r:sysfs_call_status:s0 35 | 36 | # Thermal 37 | /(vendor|system/vendor)/bin/hw/android\.hardware\.thermal@2\.0-service\.qti u:object_r:hal_thermal_default_exec:s0 38 | -------------------------------------------------------------------------------- /gps/core/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = -I./ \ 4 | $(LOCPLA_CFLAGS) \ 5 | $(GPSUTILS_CFLAGS) \ 6 | -I./data-items/ \ 7 | -I./data-items/common \ 8 | -I./observer \ 9 | -I$(WORKSPACE)/gps-noship/flp \ 10 | -D__func__=__PRETTY_FUNCTION__ \ 11 | -fno-short-enums \ 12 | -std=c++11 13 | 14 | libloc_core_la_h_sources = \ 15 | LocApiBase.h \ 16 | LocAdapterBase.h \ 17 | ContextBase.h \ 18 | LocContext.h \ 19 | LBSProxyBase.h \ 20 | loc_core_log.h \ 21 | LocAdapterProxyBase.h \ 22 | EngineHubProxyBase.h \ 23 | data-items/DataItemId.h \ 24 | data-items/IDataItemCore.h \ 25 | data-items/DataItemConcreteTypesBase.h \ 26 | observer/IDataItemObserver.h \ 27 | observer/IDataItemSubscription.h \ 28 | observer/IFrameworkActionReq.h \ 29 | observer/IOsObserver.h \ 30 | SystemStatusOsObserver.h \ 31 | SystemStatus.h 32 | 33 | libloc_core_la_c_sources = \ 34 | LocApiBase.cpp \ 35 | LocAdapterBase.cpp \ 36 | ContextBase.cpp \ 37 | LocContext.cpp \ 38 | loc_core_log.cpp \ 39 | data-items/DataItemsFactoryProxy.cpp \ 40 | SystemStatusOsObserver.cpp \ 41 | SystemStatus.cpp 42 | 43 | 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 | -------------------------------------------------------------------------------- /rootdir/bin/init.btmac.sh: -------------------------------------------------------------------------------- 1 | #! /vendor/bin/sh 2 | # Copyright (c) 2019, The Linux Foundation. All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are 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 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 | LOG_TAG="SetBLUTMAC" 30 | logi () 31 | { 32 | /vendor/bin/log -t $LOG_TAG -p i "$@" 33 | } 34 | 35 | unset BLUTMAC 36 | BLUTMAC=`getprop sys.nvram.btmac` 37 | if [ -z "$BLUTMAC" ]; then 38 | logi "sys.nvram.btmac empty" 39 | else 40 | # convert to mac from nvram_btwifi to proper format 41 | final_blutmac=`echo $BLUTMAC | sed 's!^M$!!;s!\-!!g;s!\.!!g;s!\(..\)!\1:!g;s!:$!!'` 42 | # set the bt mac to new vendor prop 43 | setprop persist.vendor.service.bdroid.bdaddr $final_blutmac 44 | log_msg="dervied BLUTMAC | $final_blutmac" 45 | logi $log_msg 46 | fi 47 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /doze/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 47 | 48 | 49 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 32 | 33 | 34 | true 35 | 36 | 37 | true 38 | 39 | 40 | 10s,30s,60s,180s 41 | 42 | 43 | true 44 | 45 | 46 | 0 47 | 48 | -------------------------------------------------------------------------------- /system.prop: -------------------------------------------------------------------------------- 1 | # 2 | # system.prop for sdm660 3 | # 4 | 5 | # Bluetooth 6 | bt.max.hfpclient.connections=1 7 | vendor.bluetooth.soc=cherokee 8 | 9 | # Camera 10 | persist.vendor.camera.privapp.list=org.codeaurora.snapcam 11 | persist.camera.privapp.list=org.codeaurora.snapcam 12 | vendor.camera.aux.packagelist=org.codeaurora.snapcam 13 | 14 | # CNE 15 | persist.vendor.cne.feature=1 16 | 17 | # Data modules 18 | persist.data.df.dev_name=rmnet_usb0 19 | persist.vendor.data.mode=concurrent 20 | ro.vendor.use_data_netmgrd=true 21 | 22 | # Display 23 | vendor.display.enable_default_color_mode=1 24 | vendor.gralloc.enable_fb_ubwc=1 25 | vendor.display.disable_skip_validate=1 26 | 27 | # Display - Blur 28 | persist.sys.sf.disable_blurs=1 29 | ro.surface_flinger.supports_background_blur=1 30 | ro.sf.blurs_are_expensive=1 31 | 32 | # GPS 33 | persist.vendor.overlay.izat.optin=rro 34 | 35 | # Graphics 36 | debug.sf.disable_backpressure=1 37 | debug.sf.latch_unsignaled=1 38 | persist.demo.hdmirotationlock=false 39 | persist.hwc.enable_vds=1 40 | sdm.debug.disable_skip_validate=1 41 | 42 | # Media 43 | media.settings.xml=/vendor/etc/media_profiles_vendor.xml 44 | media.stagefright.thumbnail.prefer_hw_codecs=true 45 | vidc.enc.target_support_bframe=1 46 | vendor.vidc.enc.disable_bframes=1 47 | vendor.vidc.dec.enable.downscalar=1 48 | vendor.vidc.enc.disable.pq=true 49 | 50 | # Netflix 51 | ro.netflix.bsp_rev=Q660-13149-1 52 | 53 | # NFC 54 | ro.nfc.port=I2C 55 | 56 | # NTP Server 57 | persist.backup.ntpServer="0.pool.ntp.org" 58 | 59 | # QC framework value-adds 60 | ro.vendor.qti.va_aosp.support=1 61 | 62 | # RIL 63 | DEVICE_PROVISIONED=1 64 | persist.radio.VT_CAM_INTERFACE=2 65 | persist.sys.fflag.override.settings_network_and_internet_v2=true 66 | ril.subscription.types=NV,RUIM 67 | telephony.lteOnCdmaDevice=1 68 | 69 | # Surfaceflinger 70 | ro.surface_flinger.force_hwc_copy_for_virtual_displays=true 71 | ro.surface_flinger.max_virtual_display_dimension=4096 72 | ro.surface_flinger.vsync_event_phase_offset_ns=2000000 73 | ro.surface_flinger.vsync_sf_event_phase_offset_ns=6000000 74 | ro.surface_flinger.set_display_power_timer_ms=10000 75 | ro.surface_flinger.set_touch_timer_ms=5000 76 | ro.surface_flinger.set_idle_timer_ms=9000 77 | 78 | # Time 79 | persist.timed.enable=true 80 | 81 | # WiFi Display 82 | persist.debug.wfd.enable=1 83 | persist.sys.wfd.virtual=0 84 | 85 | # ADB 86 | persist.sys.usb.config=diag,adb 87 | sys.usb.config=diag,adb 88 | ro.adb.secure=0 89 | ro.secure=0 90 | ro.debuggable=1 91 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 37 | true 38 | 39 | 42 | 6 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /gps/android/1.0/GnssConfiguration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | 6 | /* Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | 22 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H 23 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H 24 | 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V1_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V1_0::IGnssConfiguration; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | /* 42 | * Interface for passing GNSS configuration info from platform to HAL. 43 | */ 44 | struct Gnss; 45 | struct GnssConfiguration : public IGnssConfiguration { 46 | GnssConfiguration(Gnss* gnss); 47 | ~GnssConfiguration() = default; 48 | 49 | /* 50 | * Methods from ::android::hardware::gnss::V1_0::IGnssConfiguration follow. 51 | * These declarations were generated from IGnssConfiguration.hal. 52 | */ 53 | Return setSuplVersion(uint32_t version) override; 54 | Return setSuplMode(uint8_t mode) override; 55 | Return setSuplEs(bool enabled) override; 56 | Return setLppProfile(uint8_t 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 | -------------------------------------------------------------------------------- /gps/android/1.0/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 | liblocbatterylistener_headers 33 | 34 | LOCAL_SHARED_LIBRARIES := \ 35 | liblog \ 36 | libhidlbase \ 37 | libcutils \ 38 | libutils \ 39 | android.hardware.gnss@1.0 \ 40 | android.hardware.health@1.0 \ 41 | android.hardware.health@2.0 \ 42 | android.hardware.power@1.2 \ 43 | libbase 44 | 45 | LOCAL_SHARED_LIBRARIES += \ 46 | libloc_core \ 47 | libgps.utils \ 48 | libdl \ 49 | liblocation_api \ 50 | 51 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 52 | LOCAL_STATIC_LIBRARIES := liblocbatterylistener 53 | LOCAL_STATIC_LIBRARIES += libhealthhalutils 54 | include $(BUILD_SHARED_LIBRARY) 55 | 56 | include $(CLEAR_VARS) 57 | LOCAL_MODULE := android.hardware.gnss@1.0-service-qti 58 | LOCAL_VINTF_FRAGMENTS := android.hardware.gnss@1.0-service-qti.xml 59 | LOCAL_VENDOR_MODULE := true 60 | LOCAL_MODULE_RELATIVE_PATH := hw 61 | LOCAL_INIT_RC := android.hardware.gnss@1.0-service-qti.rc 62 | LOCAL_SRC_FILES := \ 63 | service.cpp \ 64 | 65 | LOCAL_C_INCLUDES:= \ 66 | $(LOCAL_PATH)/location_api 67 | LOCAL_HEADER_LIBRARIES := \ 68 | libgps.utils_headers \ 69 | libloc_core_headers \ 70 | libloc_pla_headers \ 71 | liblocation_api_headers 72 | 73 | 74 | LOCAL_SHARED_LIBRARIES := \ 75 | liblog \ 76 | libcutils \ 77 | libdl \ 78 | libbase \ 79 | libutils \ 80 | libgps.utils \ 81 | libqti_vndfwk_detect \ 82 | 83 | LOCAL_SHARED_LIBRARIES += \ 84 | libhidlbase \ 85 | android.hardware.gnss@1.0 \ 86 | 87 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 88 | 89 | ifneq ($(LOC_HIDL_VERSION),) 90 | LOCAL_CFLAGS += -DLOC_HIDL_VERSION='"$(LOC_HIDL_VERSION)"' 91 | endif 92 | 93 | include $(BUILD_EXECUTABLE) 94 | -------------------------------------------------------------------------------- /gps/batching/configure.ac: -------------------------------------------------------------------------------- 1 | # configure.ac -- Autoconf script for gps location-batching 2 | # 3 | # Process this file with autoconf to produce a configure script 4 | 5 | # Requires autoconf tool later than 2.61 6 | AC_PREREQ(2.61) 7 | # Initialize the gps location-batching package version 1.0.0 8 | AC_INIT([location-batching],1.0.0) 9 | # Does not strictly follow GNU Coding standards 10 | AM_INIT_AUTOMAKE([foreign]) 11 | # Disables auto rebuilding of configure, Makefile.ins 12 | AM_MAINTAINER_MODE 13 | # Verifies the --srcdir is correct by checking for the path 14 | AC_CONFIG_SRCDIR([Makefile.am]) 15 | # defines some macros variable to be included by source 16 | AC_CONFIG_HEADERS([config.h]) 17 | AC_CONFIG_MACRO_DIR([m4]) 18 | 19 | # Checks for programs. 20 | AC_PROG_LIBTOOL 21 | AC_PROG_CXX 22 | AC_PROG_CC 23 | AM_PROG_CC_C_O 24 | AC_PROG_AWK 25 | AC_PROG_CPP 26 | AC_PROG_INSTALL 27 | AC_PROG_LN_S 28 | AC_PROG_MAKE_SET 29 | PKG_PROG_PKG_CONFIG 30 | 31 | # Checks for libraries. 32 | PKG_CHECK_MODULES([GPSUTILS], [gps-utils]) 33 | AC_SUBST([GPSUTILS_CFLAGS]) 34 | AC_SUBST([GPSUTILS_LIBS]) 35 | 36 | PKG_CHECK_MODULES([LOCCORE], [loc-core]) 37 | AC_SUBST([LOCCORE_CFLAGS]) 38 | AC_SUBST([LOCCORE_LIBS]) 39 | 40 | PKG_CHECK_MODULES([GEOFENCE], [location-geofence]) 41 | AC_SUBST([GEOFENCE_CFLAGS]) 42 | AC_SUBST([GEOFENCE_LIBS]) 43 | 44 | AC_ARG_WITH([locpla_includes], 45 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 46 | [specify the path to locpla-includes in loc-pla_git.bb]), 47 | [locpla_incdir=$withval], 48 | with_locpla_includes=no) 49 | 50 | if test "x$with_locpla_includes" != "xno"; then 51 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 52 | fi 53 | 54 | AC_ARG_WITH([glib], 55 | AC_HELP_STRING([--with-glib], 56 | [enable glib, building HLOS systems which use glib])) 57 | 58 | if (test "x${with_glib}" = "xyes"); then 59 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 60 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 61 | AC_MSG_ERROR(GThread >= 2.16 is required)) 62 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 63 | AC_MSG_ERROR(GLib >= 2.16 is required)) 64 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 65 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 66 | 67 | AC_SUBST(GLIB_CFLAGS) 68 | AC_SUBST(GLIB_LIBS) 69 | fi 70 | 71 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 72 | 73 | AC_CONFIG_FILES([ \ 74 | Makefile \ 75 | location-batching.pc 76 | ]) 77 | 78 | AC_OUTPUT 79 | -------------------------------------------------------------------------------- /gps/android/1.0/GnssNi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H 22 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H 23 | 24 | #include 25 | #include 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace gnss { 30 | namespace V1_0 { 31 | namespace implementation { 32 | 33 | using ::android::hardware::gnss::V1_0::IGnssNi; 34 | using ::android::hardware::gnss::V1_0::IGnssNiCallback; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | struct Gnss; 42 | struct GnssNi : public IGnssNi { 43 | GnssNi(Gnss* gnss); 44 | ~GnssNi() = default; 45 | 46 | /* 47 | * Methods from ::android::hardware::gnss::V1_0::IGnssNi follow. 48 | * These declarations were generated from IGnssNi.hal. 49 | */ 50 | Return setCallback(const sp& callback) override; 51 | Return respond(int32_t notifId, 52 | IGnssNiCallback::GnssUserResponseType userResponse) override; 53 | 54 | private: 55 | struct GnssNiDeathRecipient : hidl_death_recipient { 56 | GnssNiDeathRecipient(sp gnssNi) : mGnssNi(gnssNi) { 57 | } 58 | ~GnssNiDeathRecipient() = default; 59 | virtual void serviceDied(uint64_t cookie, const wp& who) override; 60 | sp mGnssNi; 61 | }; 62 | 63 | private: 64 | sp mGnssNiDeathRecipient = nullptr; 65 | sp mGnssNiCbIface = nullptr; 66 | Gnss* mGnss = nullptr; 67 | }; 68 | 69 | } // namespace implementation 70 | } // namespace V1_0 71 | } // namespace gnss 72 | } // namespace hardware 73 | } // namespace android 74 | 75 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H 76 | -------------------------------------------------------------------------------- /gps/android/1.1/GnssNi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSNI_H 22 | #define ANDROID_HARDWARE_GNSS_V1_1_GNSSNI_H 23 | 24 | #include 25 | #include 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace gnss { 30 | namespace V1_1 { 31 | namespace implementation { 32 | 33 | using ::android::hardware::gnss::V1_0::IGnssNi; 34 | using ::android::hardware::gnss::V1_0::IGnssNiCallback; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | struct Gnss; 42 | struct GnssNi : public IGnssNi { 43 | GnssNi(Gnss* gnss); 44 | ~GnssNi() = default; 45 | 46 | /* 47 | * Methods from ::android::hardware::gnss::V1_0::IGnssNi follow. 48 | * These declarations were generated from IGnssNi.hal. 49 | */ 50 | Return setCallback(const sp& callback) override; 51 | Return respond(int32_t notifId, 52 | IGnssNiCallback::GnssUserResponseType userResponse) override; 53 | 54 | private: 55 | struct GnssNiDeathRecipient : hidl_death_recipient { 56 | GnssNiDeathRecipient(sp gnssNi) : mGnssNi(gnssNi) { 57 | } 58 | ~GnssNiDeathRecipient() = default; 59 | virtual void serviceDied(uint64_t cookie, const wp& who) override; 60 | sp mGnssNi; 61 | }; 62 | 63 | private: 64 | sp mGnssNiDeathRecipient = nullptr; 65 | sp mGnssNiCbIface = nullptr; 66 | Gnss* mGnss = nullptr; 67 | }; 68 | 69 | } // namespace implementation 70 | } // namespace V1_1 71 | } // namespace gnss 72 | } // namespace hardware 73 | } // namespace android 74 | 75 | #endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSNI_H 76 | -------------------------------------------------------------------------------- /gps/android/2.0/GnssNi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_GNSSNI_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_GNSSNI_H 23 | 24 | #include 25 | #include 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace gnss { 30 | namespace V2_0 { 31 | namespace implementation { 32 | 33 | using ::android::hardware::gnss::V1_0::IGnssNi; 34 | using ::android::hardware::gnss::V1_0::IGnssNiCallback; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | struct Gnss; 42 | struct GnssNi : public IGnssNi { 43 | GnssNi(Gnss* gnss); 44 | ~GnssNi() = default; 45 | 46 | /* 47 | * Methods from ::android::hardware::gnss::V1_0::IGnssNi follow. 48 | * These declarations were generated from IGnssNi.hal. 49 | */ 50 | Return setCallback(const sp& callback) override; 51 | Return respond(int32_t notifId, 52 | IGnssNiCallback::GnssUserResponseType userResponse) override; 53 | 54 | private: 55 | struct GnssNiDeathRecipient : hidl_death_recipient { 56 | GnssNiDeathRecipient(sp gnssNi) : mGnssNi(gnssNi) { 57 | } 58 | ~GnssNiDeathRecipient() = default; 59 | virtual void serviceDied(uint64_t cookie, const wp& who) override; 60 | sp mGnssNi; 61 | }; 62 | 63 | private: 64 | sp mGnssNiDeathRecipient = nullptr; 65 | sp mGnssNiCbIface = nullptr; 66 | Gnss* mGnss = nullptr; 67 | }; 68 | 69 | } // namespace implementation 70 | } // namespace V2_0 71 | } // namespace gnss 72 | } // namespace hardware 73 | } // namespace android 74 | 75 | #endif // ANDROID_HARDWARE_GNSS_V2_0_GNSSNI_H 76 | -------------------------------------------------------------------------------- /gps/android/2.0/AGnss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_AGNSS_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_AGNSS_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V2_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::Return; 35 | using ::android::hardware::Void; 36 | using ::android::hardware::hidl_vec; 37 | using ::android::hardware::hidl_string; 38 | using ::android::sp; 39 | 40 | struct Gnss; 41 | struct AGnss : public V2_0::IAGnss { 42 | 43 | AGnss(Gnss* gnss); 44 | ~AGnss(); 45 | /* 46 | * Methods from ::android::hardware::gnss::V2_0::IAGnss interface follow. 47 | * These declarations were generated from IAGnss.hal. 48 | */ 49 | Return setCallback(const sp& callback) override; 50 | 51 | Return dataConnClosed() override; 52 | 53 | Return dataConnFailed() override; 54 | 55 | Return dataConnOpen(uint64_t networkHandle, const hidl_string& apn, 56 | V2_0::IAGnss::ApnIpType apnIpType) override; 57 | 58 | Return setServer(V2_0::IAGnssCallback::AGnssType type, 59 | const hidl_string& hostname, int32_t port) override; 60 | 61 | void statusCb(AGpsExtType type, LocAGpsStatusValue status); 62 | 63 | /* Data call setup callback passed down to GNSS HAL implementation */ 64 | static void agnssStatusIpV4Cb(AGnssExtStatusIpV4 status); 65 | 66 | private: 67 | Gnss* mGnss = nullptr; 68 | sp mAGnssCbIface = nullptr; 69 | }; 70 | 71 | } // namespace implementation 72 | } // namespace V2_0 73 | } // namespace gnss 74 | } // namespace hardware 75 | } // namespace android 76 | 77 | #endif // ANDROID_HARDWARE_GNSS_V2_0_AGNSS_H 78 | -------------------------------------------------------------------------------- /gps/android/1.1/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := android.hardware.gnss@1.1-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 | liblocbatterylistener_headers 33 | 34 | LOCAL_SHARED_LIBRARIES := \ 35 | liblog \ 36 | libhidlbase \ 37 | libcutils \ 38 | libutils \ 39 | android.hardware.gnss@1.0 \ 40 | android.hardware.gnss@1.1 \ 41 | android.hardware.health@1.0 \ 42 | android.hardware.health@2.0 \ 43 | android.hardware.power@1.2 \ 44 | libbase 45 | 46 | LOCAL_SHARED_LIBRARIES += \ 47 | libloc_core \ 48 | libgps.utils \ 49 | libdl \ 50 | liblocation_api \ 51 | 52 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 53 | LOCAL_STATIC_LIBRARIES := liblocbatterylistener 54 | LOCAL_STATIC_LIBRARIES += libhealthhalutils 55 | include $(BUILD_SHARED_LIBRARY) 56 | 57 | include $(CLEAR_VARS) 58 | LOCAL_MODULE := android.hardware.gnss@1.1-service-qti 59 | LOCAL_VINTF_FRAGMENTS := android.hardware.gnss@1.1-service-qti.xml 60 | LOCAL_VENDOR_MODULE := true 61 | LOCAL_MODULE_RELATIVE_PATH := hw 62 | LOCAL_INIT_RC := android.hardware.gnss@1.1-service-qti.rc 63 | LOCAL_SRC_FILES := \ 64 | service.cpp \ 65 | 66 | LOCAL_C_INCLUDES:= \ 67 | $(LOCAL_PATH)/location_api 68 | LOCAL_HEADER_LIBRARIES := \ 69 | libgps.utils_headers \ 70 | libloc_core_headers \ 71 | libloc_pla_headers \ 72 | liblocation_api_headers 73 | 74 | 75 | LOCAL_SHARED_LIBRARIES := \ 76 | liblog \ 77 | libcutils \ 78 | libdl \ 79 | libbase \ 80 | libutils \ 81 | libgps.utils \ 82 | libqti_vndfwk_detect \ 83 | 84 | LOCAL_SHARED_LIBRARIES += \ 85 | libhidlbase \ 86 | android.hardware.gnss@1.0 \ 87 | android.hardware.gnss@1.1 \ 88 | 89 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 90 | 91 | ifneq ($(LOC_HIDL_VERSION),) 92 | LOCAL_CFLAGS += -DLOC_HIDL_VERSION='"$(LOC_HIDL_VERSION)"' 93 | endif 94 | 95 | include $(BUILD_EXECUTABLE) 96 | -------------------------------------------------------------------------------- /extract-files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017-2020 The LineageOS Project 5 | # 6 | # SPDX-License-Identifier: Apache-2.0 7 | # 8 | 9 | set -e 10 | 11 | # Load extract_utils and do some sanity checks 12 | MY_DIR="${BASH_SOURCE%/*}" 13 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi 14 | 15 | ANDROID_ROOT="${MY_DIR}/../../.." 16 | 17 | HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh" 18 | if [ ! -f "${HELPER}" ]; then 19 | echo "Unable to find helper script at ${HELPER}" 20 | exit 1 21 | fi 22 | source "${HELPER}" 23 | 24 | # Default to sanitizing the vendor folder before extraction 25 | CLEAN_VENDOR=true 26 | 27 | ONLY_COMMON= 28 | ONLY_TARGET= 29 | KANG= 30 | SECTION= 31 | 32 | while [ "${#}" -gt 0 ]; do 33 | case "${1}" in 34 | --only-common ) 35 | ONLY_COMMON=true 36 | ;; 37 | --only-target ) 38 | ONLY_TARGET=true 39 | ;; 40 | -n | --no-cleanup ) 41 | CLEAN_VENDOR=false 42 | ;; 43 | -k | --kang ) 44 | KANG="--kang" 45 | ;; 46 | -s | --section ) 47 | SECTION="${2}"; shift 48 | CLEAN_VENDOR=false 49 | ;; 50 | * ) 51 | SRC="${1}" 52 | ;; 53 | esac 54 | shift 55 | done 56 | 57 | if [ -z "${SRC}" ]; then 58 | SRC="adb" 59 | fi 60 | 61 | function blob_fixup() { 62 | case "${1}" in 63 | 64 | # remove android.hidl.base dependency 65 | lib64/libfm-hci.so | lib/libfm-hci.so) 66 | "${PATCHELF}" --remove-needed "android.hidl.base@1.0.so" "${2}" 67 | ;; 68 | 69 | product/lib64/libdpmframework.so) 70 | "${PATCHELF}" --replace-needed "libcutils.so" "libcutils-v29.so" "${2}" 71 | "${PATCHELF}" --add-needed "libcutils.so" "${2}" 72 | ;; 73 | esac 74 | } 75 | 76 | if [ -z "${ONLY_TARGET}" ]; then 77 | # Initialize the helper for common device 78 | setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}" 79 | 80 | extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" 81 | fi 82 | 83 | if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then 84 | # Reinitialize the helper for device 85 | source "${MY_DIR}/../${DEVICE}/extract-files.sh" 86 | setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" 87 | 88 | extract "${MY_DIR}/../${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" 89 | fi 90 | 91 | "${MY_DIR}/setup-makefiles.sh" 92 | -------------------------------------------------------------------------------- /compatibility_matrix.xml: -------------------------------------------------------------------------------- 1 | 5 | 12 | 13 | 14 | android.frameworks.displayservice 15 | 1.0 16 | 17 | IDisplayService 18 | default 19 | 20 | 21 | 22 | android.frameworks.schedulerservice 23 | 1.0 24 | 25 | ISchedulingPolicyService 26 | default 27 | 28 | 29 | 30 | android.frameworks.sensorservice 31 | 1.0 32 | 33 | ISensorManager 34 | default 35 | 36 | 37 | 38 | android.hidl.manager 39 | 1.2 40 | 41 | IServiceManager 42 | default 43 | 44 | 45 | 46 | android.hidl.memory 47 | 1.0 48 | 49 | IMapper 50 | ashmem 51 | 52 | 53 | 54 | android.hidl.token 55 | 1.0 56 | 57 | ITokenManager 58 | default 59 | 60 | 61 | 62 | android.system.net.netd 63 | 1.1 64 | 65 | INetd 66 | default 67 | 68 | 69 | 70 | android.system.wifi.keystore 71 | 1.0 72 | 73 | IKeystore 74 | default 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /light/Light.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 Vyacheslav Vidanov (aka Anomalchik) 3 | * Copyright (C) 2018 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | #ifndef ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H 19 | #define ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H 20 | 21 | #include 22 | #include 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace light { 31 | namespace V2_0 { 32 | namespace implementation { 33 | 34 | struct Light : public ILight { 35 | Light(std::pair&& lcd_backlight, std::ofstream&& red_blink, 36 | std::ofstream&& red_led, std::ofstream&& green_blink, std::ofstream&& green_led); 37 | 38 | // Methods from ::android::hardware::light::V2_0::ILight follow. 39 | Return setLight(Type type, const LightState& state) override; 40 | Return getSupportedTypes(getSupportedTypes_cb _hidl_cb) override; 41 | 42 | private: 43 | void setAttentionLight(const LightState& state); 44 | void setBatteryLight(const LightState& state); 45 | void setButtonsBacklight(const LightState& state); 46 | void setLcdBacklight(const LightState& state); 47 | void setNotificationLight(const LightState& state); 48 | void setSpeakerBatteryLightLocked(); 49 | void setSpeakerLightLocked(const LightState& state); 50 | 51 | std::pair mLcdBacklight; 52 | 53 | // Red led 54 | std::ofstream mRedBlink; 55 | std::ofstream mRedLed; 56 | 57 | // Green led 58 | std::ofstream mGreenBlink; 59 | std::ofstream mGreenLed; 60 | 61 | LightState mAttentionState; 62 | LightState mBatteryState; 63 | LightState mNotificationState; 64 | 65 | std::unordered_map> mLights; 66 | std::mutex mLock; 67 | }; 68 | 69 | } // namespace implementation 70 | } // namespace V2_0 71 | } // namespace light 72 | } // namespace hardware 73 | } // namespace android 74 | 75 | #endif // ANDROID_HARDWARE_LIGHT_V2_0_LIGHT_H 76 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 24 | 1 25 | 26 | 27 | true 28 | 29 | 30 | true 31 | 32 | 35 | true 36 | 37 | 41 | true 42 | 43 | 44 | true 45 | 46 | 47 | org.codeaurora.ims 48 | 49 | 50 | org.codeaurora.ims 51 | 52 | -------------------------------------------------------------------------------- /rootdir/etc/fstab.qcom: -------------------------------------------------------------------------------- 1 | # Android fstab file. 2 | # The filesystem that contains the filesystem checker binary (typically /system) cannot 3 | # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK 4 | 5 | #TODO: Add 'check' as fs_mgr_flags with data partition. 6 | # Currently we dont have e2fsck compiled. So fs check would failed. 7 | 8 | # Non-A/B fstab.qcom variant 9 | # 10 | /dev/block/bootdevice/by-name/boot /boot emmc defaults defaults 11 | /dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults 12 | /dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,recoveryonly 13 | /dev/block/bootdevice/by-name/vendor /vendor ext4 ro,barrier=1 wait,recoveryonly 14 | /dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard,noatime,lazytime wait,check,fileencryption=ice,quota,reservedsize=128M 15 | /devices/soc/c084000.sdhci/mmc_host* auto auto defaults wait,voldmanaged=sdcard1:auto,encryptable=userdata 16 | /dev/block/bootdevice/by-name/misc /misc emmc defaults defaults 17 | /dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait 18 | /dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait 19 | /devices/soc/a800000.ssusb/a800000.dwc3/xhci-hcd.0.auto* auto auto defaults wait,voldmanaged=usbotg:auto 20 | /dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait 21 | /dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,barrier=1 wait 22 | /dev/block/bootdevice/by-name/cache /cache f2fs nosuid,nodev,noatime,inline_xattr,flush_merge,data_flush wait 23 | /dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait 24 | 25 | # ZRAM 26 | /dev/block/zram0 none swap defaults zramsize=2147483648,max_comp_streams=8 27 | -------------------------------------------------------------------------------- /gps/android/1.0/AGnss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_AGNSS_H 22 | #define ANDROID_HARDWARE_GNSS_V1_0_AGNSS_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V1_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V1_0::IAGnss; 35 | using ::android::hardware::gnss::V1_0::IAGnssCallback; 36 | using ::android::hardware::Return; 37 | using ::android::hardware::Void; 38 | using ::android::hardware::hidl_vec; 39 | using ::android::hardware::hidl_string; 40 | using ::android::sp; 41 | 42 | struct Gnss; 43 | struct AGnss : public IAGnss { 44 | 45 | AGnss(Gnss* gnss); 46 | ~AGnss(); 47 | /* 48 | * Methods from ::android::hardware::gnss::V1_0::IAGnss interface follow. 49 | * These declarations were generated from IAGnss.hal. 50 | */ 51 | Return setCallback(const sp& callback) override; 52 | 53 | Return dataConnClosed() override; 54 | 55 | Return dataConnFailed() override; 56 | 57 | Return dataConnOpen(const hidl_string& apn, 58 | IAGnss::ApnIpType apnIpType) override; 59 | 60 | Return setServer(IAGnssCallback::AGnssType type, 61 | const hidl_string& hostname, int32_t port) override; 62 | 63 | void statusIpV4Cb(AGnssExtStatusIpV4 status); 64 | 65 | /* Data call setup callback passed down to GNSS HAL implementation */ 66 | static void agnssStatusIpV4Cb(AGnssExtStatusIpV4 status); 67 | 68 | private: 69 | Gnss* mGnss = nullptr; 70 | sp mAGnssCbIface = nullptr; 71 | }; 72 | 73 | } // namespace implementation 74 | } // namespace V1_0 75 | } // namespace gnss 76 | } // namespace hardware 77 | } // namespace android 78 | 79 | #endif // ANDROID_HARDWARE_GNSS_V1_0_AGNSS_H 80 | -------------------------------------------------------------------------------- /gps/android/1.1/AGnss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V1_1_AGNSS_H 22 | #define ANDROID_HARDWARE_GNSS_V1_1_AGNSS_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V1_1 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V1_0::IAGnss; 35 | using ::android::hardware::gnss::V1_0::IAGnssCallback; 36 | using ::android::hardware::Return; 37 | using ::android::hardware::Void; 38 | using ::android::hardware::hidl_vec; 39 | using ::android::hardware::hidl_string; 40 | using ::android::sp; 41 | 42 | struct Gnss; 43 | struct AGnss : public IAGnss { 44 | 45 | AGnss(Gnss* gnss); 46 | ~AGnss(); 47 | /* 48 | * Methods from ::android::hardware::gnss::V1_0::IAGnss interface follow. 49 | * These declarations were generated from IAGnss.hal. 50 | */ 51 | Return setCallback(const sp& callback) override; 52 | 53 | Return dataConnClosed() override; 54 | 55 | Return dataConnFailed() override; 56 | 57 | Return dataConnOpen(const hidl_string& apn, 58 | IAGnss::ApnIpType apnIpType) override; 59 | 60 | Return setServer(IAGnssCallback::AGnssType type, 61 | const hidl_string& hostname, int32_t port) override; 62 | 63 | void statusIpV4Cb(AGnssExtStatusIpV4 status); 64 | 65 | /* Data call setup callback passed down to GNSS HAL implementation */ 66 | static void agnssStatusIpV4Cb(AGnssExtStatusIpV4 status); 67 | 68 | private: 69 | Gnss* mGnss = nullptr; 70 | sp mAGnssCbIface = nullptr; 71 | }; 72 | 73 | } // namespace implementation 74 | } // namespace V1_1 75 | } // namespace gnss 76 | } // namespace hardware 77 | } // namespace android 78 | 79 | #endif // ANDROID_HARDWARE_GNSS_V1_1_AGNSS_H 80 | -------------------------------------------------------------------------------- /gps/build/target_specific_features.mk: -------------------------------------------------------------------------------- 1 | GNSS_CFLAGS := \ 2 | -Werror \ 3 | -Wno-error=unused-parameter \ 4 | -Wno-error=macro-redefined \ 5 | -Wno-error=reorder \ 6 | -Wno-reorder-ctor \ 7 | -Wno-error=missing-braces \ 8 | -Wno-error=self-assign \ 9 | -Wno-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-undefined-bool-conversion \ 15 | -Wno-error=tautological-compare \ 16 | -Wno-error=switch \ 17 | -Wno-error=date-time 18 | 19 | LOCAL_SANITIZE := signed-integer-overflow, unsigned-integer-overflow 20 | 21 | # GPS-HIDL 22 | GNSS_HIDL_1_0_TARGET_LIST := msm8960 23 | GNSS_HIDL_1_0_TARGET_LIST += msm8974 24 | GNSS_HIDL_1_0_TARGET_LIST += msm8226 25 | GNSS_HIDL_1_0_TARGET_LIST += msm8610 26 | GNSS_HIDL_1_0_TARGET_LIST += apq8084 27 | GNSS_HIDL_1_0_TARGET_LIST += msm8916 28 | GNSS_HIDL_1_0_TARGET_LIST += msm8994 29 | GNSS_HIDL_1_0_TARGET_LIST += msm8909 30 | GNSS_HIDL_1_0_TARGET_LIST += msm8952 31 | GNSS_HIDL_1_0_TARGET_LIST += msm8992 32 | GNSS_HIDL_1_0_TARGET_LIST += msm8996 33 | GNSS_HIDL_2_0_TARGET_LIST := msm8937 34 | GNSS_HIDL_2_0_TARGET_LIST += msm8953 35 | GNSS_HIDL_2_0_TARGET_LIST += msm8998 36 | GNSS_HIDL_2_0_TARGET_LIST += apq8098_latv 37 | GNSS_HIDL_2_0_TARGET_LIST += sdm710 38 | GNSS_HIDL_2_0_TARGET_LIST += qcs605 39 | GNSS_HIDL_2_0_TARGET_LIST += sdm845 40 | GNSS_HIDL_2_0_TARGET_LIST += sdm660 41 | GNSS_HIDL_2_0_TARGET_LIST += msmnile 42 | GNSS_HIDL_2_0_TARGET_LIST += $(MSMSTEPPE) 43 | GNSS_HIDL_2_0_TARGET_LIST += $(TRINKET) 44 | GNSS_HIDL_2_0_TARGET_LIST += kona 45 | GNSS_HIDL_2_0_TARGET_LIST += atoll 46 | GNSS_HIDL_2_0_TARGET_LIST += lito 47 | GNSS_HIDL_2_0_TARGET_LIST += bengal 48 | 49 | ifneq (,$(filter $(GNSS_HIDL_2_0_TARGET_LIST),$(TARGET_BOARD_PLATFORM))) 50 | GNSS_HIDL_VERSION = 2.0 51 | endif 52 | ifneq (,$(filter $(GNSS_HIDL_1_0_TARGET_LIST),$(TARGET_BOARD_PLATFORM))) 53 | GNSS_HIDL_VERSION = 1.0 54 | endif 55 | ifneq (,$(filter $(GNSS_HIDL_1_1_TARGET_LIST),$(TARGET_BOARD_PLATFORM))) 56 | GNSS_HIDL_VERSION = 1.1 57 | endif 58 | 59 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST := msm8937 60 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += msm8953 61 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += msm8998 62 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += apq8098_latv 63 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += sdm710 64 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += qcs605 65 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += sdm845 66 | GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST += sdm660 67 | 68 | ifneq (,$(filter $(GNSS_HIDL_LEGACY_MEASURMENTS_TARGET_LIST),$(TARGET_BOARD_PLATFORM))) 69 | GNSS_HIDL_LEGACY_MEASURMENTS = true 70 | endif 71 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc313-mnc100/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 30 | 31 | 32 | 33 | "0" 34 | "00" 35 | "*0" 36 | "*1" 37 | "*2" 38 | "*3" 39 | "*4" 40 | "*5" 41 | "*6" 42 | "*7" 43 | "*8" 44 | "*9" 45 | "#0" 46 | "#1" 47 | "#2" 48 | "#3" 49 | "#4" 50 | "#5" 51 | "#6" 52 | "#7" 53 | "#8" 54 | "#9" 55 | 56 | 57 | -------------------------------------------------------------------------------- /gps/android/1.0/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/android/1.1/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_1 { 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_1 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/configure.ac: -------------------------------------------------------------------------------- 1 | # configure.ac -- Autoconf script for gps loc_hal 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-hal],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 | PKG_CHECK_MODULES([LOCCORE], [loc-core]) 37 | AC_SUBST([LOCCORE_CFLAGS]) 38 | AC_SUBST([LOCCORE_LIBS]) 39 | 40 | AC_ARG_WITH([core_includes], 41 | AC_HELP_STRING([--with-core-includes=@<:@dir@:>@], 42 | [Specify the location of the core headers]), 43 | [core_incdir=$withval], 44 | with_core_includes=no) 45 | 46 | if test "x$with_core_includes" != "xno"; then 47 | CPPFLAGS="${CPPFLAGS} -I${core_incdir}" 48 | fi 49 | 50 | AC_ARG_WITH([locpla_includes], 51 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 52 | [specify the path to locpla-includes in loc-pla_git.bb]), 53 | [locpla_incdir=$withval], 54 | with_locpla_includes=no) 55 | 56 | if test "x$with_locpla_includes" != "xno"; then 57 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 58 | fi 59 | 60 | AC_SUBST([CPPFLAGS]) 61 | 62 | AC_ARG_WITH([glib], 63 | AC_HELP_STRING([--with-glib], 64 | [enable glib, building HLOS systems which use glib])) 65 | 66 | if (test "x${with_glib}" = "xyes"); then 67 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 68 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 69 | AC_MSG_ERROR(GThread >= 2.16 is required)) 70 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 71 | AC_MSG_ERROR(GLib >= 2.16 is required)) 72 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 73 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 74 | 75 | AC_SUBST(GLIB_CFLAGS) 76 | AC_SUBST(GLIB_LIBS) 77 | fi 78 | 79 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 80 | 81 | AC_CONFIG_FILES([ \ 82 | Makefile \ 83 | gnss/Makefile \ 84 | loc-hal.pc \ 85 | ]) 86 | 87 | AC_OUTPUT 88 | -------------------------------------------------------------------------------- /gps/android/1.0/GnssNi.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 "LocSvc_GnssNiInterface" 22 | 23 | #include 24 | #include "Gnss.h" 25 | #include "GnssNi.h" 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace gnss { 30 | namespace V1_0 { 31 | namespace implementation { 32 | 33 | void GnssNi::GnssNiDeathRecipient::serviceDied(uint64_t cookie, const wp& who) { 34 | LOC_LOGE("%s] service died. cookie: %llu, who: %p", 35 | __FUNCTION__, static_cast(cookie), &who); 36 | // we do nothing here 37 | // Gnss::GnssDeathRecipient will stop the session 38 | } 39 | 40 | GnssNi::GnssNi(Gnss* gnss) : mGnss(gnss) { 41 | mGnssNiDeathRecipient = new GnssNiDeathRecipient(this); 42 | } 43 | 44 | // Methods from ::android::hardware::gnss::V1_0::IGnssNi follow. 45 | Return GnssNi::setCallback(const sp& callback) { 46 | if (mGnss == nullptr) { 47 | LOC_LOGE("%s]: mGnss is nullptr", __FUNCTION__); 48 | return Void(); 49 | } 50 | 51 | mGnss->setGnssNiCb(callback); 52 | 53 | if (mGnssNiCbIface != nullptr) { 54 | mGnssNiCbIface->unlinkToDeath(mGnssNiDeathRecipient); 55 | } 56 | mGnssNiCbIface = callback; 57 | if (mGnssNiCbIface != nullptr) { 58 | mGnssNiCbIface->linkToDeath(mGnssNiDeathRecipient, 0 /*cookie*/); 59 | } 60 | 61 | return Void(); 62 | } 63 | 64 | Return GnssNi::respond(int32_t notifId, IGnssNiCallback::GnssUserResponseType userResponse) { 65 | if (mGnss == nullptr) { 66 | LOC_LOGE("%s]: mGnss is nullptr", __FUNCTION__); 67 | return Void(); 68 | } 69 | 70 | GnssAPIClient* api = mGnss->getApi(); 71 | if (api == nullptr) { 72 | LOC_LOGE("%s]: api is nullptr", __FUNCTION__); 73 | return Void(); 74 | } 75 | 76 | api->gnssNiRespond(notifId, userResponse); 77 | 78 | return Void(); 79 | } 80 | 81 | } // namespace implementation 82 | } // namespace V1_0 83 | } // namespace gnss 84 | } // namespace hardware 85 | } // namespace android 86 | -------------------------------------------------------------------------------- /gps/android/1.1/GnssNi.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 "LocSvc_GnssNiInterface" 22 | 23 | #include 24 | #include "Gnss.h" 25 | #include "GnssNi.h" 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace gnss { 30 | namespace V1_1 { 31 | namespace implementation { 32 | 33 | void GnssNi::GnssNiDeathRecipient::serviceDied(uint64_t cookie, const wp& who) { 34 | LOC_LOGE("%s] service died. cookie: %llu, who: %p", 35 | __FUNCTION__, static_cast(cookie), &who); 36 | // we do nothing here 37 | // Gnss::GnssDeathRecipient will stop the session 38 | } 39 | 40 | GnssNi::GnssNi(Gnss* gnss) : mGnss(gnss) { 41 | mGnssNiDeathRecipient = new GnssNiDeathRecipient(this); 42 | } 43 | 44 | // Methods from ::android::hardware::gnss::V1_0::IGnssNi follow. 45 | Return GnssNi::setCallback(const sp& callback) { 46 | if (mGnss == nullptr) { 47 | LOC_LOGE("%s]: mGnss is nullptr", __FUNCTION__); 48 | return Void(); 49 | } 50 | 51 | mGnss->setGnssNiCb(callback); 52 | 53 | if (mGnssNiCbIface != nullptr) { 54 | mGnssNiCbIface->unlinkToDeath(mGnssNiDeathRecipient); 55 | } 56 | mGnssNiCbIface = callback; 57 | if (mGnssNiCbIface != nullptr) { 58 | mGnssNiCbIface->linkToDeath(mGnssNiDeathRecipient, 0 /*cookie*/); 59 | } 60 | 61 | return Void(); 62 | } 63 | 64 | Return GnssNi::respond(int32_t notifId, IGnssNiCallback::GnssUserResponseType userResponse) { 65 | if (mGnss == nullptr) { 66 | LOC_LOGE("%s]: mGnss is nullptr", __FUNCTION__); 67 | return Void(); 68 | } 69 | 70 | GnssAPIClient* api = mGnss->getApi(); 71 | if (api == nullptr) { 72 | LOC_LOGE("%s]: api is nullptr", __FUNCTION__); 73 | return Void(); 74 | } 75 | 76 | api->gnssNiRespond(notifId, userResponse); 77 | 78 | return Void(); 79 | } 80 | 81 | } // namespace implementation 82 | } // namespace V1_1 83 | } // namespace gnss 84 | } // namespace hardware 85 | } // namespace android 86 | -------------------------------------------------------------------------------- /gps/android/2.0/GnssNi.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #define LOG_TAG "LocSvc_GnssNiInterface" 22 | 23 | #include 24 | #include "Gnss.h" 25 | #include "GnssNi.h" 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace gnss { 30 | namespace V2_0 { 31 | namespace implementation { 32 | 33 | void GnssNi::GnssNiDeathRecipient::serviceDied(uint64_t cookie, const wp& who) { 34 | LOC_LOGE("%s] service died. cookie: %llu, who: %p", 35 | __FUNCTION__, static_cast(cookie), &who); 36 | // we do nothing here 37 | // Gnss::GnssDeathRecipient will stop the session 38 | } 39 | 40 | GnssNi::GnssNi(Gnss* gnss) : mGnss(gnss) { 41 | mGnssNiDeathRecipient = new GnssNiDeathRecipient(this); 42 | } 43 | 44 | // Methods from ::android::hardware::gnss::V1_0::IGnssNi follow. 45 | Return GnssNi::setCallback(const sp& callback) { 46 | if (mGnss == nullptr) { 47 | LOC_LOGE("%s]: mGnss is nullptr", __FUNCTION__); 48 | return Void(); 49 | } 50 | 51 | mGnss->setGnssNiCb(callback); 52 | 53 | if (mGnssNiCbIface != nullptr) { 54 | mGnssNiCbIface->unlinkToDeath(mGnssNiDeathRecipient); 55 | } 56 | mGnssNiCbIface = callback; 57 | if (mGnssNiCbIface != nullptr) { 58 | mGnssNiCbIface->linkToDeath(mGnssNiDeathRecipient, 0 /*cookie*/); 59 | } 60 | 61 | return Void(); 62 | } 63 | 64 | Return GnssNi::respond(int32_t notifId, IGnssNiCallback::GnssUserResponseType userResponse) { 65 | if (mGnss == nullptr) { 66 | LOC_LOGE("%s]: mGnss is nullptr", __FUNCTION__); 67 | return Void(); 68 | } 69 | 70 | GnssAPIClient* api = mGnss->getApi(); 71 | if (api == nullptr) { 72 | LOC_LOGE("%s]: api is nullptr", __FUNCTION__); 73 | return Void(); 74 | } 75 | 76 | api->gnssNiRespond(notifId, userResponse); 77 | 78 | return Void(); 79 | } 80 | 81 | } // namespace implementation 82 | } // namespace V2_0 83 | } // namespace gnss 84 | } // namespace hardware 85 | } // namespace android 86 | -------------------------------------------------------------------------------- /rro_overlays/TetheringOverlay/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 26 | false 27 | 28 | 31 | 32 | "usb\\d" 33 | "rndis\\d" 34 | 35 | 36 | 39 | 40 | "wlan\\d" 41 | 42 | 43 | 46 | 47 | "p2p\\d" 48 | 49 | 50 | 53 | 54 | "bt-pan" 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /gps/utils/loc_log.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2012, 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 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_LOG_H 31 | #define LOC_LOG_H 32 | 33 | #ifdef __cplusplus 34 | extern "C" 35 | { 36 | #endif 37 | 38 | #include 39 | #include 40 | #include "loc_target.h" 41 | 42 | typedef struct 43 | { 44 | const char *name; 45 | long val; 46 | } loc_name_val_s_type; 47 | 48 | #define NAME_VAL(x) {"" #x "", x } 49 | 50 | #define UNKNOWN_STR "UNKNOWN" 51 | 52 | #define CHECK_MASK(type, value, mask_var, mask) \ 53 | (((mask_var) & (mask)) ? (type) (value) : (type) (-1)) 54 | 55 | #define LOC_TABLE_SIZE(table) (sizeof(table)/sizeof((table)[0])) 56 | 57 | /* Get names from value */ 58 | const char* loc_get_name_from_mask(const loc_name_val_s_type table[], size_t table_size, long mask); 59 | const char* loc_get_name_from_val(const loc_name_val_s_type table[], size_t table_size, long value); 60 | const char* loc_get_msg_q_status(int status); 61 | const char* loc_get_target_name(unsigned int target); 62 | 63 | extern const char* log_succ_fail_string(int is_succ); 64 | 65 | extern char *loc_get_time(char *time_string, size_t buf_size); 66 | 67 | #ifdef __cplusplus 68 | } 69 | #endif 70 | 71 | #endif /* LOC_LOG_H */ 72 | -------------------------------------------------------------------------------- /gps/android/1.0/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.0-service-qti" 22 | 23 | #include 24 | #include 25 | #include "loc_cfg.h" 26 | #include "loc_misc_utils.h" 27 | 28 | extern "C" { 29 | #include "vndfwk-detect.h" 30 | } 31 | 32 | #ifdef ARCH_ARM_32 33 | #define DEFAULT_HW_BINDER_MEM_SIZE 65536 34 | #endif 35 | 36 | using android::hardware::gnss::V1_0::IGnss; 37 | 38 | using android::hardware::configureRpcThreadpool; 39 | using android::hardware::registerPassthroughServiceImplementation; 40 | using android::hardware::joinRpcThreadpool; 41 | 42 | using android::status_t; 43 | using android::OK; 44 | 45 | typedef int vendorEnhancedServiceMain(int /* argc */, char* /* argv */ []); 46 | 47 | int main() { 48 | 49 | ALOGI("%s", __FUNCTION__); 50 | 51 | int vendorInfo = getVendorEnhancedInfo(); 52 | bool vendorEnhanced = ( 1 == vendorInfo || 3 == vendorInfo ); 53 | setVendorEnhanced(vendorEnhanced); 54 | 55 | #ifdef ARCH_ARM_32 56 | android::hardware::ProcessState::initWithMmapSize((size_t)(DEFAULT_HW_BINDER_MEM_SIZE)); 57 | #endif 58 | configureRpcThreadpool(1, true); 59 | status_t status; 60 | 61 | status = registerPassthroughServiceImplementation(); 62 | if (status == OK) { 63 | if (vendorEnhanced) { 64 | #ifdef LOC_HIDL_VERSION 65 | #define VENDOR_ENHANCED_LIB "vendor.qti.gnss@" LOC_HIDL_VERSION "-service.so" 66 | 67 | void* libHandle = NULL; 68 | vendorEnhancedServiceMain* vendorEnhancedMainMethod = (vendorEnhancedServiceMain*) 69 | dlGetSymFromLib(libHandle, VENDOR_ENHANCED_LIB, "main"); 70 | if (NULL != vendorEnhancedMainMethod) { 71 | (*vendorEnhancedMainMethod)(0, NULL); 72 | } 73 | #else 74 | ALOGE("LOC_HIDL_VERSION not defined."); 75 | #endif 76 | } 77 | 78 | joinRpcThreadpool(); 79 | 80 | } else { 81 | ALOGE("Error while registering IGnss 1.0 service: %d", status); 82 | } 83 | 84 | return 0; 85 | } 86 | -------------------------------------------------------------------------------- /gps/android/1.1/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 | #include "loc_cfg.h" 26 | #include "loc_misc_utils.h" 27 | 28 | extern "C" { 29 | #include "vndfwk-detect.h" 30 | } 31 | 32 | #ifdef ARCH_ARM_32 33 | #define DEFAULT_HW_BINDER_MEM_SIZE 65536 34 | #endif 35 | 36 | using android::hardware::gnss::V1_1::IGnss; 37 | 38 | using android::hardware::configureRpcThreadpool; 39 | using android::hardware::registerPassthroughServiceImplementation; 40 | using android::hardware::joinRpcThreadpool; 41 | 42 | using android::status_t; 43 | using android::OK; 44 | 45 | typedef int vendorEnhancedServiceMain(int /* argc */, char* /* argv */ []); 46 | 47 | int main() { 48 | 49 | ALOGI("%s", __FUNCTION__); 50 | 51 | int vendorInfo = getVendorEnhancedInfo(); 52 | bool vendorEnhanced = ( 1 == vendorInfo || 3 == vendorInfo ); 53 | setVendorEnhanced(vendorEnhanced); 54 | 55 | #ifdef ARCH_ARM_32 56 | android::hardware::ProcessState::initWithMmapSize((size_t)(DEFAULT_HW_BINDER_MEM_SIZE)); 57 | #endif 58 | configureRpcThreadpool(1, true); 59 | status_t status; 60 | 61 | status = registerPassthroughServiceImplementation(); 62 | if (status == OK) { 63 | if (vendorEnhanced) { 64 | #ifdef LOC_HIDL_VERSION 65 | #define VENDOR_ENHANCED_LIB "vendor.qti.gnss@" LOC_HIDL_VERSION "-service.so" 66 | 67 | void* libHandle = NULL; 68 | vendorEnhancedServiceMain* vendorEnhancedMainMethod = (vendorEnhancedServiceMain*) 69 | dlGetSymFromLib(libHandle, VENDOR_ENHANCED_LIB, "main"); 70 | if (NULL != vendorEnhancedMainMethod) { 71 | (*vendorEnhancedMainMethod)(0, NULL); 72 | } 73 | #else 74 | ALOGE("LOC_HIDL_VERSION not defined."); 75 | #endif 76 | } 77 | 78 | joinRpcThreadpool(); 79 | 80 | } else { 81 | ALOGE("Error while registering IGnss 1.1 service: %d", status); 82 | } 83 | 84 | return 0; 85 | } 86 | -------------------------------------------------------------------------------- /gps/android/2.0/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #define LOG_TAG "android.hardware.gnss@2.0-service-qti" 22 | 23 | #include 24 | #include 25 | #include "loc_cfg.h" 26 | #include "loc_misc_utils.h" 27 | 28 | extern "C" { 29 | #include "vndfwk-detect.h" 30 | } 31 | 32 | #ifdef ARCH_ARM_32 33 | #define DEFAULT_HW_BINDER_MEM_SIZE 65536 34 | #endif 35 | 36 | using android::hardware::gnss::V2_0::IGnss; 37 | 38 | using android::hardware::configureRpcThreadpool; 39 | using android::hardware::registerPassthroughServiceImplementation; 40 | using android::hardware::joinRpcThreadpool; 41 | 42 | using android::status_t; 43 | using android::OK; 44 | 45 | typedef int vendorEnhancedServiceMain(int /* argc */, char* /* argv */ []); 46 | 47 | int main() { 48 | 49 | ALOGI("%s", __FUNCTION__); 50 | 51 | int vendorInfo = getVendorEnhancedInfo(); 52 | bool vendorEnhanced = ( 1 == vendorInfo || 3 == vendorInfo ); 53 | setVendorEnhanced(vendorEnhanced); 54 | 55 | #ifdef ARCH_ARM_32 56 | android::hardware::ProcessState::initWithMmapSize((size_t)(DEFAULT_HW_BINDER_MEM_SIZE)); 57 | #endif 58 | configureRpcThreadpool(1, true); 59 | status_t status; 60 | 61 | status = registerPassthroughServiceImplementation(); 62 | if (status == OK) { 63 | if (vendorEnhanced) { 64 | #ifdef LOC_HIDL_VERSION 65 | #define VENDOR_ENHANCED_LIB "vendor.qti.gnss@" LOC_HIDL_VERSION "-service.so" 66 | 67 | void* libHandle = NULL; 68 | vendorEnhancedServiceMain* vendorEnhancedMainMethod = (vendorEnhancedServiceMain*) 69 | dlGetSymFromLib(libHandle, VENDOR_ENHANCED_LIB, "main"); 70 | if (NULL != vendorEnhancedMainMethod) { 71 | (*vendorEnhancedMainMethod)(0, NULL); 72 | } 73 | #else 74 | ALOGE("LOC_HIDL_VERSION not defined."); 75 | #endif 76 | } 77 | 78 | joinRpcThreadpool(); 79 | 80 | } else { 81 | ALOGE("Error while registering IGnss 2.0 service: %d", status); 82 | } 83 | 84 | return 0; 85 | } 86 | -------------------------------------------------------------------------------- /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 | #include 45 | #include 46 | #include 47 | 48 | #define UID_GPS (AID_GPS) 49 | #define GID_GPS (AID_GPS) 50 | #define UID_LOCCLIENT (4021) 51 | #define GID_LOCCLIENT (4021) 52 | 53 | #define LOC_PATH_GPS_CONF_STR "/vendor/etc/gps.conf" 54 | #define LOC_PATH_IZAT_CONF_STR "/vendor/etc/izat.conf" 55 | #define LOC_PATH_FLP_CONF_STR "/vendor/etc/flp.conf" 56 | #define LOC_PATH_LOWI_CONF_STR "/vendor/etc/lowi.conf" 57 | #define LOC_PATH_SAP_CONF_STR "/vendor/etc/sap.conf" 58 | #define LOC_PATH_APDR_CONF_STR "/vendor/etc/apdr.conf" 59 | #define LOC_PATH_XTWIFI_CONF_STR "/vendor/etc/xtwifi.conf" 60 | #define LOC_PATH_QUIPC_CONF_STR "/vendor/etc/quipc.conf" 61 | 62 | #ifdef __cplusplus 63 | } 64 | #endif /*__cplusplus */ 65 | 66 | #endif /* __LOC_PLA__ */ 67 | --------------------------------------------------------------------------------