├── .clang-format ├── Android.bp ├── Android.mk ├── AndroidProducts.mk ├── BoardConfig.mk ├── README.md ├── arrow.dependencies ├── arrow_violet.mk ├── bluetooth └── include │ └── bdroid_buildcfg.h ├── board-info.txt ├── camera ├── Android.bp └── megvii_shim.cpp ├── configs ├── audio │ ├── audio_effects.xml │ ├── audio_io_policy.conf │ ├── audio_platform_info_intcodec.xml │ ├── audio_policy_configuration.xml │ ├── mixer_paths_idp.xml │ ├── sound_trigger_mixer_paths.xml │ └── sound_trigger_platform_info.xml ├── config.fs ├── excluded-input-devices.xml ├── gps │ ├── apdr.conf │ ├── flp.conf │ ├── gnss_antenna_info.conf │ ├── gps.conf │ ├── izat.conf │ ├── lowi.conf │ └── sap.conf ├── hidl │ ├── compatibility_matrix.xml │ ├── manifest.xml │ └── manifest_odm.xml ├── idc │ ├── uinput-fpc.idc │ └── uinput-goodix.idc ├── keylayout │ ├── sm6150-idp-snd-card_Button_Jack.kl │ ├── uinput-fpc.kl │ └── uinput-goodix.kl ├── media │ ├── media_codecs_performance_sdmmagpie_v1.xml │ ├── media_codecs_vendor_audio.xml │ ├── media_codecs_vendor_sdmmagpie_v1.xml │ └── media_profiles.xml ├── msm_irqbalance.conf ├── permissions │ ├── qti_whitelist.xml │ └── system_ext-privapp-permissions-qti.xml ├── power │ └── powerhint.json ├── public.libraries.txt ├── security │ └── sec_config └── wifi │ ├── WCNSS_qcom_cfg.ini │ ├── p2p_supplicant_overlay.conf │ └── wpa_supplicant_overlay.conf ├── device.mk ├── extract-files.sh ├── gps ├── Android.bp ├── Android.mk ├── CleanSpec.mk ├── android │ ├── 2.1 │ │ ├── AGnss.cpp │ │ ├── AGnss.h │ │ ├── AGnssRil.cpp │ │ ├── AGnssRil.h │ │ ├── Android.mk │ │ ├── Gnss.cpp │ │ ├── Gnss.h │ │ ├── GnssAntennaInfo.cpp │ │ ├── GnssAntennaInfo.h │ │ ├── GnssBatching.cpp │ │ ├── GnssBatching.h │ │ ├── GnssConfiguration.cpp │ │ ├── GnssConfiguration.h │ │ ├── GnssDebug.cpp │ │ ├── GnssDebug.h │ │ ├── GnssGeofencing.cpp │ │ ├── GnssGeofencing.h │ │ ├── GnssMeasurement.cpp │ │ ├── GnssMeasurement.h │ │ ├── GnssNi.cpp │ │ ├── GnssNi.h │ │ ├── GnssVisibilityControl.cpp │ │ ├── GnssVisibilityControl.h │ │ ├── MeasurementCorrections.cpp │ │ ├── MeasurementCorrections.h │ │ ├── android.hardware.gnss@2.1-service-qti.rc │ │ ├── android.hardware.gnss@2.1-service-qti.xml │ │ ├── location_api │ │ │ ├── BatchingAPIClient.cpp │ │ │ ├── BatchingAPIClient.h │ │ │ ├── GeofenceAPIClient.cpp │ │ │ ├── GeofenceAPIClient.h │ │ │ ├── GnssAPIClient.cpp │ │ │ ├── GnssAPIClient.h │ │ │ ├── LocationUtil.cpp │ │ │ ├── LocationUtil.h │ │ │ ├── MeasurementAPIClient.cpp │ │ │ └── MeasurementAPIClient.h │ │ └── service.cpp │ ├── Android.mk │ └── utils │ │ ├── Android.bp │ │ ├── battery_listener.cpp │ │ └── battery_listener.h ├── batching │ ├── Android.bp │ ├── BatchingAdapter.cpp │ ├── BatchingAdapter.h │ ├── Makefile.am │ ├── configure.ac │ ├── location-batching.pc.in │ └── location_batching.cpp ├── core │ ├── Android.bp │ ├── ContextBase.cpp │ ├── ContextBase.h │ ├── EngineHubProxyBase.h │ ├── LBSProxyBase.h │ ├── LocAdapterBase.cpp │ ├── LocAdapterBase.h │ ├── LocAdapterProxyBase.h │ ├── LocApiBase.cpp │ ├── LocApiBase.h │ ├── LocContext.cpp │ ├── LocContext.h │ ├── Makefile.am │ ├── SystemStatus.cpp │ ├── SystemStatus.h │ ├── SystemStatusOsObserver.cpp │ ├── SystemStatusOsObserver.h │ ├── configure.ac │ ├── data-items │ │ ├── DataItemConcreteTypesBase.h │ │ ├── DataItemId.h │ │ ├── DataItemsFactoryProxy.cpp │ │ ├── DataItemsFactoryProxy.h │ │ └── IDataItemCore.h │ ├── loc-core.pc.in │ ├── loc_core_log.cpp │ ├── loc_core_log.h │ └── observer │ │ ├── IDataItemObserver.h │ │ ├── IDataItemSubscription.h │ │ ├── IFrameworkActionReq.h │ │ └── IOsObserver.h ├── etc │ ├── Android.bp │ └── seccomp_policy │ │ ├── gnss@2.0-base.policy │ │ ├── gnss@2.0-xtra-daemon.policy │ │ ├── gnss@2.0-xtwifi-client.policy │ │ └── gnss@2.0-xtwifi-inet-agent.policy ├── geofence │ ├── Android.bp │ ├── GeofenceAdapter.cpp │ ├── GeofenceAdapter.h │ ├── Makefile.am │ ├── configure.ac │ ├── location-geofence.pc.in │ └── location_geofence.cpp ├── gnss │ ├── Agps.cpp │ ├── Agps.h │ ├── Android.bp │ ├── GnssAdapter.cpp │ ├── GnssAdapter.h │ ├── Makefile.am │ ├── NativeAgpsHandler.cpp │ ├── NativeAgpsHandler.h │ ├── XtraSystemStatusObserver.cpp │ ├── XtraSystemStatusObserver.h │ └── location_gnss.cpp ├── location │ ├── Android.bp │ ├── ILocationAPI.h │ ├── LocationAPI.cpp │ ├── LocationAPI.h │ ├── LocationAPIClientBase.cpp │ ├── LocationAPIClientBase.h │ ├── LocationDataTypes.h │ ├── Makefile.am │ ├── configure.ac │ ├── location-api.pc.in │ └── location_interface.h ├── pla │ ├── Android.bp │ ├── android │ │ └── loc_pla.h │ └── oe │ │ └── loc_pla.h └── utils │ ├── Android.bp │ ├── LocHeap.cpp │ ├── LocHeap.h │ ├── LocIpc.cpp │ ├── LocIpc.h │ ├── LocLoggerBase.h │ ├── LocSharedLock.h │ ├── LocThread.cpp │ ├── LocThread.h │ ├── LocTimer.cpp │ ├── LocTimer.h │ ├── LocUnorderedSetMap.h │ ├── LogBuffer.cpp │ ├── LogBuffer.h │ ├── Makefile.am │ ├── MsgTask.cpp │ ├── MsgTask.h │ ├── SkipList.h │ ├── configure.ac │ ├── gps-utils.pc.in │ ├── gps_extended.h │ ├── gps_extended_c.h │ ├── linked_list.c │ ├── linked_list.h │ ├── loc_cfg.cpp │ ├── loc_cfg.h │ ├── loc_gps.h │ ├── loc_log.cpp │ ├── loc_log.h │ ├── loc_misc_utils.cpp │ ├── loc_misc_utils.h │ ├── loc_nmea.cpp │ ├── loc_nmea.h │ ├── loc_target.cpp │ ├── loc_target.h │ ├── loc_timer.h │ ├── log_util.h │ ├── msg_q.c │ └── msg_q.h ├── libqti-perfd-client ├── Android.bp └── client.c ├── odm.prop ├── overlay ├── frameworks │ └── base │ │ ├── core │ │ └── res │ │ │ └── res │ │ │ ├── values │ │ │ ├── config.xml │ │ │ └── dimens.xml │ │ │ └── xml │ │ │ └── power_profile.xml │ │ └── packages │ │ ├── SettingsLib │ │ └── res │ │ │ ├── values-en-rAU │ │ │ └── strings.xml │ │ │ ├── values-en-rCA │ │ │ └── strings.xml │ │ │ ├── values-en-rGB │ │ │ └── strings.xml │ │ │ ├── values-en-rIN │ │ │ └── strings.xml │ │ │ ├── values-en-rXC │ │ │ └── strings.xml │ │ │ └── values │ │ │ ├── config.xml │ │ │ └── strings.xml │ │ ├── SettingsProvider │ │ └── res │ │ │ └── values │ │ │ ├── config.xml │ │ │ └── defaults.xml │ │ └── SystemUI │ │ ├── res-keyguard │ │ ├── values-en-rAU │ │ │ └── strings.xml │ │ ├── values-en-rCA │ │ │ └── strings.xml │ │ ├── values-en-rGB │ │ │ └── strings.xml │ │ ├── values-en-rIN │ │ │ └── strings.xml │ │ ├── values-en-rXC │ │ │ └── strings.xml │ │ └── values │ │ │ └── strings.xml │ │ └── res │ │ ├── drawable │ │ └── rounded.xml │ │ ├── values-en-rAU │ │ └── strings.xml │ │ ├── values-en-rCA │ │ └── strings.xml │ │ ├── values-en-rGB │ │ └── strings.xml │ │ ├── values-en-rIN │ │ └── strings.xml │ │ ├── values-en-rXC │ │ └── strings.xml │ │ └── values │ │ ├── config.xml │ │ ├── dimens.xml │ │ └── strings.xml └── packages │ ├── apps │ └── Settings │ │ └── res │ │ └── values │ │ └── bools.xml │ └── services │ └── Telephony │ └── res │ └── values │ └── config.xml ├── parts ├── Android.bp ├── AndroidManifest.xml ├── proguard.flags ├── res │ ├── drawable │ │ ├── ic_doze_aod.xml │ │ ├── ic_doze_hand.xml │ │ ├── ic_doze_pickup.xml │ │ ├── ic_doze_pocket.xml │ │ ├── ic_doze_settings.xml │ │ ├── ic_doze_wake.xml │ │ ├── ic_fps.xml │ │ ├── ic_headphone.xml │ │ ├── ic_preset.xml │ │ ├── ic_thermal_benchmark.xml │ │ ├── ic_thermal_browser.xml │ │ ├── ic_thermal_camera.xml │ │ ├── ic_thermal_default.xml │ │ ├── ic_thermal_dialer.xml │ │ ├── ic_thermal_gaming.xml │ │ ├── ic_thermal_settings.xml │ │ └── ic_thermal_streaming.xml │ ├── layout │ │ ├── thermal_layout.xml │ │ └── thermal_list_item.xml │ ├── raw │ │ └── clear_speaker_sound.mp3 │ ├── values-ar-rSA │ │ └── strings.xml │ ├── values-as-rIN │ │ └── strings.xml │ ├── values-az-rAZ │ │ └── strings.xml │ ├── values-be-rBY │ │ └── strings.xml │ ├── values-bg-rBG │ │ └── strings.xml │ ├── values-bn-rBD │ │ └── strings.xml │ ├── values-bs-rBA │ │ └── strings.xml │ ├── values-ca-rES │ │ └── strings.xml │ ├── values-cs-rCZ │ │ └── strings.xml │ ├── values-da-rDK │ │ └── strings.xml │ ├── values-de-rDE │ │ └── strings.xml │ ├── values-el-rGR │ │ └── strings.xml │ ├── values-es-rES │ │ └── strings.xml │ ├── values-es-rMX │ │ └── strings.xml │ ├── values-et-rEE │ │ └── strings.xml │ ├── values-eu-rES │ │ └── strings.xml │ ├── values-fa-rIR │ │ └── strings.xml │ ├── values-fi-rFI │ │ └── strings.xml │ ├── values-fr-rFR │ │ └── strings.xml │ ├── values-gl-rES │ │ └── strings.xml │ ├── values-gu-rIN │ │ └── strings.xml │ ├── values-ha-rHG │ │ └── strings.xml │ ├── values-hi-rIN │ │ └── strings.xml │ ├── values-hr-rHR │ │ └── strings.xml │ ├── values-hu-rHU │ │ └── strings.xml │ ├── values-hy-rAM │ │ └── strings.xml │ ├── values-in-rID │ │ └── strings.xml │ ├── values-it-rIT │ │ └── strings.xml │ ├── values-iw-rIL │ │ └── strings.xml │ ├── values-ja-rJP │ │ └── strings.xml │ ├── values-ka-rGE │ │ └── strings.xml │ ├── values-kk-rKZ │ │ └── strings.xml │ ├── values-km-rKH │ │ └── strings.xml │ ├── values-kn-rIN │ │ └── strings.xml │ ├── values-ko-rKR │ │ └── strings.xml │ ├── values-lt-rLT │ │ └── strings.xml │ ├── values-lv-rLV │ │ └── strings.xml │ ├── values-mk-rMK │ │ └── strings.xml │ ├── values-ml-rIN │ │ └── strings.xml │ ├── values-mr-rIN │ │ └── strings.xml │ ├── values-ms-rMY │ │ └── strings.xml │ ├── values-mt-rMT │ │ └── strings.xml │ ├── values-my-rMM │ │ └── strings.xml │ ├── values-nb-rNO │ │ └── strings.xml │ ├── values-ne-rIN │ │ └── strings.xml │ ├── values-ne-rNP │ │ └── strings.xml │ ├── values-nl-rNL │ │ └── strings.xml │ ├── values-or-rIN │ │ └── strings.xml │ ├── values-pa-rIN │ │ └── strings.xml │ ├── values-pl-rPL │ │ └── strings.xml │ ├── values-pt-rBR │ │ └── strings.xml │ ├── values-pt-rPT │ │ └── strings.xml │ ├── values-ro-rRO │ │ └── strings.xml │ ├── values-ru-rRU │ │ └── strings.xml │ ├── values-sk-rSK │ │ └── strings.xml │ ├── values-sl-rSI │ │ └── strings.xml │ ├── values-sq-rAL │ │ └── strings.xml │ ├── values-sr-rSP │ │ └── strings.xml │ ├── values-sv-rSE │ │ └── strings.xml │ ├── values-ta-rIN │ │ └── strings.xml │ ├── values-te-rIN │ │ └── strings.xml │ ├── values-th-rTH │ │ └── strings.xml │ ├── values-tr-rTR │ │ └── strings.xml │ ├── values-uk-rUA │ │ └── strings.xml │ ├── values-ur-rIN │ │ └── strings.xml │ ├── values-ur-rPK │ │ └── strings.xml │ ├── values-uz-rUZ │ │ └── strings.xml │ ├── values-vi-rVN │ │ └── strings.xml │ ├── values-zh-rCN │ │ └── strings.xml │ ├── values-zh-rHK │ │ └── strings.xml │ ├── values-zh-rSG │ │ └── strings.xml │ ├── values-zh-rTW │ │ └── strings.xml │ ├── values │ │ ├── arrays.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── xml │ │ ├── clear_speaker_settings.xml │ │ ├── dirac_settings.xml │ │ └── doze_settings.xml └── src │ └── org │ └── lineageos │ └── settings │ ├── BootCompletedReceiver.java │ ├── dirac │ ├── DiracActivity.java │ ├── DiracSettingsFragment.java │ ├── DiracSound.java │ ├── DiracTileService.java │ └── DiracUtils.java │ ├── doze │ ├── DozeService.java │ ├── DozeSettingsActivity.java │ ├── DozeSettingsFragment.java │ ├── DozeUtils.java │ ├── PickupSensor.java │ └── ProximitySensor.java │ ├── fpsinfo │ ├── FPSInfoService.java │ └── FPSTileService.java │ ├── speaker │ ├── ClearSpeakerActivity.java │ └── ClearSpeakerFragment.java │ ├── thermal │ ├── ThermalActivity.java │ ├── ThermalService.java │ ├── ThermalSettingsFragment.java │ └── ThermalUtils.java │ └── utils │ └── FileUtils.java ├── power └── power-mode.cpp ├── proprietary-files.txt ├── recovery ├── Android.bp └── recovery_updater.cpp ├── releasetools.py ├── rootdir ├── Android.mk ├── bin │ ├── init.qcom.post_boot.sh │ └── init.qcom.sh └── etc │ ├── fstab.qcom │ ├── init.qcom.rc │ ├── init.qcom.usb.rc │ ├── init.recovery.qcom.rc │ ├── init.target.rc │ └── ueventd.rc ├── rro_overlays ├── CarrierConfigOverlay │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ │ └── xml │ │ └── vendor.xml └── WifiOverlay │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ └── values │ └── config.xml ├── sepolicy └── vendor │ ├── adsprpcd.te │ ├── device.te │ ├── dontaudit.te │ ├── file.te │ ├── file_contexts │ ├── genfs_contexts │ ├── hal_audio_default.te │ ├── hal_bluetooth_default.te │ ├── hal_camera_default.te │ ├── hal_fingerprint_default.te │ ├── hal_ir_default.te │ ├── hal_power_default.te │ ├── hal_sensors_default.te │ ├── hwservice_contexts │ ├── init.te │ ├── kernel.te │ ├── mi_thermald.te │ ├── priv_app.te │ ├── property_contexts │ ├── radio.te │ ├── remosaic_daemon.te │ ├── rild.te │ ├── sensors.te │ ├── system_app.te │ ├── tee.te │ ├── toolbox.te │ ├── uncrypt.te │ ├── vendor_init.te │ ├── vendor_qti_init_shell.te │ ├── vendor_toolbox.te │ ├── vndservice_contexts │ └── wcnss_service.te ├── setup-makefiles.sh ├── system.prop ├── update-sha1sums.py └── vendor.prop /.clang-format: -------------------------------------------------------------------------------- 1 | ../../../build/soong/scripts/system-clang-format -------------------------------------------------------------------------------- /Android.bp: -------------------------------------------------------------------------------- 1 | soong_namespace { 2 | imports: [ 3 | "hardware/google/interfaces", 4 | "hardware/google/pixel", 5 | "hardware/xiaomi", 6 | ], 7 | } 8 | -------------------------------------------------------------------------------- /AndroidProducts.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2020-2021 Wave-OS 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 | PRODUCT_MAKEFILES := \ 16 | $(LOCAL_DIR)/arrow_violet.mk 17 | 18 | COMMON_LUNCH_CHOICES := \ 19 | arrow_violet-user \ 20 | arrow_violet-userdebug \ 21 | arrow_violet-eng 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | The Xiaomi Redmi Note 7 Pro (codenamed _"violet"_) is a mid range smartphone from Xiaomi. 2 | 3 | It was announced in February 2019 and released in March 2019. 4 | 5 | ## Device specifications 6 | 7 | | Device | Xiaomi Redmi Note 7 Pro | 8 | | -----------: | :---------------------------------------------- | 9 | | SoC | Qualcomm SM6150 Snapdragon 675 | 10 | | CPU | 2 x 2 GHz Kryo 460 & 6 x 1.2 GHz Kryo 460 | 11 | | GPU | Adreno 612 | 12 | | Memory | 4GB / 6GB RAM (LPDDR4X) | 13 | | Shipped Android version | 9.0 with MIUI 10 | 14 | | Storage | 64GB / 128GB eMMC 5.1 flash storage | 15 | | Battery | Non-removable Li-Po 4000 mAh | 16 | | Dimensions | 159.21 x 75.21 x 8.1 mm | 17 | | Display | 2340 x 1080 (19.5:9), 6.3 inch | 18 | | Rear Camera 1 | 48MP, 1.6-micron pixels, f/1.79 Dual LED flash | 19 | | Rear Camera 2 | 5 MP, 1.12-micron pixels, f/2.2 | 20 | | Front Camera | 13 MP, 1.12-micron pixels, f/2.0 | 21 | 22 | ## Device picture 23 | 24 | ![Xiaomi Redmi Note 7 Pro](https://moven.bg/img/cms/Redmi%20note%207/5.jpg) 25 | 26 | Copyright (C) 2020-2021 Wave-OS 27 | -------------------------------------------------------------------------------- /arrow.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository" : "android_vendor_xiaomi_violet", 4 | "target_path": "vendor/xiaomi/violet" 5 | }, 6 | { 7 | "repository" : "android_kernel_xiaomi_violet", 8 | "target_path": "kernel/xiaomi/violet" 9 | }, 10 | { 11 | "repository" : "android_packages_apps_GCamGOPrebuilt", 12 | "target_path": "packages/apps/GCamGOPrebuilt" 13 | }, 14 | { 15 | "repository" : "android_hardware_xiaomi", 16 | "target_path": "hardware/xiaomi" 17 | } 18 | ] 19 | -------------------------------------------------------------------------------- /arrow_violet.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2020-2021 Wave-OS 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 | # Inherit from those products. Most specific first. 16 | $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) 17 | $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) 18 | 19 | # Inherit from violet device 20 | $(call inherit-product, device/xiaomi/violet/device.mk) 21 | 22 | # Inherit some common ArrowOS stuff. 23 | $(call inherit-product, vendor/arrow/config/common.mk) 24 | 25 | PRODUCT_NAME := arrow_violet 26 | PRODUCT_DEVICE := violet 27 | PRODUCT_BRAND := Xiaomi 28 | PRODUCT_MODEL := Redmi Note 7 Pro 29 | PRODUCT_MANUFACTURER := Xiaomi 30 | 31 | PRODUCT_BUILD_PROP_OVERRIDES += \ 32 | PRIVATE_BUILD_DESC="violet-user 10 QKQ1.190915.002 V12.5.1.0.QFHCNXM release-keys" \ 33 | PRODUCT_NAME="violet" 34 | 35 | PRODUCT_GMS_CLIENTID_BASE := android-xiaomi 36 | 37 | # ArrowOS additions 38 | DEVICE_MAINTAINER := raghavt20 39 | -------------------------------------------------------------------------------- /bluetooth/include/bdroid_buildcfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2013, The Linux Foundation. All rights reserved. 4 | * Not a Contribution, Apache license notifications and license are retained 5 | * for attribution purposes only. 6 | * 7 | * Copyright (C) 2012 The Android Open Source Project 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #ifndef _BDROID_BUILDCFG_H 23 | #define _BDROID_BUILDCFG_H 24 | 25 | // Disables read remote device feature 26 | #define MAX_ACL_CONNECTIONS 16 27 | #define MAX_L2CAP_CHANNELS 16 28 | #define BLE_VND_INCLUDED TRUE 29 | 30 | /* Increasing SEPs to 12 from 6 to support SHO/MCast i.e. two streams per codec */ 31 | #define AVDT_NUM_SEPS 12 32 | #endif 33 | -------------------------------------------------------------------------------- /board-info.txt: -------------------------------------------------------------------------------- 1 | require version-baseband-CN=4.3.c2-00029,V11.0.1.0.QFHCNXM 2 | require version-baseband-INDIA=4.3.c2-00029,V12.0.0.2.QFHINXM 3 | -------------------------------------------------------------------------------- /camera/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2020 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_library_shared { 17 | name: "libshim_megvii", 18 | 19 | proprietary: true, 20 | srcs: ["megvii_shim.cpp"], 21 | } 22 | -------------------------------------------------------------------------------- /camera/megvii_shim.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2020 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | namespace android { 18 | extern "C" void mg_facepp() {} 19 | } 20 | -------------------------------------------------------------------------------- /configs/excluded-input-devices.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /configs/gps/flp.conf: -------------------------------------------------------------------------------- 1 | ################################### 2 | ##### FLP settings ##### 3 | ################################### 4 | 5 | ################################### 6 | # FLP BATCH SIZE 7 | ################################### 8 | # The number of batched locations 9 | # requested to modem. The desired number 10 | # defined below may not be satisfied, as 11 | # the modem can only return the number 12 | # of batched locations that can be allocated, 13 | # which is limited by memory. The default 14 | # batch size defined as 20 as below. 15 | BATCH_SIZE=20 16 | 17 | ################################### 18 | # FLP OUTDOOR TRIP BATCH SIZE 19 | ################################### 20 | # The number of batched locations 21 | # requested to modem for outdoor 22 | # trip batching. The desired number 23 | # defined below may not be satisfied, as 24 | # the modem can only return the number 25 | # of batched locations that can be allocated, 26 | # which is limited by memory. The default 27 | # trip batch size defined as 600 as below. 28 | OUTDOOR_TRIP_BATCH_SIZE=600 29 | 30 | ################################### 31 | # FLP BATCHING SESSION TIMEOUT 32 | ################################### 33 | # Duration with which batch session timeout 34 | # happens in milliseconds. If not specified 35 | # or set to zero, batching session timeout 36 | # defaults to 20 seconds by the modem. 37 | # BATCH_SESSION_TIMEOUT=20000 38 | 39 | ################################### 40 | # FLP BATCHING ACCURACY 41 | ################################### 42 | # Set to one of the defined values below 43 | # to define the accuracy of batching. 44 | # If not specified, accuracy defaults 45 | # to LOW. 46 | # FLP BATCHING ACCURACY values: 47 | # Low accuracy = 0 48 | # Medium accuracy = 1 49 | # High accuracy = 2 50 | ACCURACY=1 51 | 52 | #################################### 53 | # By default if network fixes are not sensor assisted 54 | # these fixes must be dropped. This parameter adds an exception 55 | # for targets where there is no PDR and we still want to 56 | # report out network fixes 57 | # 0: MUST NOT ALLOW NETWORK FIXES 58 | # 1: ALLOW NETWORK FIXES 59 | #################################### 60 | ALLOW_NETWORK_FIXES = 0 61 | -------------------------------------------------------------------------------- /configs/gps/lowi.conf: -------------------------------------------------------------------------------- 1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | # 3 | # LOWI Config file - default 4 | # 5 | # GENERAL DESCRIPTION 6 | # This file contains the config params for LOWI 7 | # 8 | # Copyright (c) 2019 Qualcomm Technologies, Inc. 9 | # All Rights Reserved. 10 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 11 | # 12 | # 2012-2013 Qualcomm Atheros, Inc. 13 | # All Rights Reserved. 14 | # Qualcomm Atheros Confidential and Proprietary. 15 | # 16 | # Export of this technology or software is regulated by the U.S. Government. 17 | # Diversion contrary to U.S. law prohibited. 18 | #=============================================================================*/ 19 | 20 | # X86 ONLY - UBUNTU: 21 | # Copy this file in the same directory where the executable is 22 | 23 | # Log level 24 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 25 | LOWI_LOG_LEVEL = 4 26 | LOWI_USE_LOWI_LP = 0 27 | 28 | -------------------------------------------------------------------------------- /configs/hidl/compatibility_matrix.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.frameworks.schedulerservice 4 | 1.0 5 | 6 | ISchedulingPolicyService 7 | default 8 | 9 | 10 | 11 | android.frameworks.sensorservice 12 | 1.0 13 | 14 | ISensorManager 15 | default 16 | 17 | 18 | 19 | android.hidl.allocator 20 | 1.0 21 | 22 | IAllocator 23 | ashmem 24 | 25 | 26 | 27 | android.hidl.manager 28 | 1.0 29 | 30 | IServiceManager 31 | default 32 | 33 | 34 | 35 | android.hidl.memory 36 | 1.0 37 | 38 | IMapper 39 | ashmem 40 | 41 | 42 | 43 | android.hidl.token 44 | 1.0 45 | 46 | ITokenManager 47 | default 48 | 49 | 50 | 51 | android.system.wifi.keystore 52 | 1.0 53 | 54 | IKeystore 55 | default 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /configs/hidl/manifest_odm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.hardware.sensors 4 | hwbinder 5 | 2.0 6 | 7 | ISensors 8 | default 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /configs/idc/uinput-fpc.idc: -------------------------------------------------------------------------------- 1 | # 2 | # FPC1020 Touch sensor driver 3 | # 4 | # Copyright (c) 2013,2014 Fingerprint Cards AB 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License Version 2 8 | # as published by the Free Software Foundation. 9 | # 10 | 11 | device.internal = 1 12 | 13 | keyboard.layout = uinput-fpc 14 | keyboard.builtIn = 1 15 | keyboard.orientationAware = 1 16 | -------------------------------------------------------------------------------- /configs/idc/uinput-goodix.idc: -------------------------------------------------------------------------------- 1 | # 2 | # FPC1020 Touch sensor driver 3 | # 4 | # Copyright (c) 2013,2014 Fingerprint Cards AB 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License Version 2 8 | # as published by the Free Software Foundation. 9 | # 10 | 11 | device.internal = 1 12 | 13 | keyboard.layout = uinput-gf 14 | keyboard.builtIn = 1 15 | keyboard.orientationAware = 1 16 | -------------------------------------------------------------------------------- /configs/keylayout/sm6150-idp-snd-card_Button_Jack.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | key 226 HEADSETHOOK 29 | key 257 VOLUME_UP 30 | key 258 VOLUME_DOWN 31 | -------------------------------------------------------------------------------- /configs/keylayout/uinput-fpc.kl: -------------------------------------------------------------------------------- 1 | # 2 | # FPC1020 Touch sensor driver 3 | # 4 | # Copyright (c) 2013,2014 Fingerprint Cards AB 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License Version 2 8 | # as published by the Free Software Foundation. 9 | # 10 | 11 | #key 96 DPAD_CENTER 12 | #key 102 HOME 13 | #key 105 DPAD_LEFT 14 | #key 106 DPAD_RIGHT 15 | -------------------------------------------------------------------------------- /configs/keylayout/uinput-goodix.kl: -------------------------------------------------------------------------------- 1 | # 2 | # Goodix fingerprint sensor driver 3 | # 4 | # Copyright (c) 2013,2014 Fingerprint Cards AB 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License Version 2 8 | # as published by the Free Software Foundation. 9 | # 10 | #key 96 DPAD_CENTER 11 | #key 96 DPAD_CENTER 12 | #key 102 HOME 13 | #key 105 DPAD_LEFT 14 | #key 106 DPAD_RIGHT 15 | -------------------------------------------------------------------------------- /configs/media/media_codecs_vendor_audio.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /configs/msm_irqbalance.conf: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # 28 | # 29 | 30 | PRIO=1,1,1,1,0,0,0,0 31 | #arch_timer, arm-pmu, arch_mem_timer, msm_drm, kgsl-3d0 32 | IGNORED_IRQ=19,21,38,115,332 33 | -------------------------------------------------------------------------------- /configs/permissions/qti_whitelist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /configs/permissions/system_ext-privapp-permissions-qti.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 22 | 23 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /configs/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libadsprpc.so 2 | libalAILDC.so 3 | libalCFR.so 4 | libalhLDC.so 5 | libcdsprpc.so 6 | libHalSuperSensorServer.so 7 | libOpenCL.so 8 | libsdsprpc.so 9 | libSuperSensorCPU.so 10 | libSuperSensor.so 11 | libVDClearShot.so 12 | libVDSuperPhotoAPI.so 13 | -------------------------------------------------------------------------------- /configs/wifi/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_no_group_iface=1 3 | persistent_reconnect=1 4 | bss_max_count=400 5 | -------------------------------------------------------------------------------- /configs/wifi/wpa_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_disabled=1 3 | tdls_external_control=1 4 | wowlan_triggers=magic_pkt 5 | bss_max_count=400 6 | interworking=1 7 | config_methods=virtual_display virtual_push_button keypad 8 | driver_param="no_rrm=1" 9 | -------------------------------------------------------------------------------- /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 | DEVICE=violet 12 | VENDOR=xiaomi 13 | 14 | # Load extract_utils and do some sanity checks 15 | MY_DIR="${BASH_SOURCE%/*}" 16 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi 17 | 18 | ANDROID_ROOT="${MY_DIR}/../../.." 19 | 20 | HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh" 21 | if [ ! -f "${HELPER}" ]; then 22 | echo "Unable to find helper script at ${HELPER}" 23 | exit 1 24 | fi 25 | source "${HELPER}" 26 | 27 | # Default to sanitizing the vendor folder before extraction 28 | CLEAN_VENDOR=true 29 | 30 | KANG= 31 | SECTION= 32 | 33 | while [ "${#}" -gt 0 ]; do 34 | case "${1}" in 35 | -n | --no-cleanup ) 36 | CLEAN_VENDOR=false 37 | ;; 38 | -k | --kang ) 39 | KANG="--kang" 40 | ;; 41 | -s | --section ) 42 | SECTION="${2}"; shift 43 | CLEAN_VENDOR=false 44 | ;; 45 | * ) 46 | SRC="${1}" 47 | ;; 48 | esac 49 | shift 50 | done 51 | 52 | if [ -z "${SRC}" ]; then 53 | SRC="adb" 54 | fi 55 | 56 | function blob_fixup() { 57 | case "${1}" in 58 | vendor/lib64/hw/camera.qcom.so) 59 | patchelf --remove-needed "libMegviiFacepp-0.5.2.so" "${2}" 60 | patchelf --remove-needed "libmegface.so" "${2}" 61 | patchelf --add-needed "libshim_megvii.so" "${2}" 62 | ;; 63 | vendor/lib64/libvendor.goodix.hardware.interfaces.biometrics.fingerprint@2.1.so) 64 | patchelf --remove-needed "libhidlbase.so" "${2}" 65 | sed -i "s/libhidltransport.so/libhidlbase-v32.so\x00/" "${2}" 66 | ;; 67 | esac 68 | } 69 | 70 | # Initialize the helper 71 | setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" 72 | 73 | extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" 74 | 75 | "${MY_DIR}/setup-makefiles.sh" 76 | -------------------------------------------------------------------------------- /gps/Android.bp: -------------------------------------------------------------------------------- 1 | GNSS_CFLAGS = [ 2 | "-Werror", 3 | "-Wno-error=unused-parameter", 4 | "-Wno-error=macro-redefined", 5 | "-Wno-error=reorder", 6 | "-Wno-error=missing-braces", 7 | "-Wno-error=self-assign", 8 | "-Wno-error=enum-conversion", 9 | "-Wno-error=logical-op-parentheses", 10 | "-Wno-error=null-arithmetic", 11 | "-Wno-error=null-conversion", 12 | "-Wno-error=parentheses-equality", 13 | "-Wno-error=undefined-bool-conversion", 14 | "-Wno-error=tautological-compare", 15 | "-Wno-error=switch", 16 | "-Wno-error=date-time", 17 | ] 18 | 19 | /* Activate the following for debug purposes only, 20 | comment out for production */ 21 | GNSS_SANITIZE_DIAG = { 22 | /* 23 | diag: { 24 | cfi: true, 25 | misc_undefined: [ 26 | "bounds", 27 | "null", 28 | "unreachable", 29 | "integer", 30 | ], 31 | }, 32 | */ 33 | } 34 | -------------------------------------------------------------------------------- /gps/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | 3 | # Set required flags 4 | GNSS_CFLAGS := \ 5 | -Werror \ 6 | -Wno-error=unused-parameter \ 7 | -Wno-error=macro-redefined \ 8 | -Wno-error=reorder \ 9 | -Wno-error=missing-braces \ 10 | -Wno-error=self-assign \ 11 | -Wno-error=enum-conversion \ 12 | -Wno-error=logical-op-parentheses \ 13 | -Wno-error=null-arithmetic \ 14 | -Wno-error=null-conversion \ 15 | -Wno-error=parentheses-equality \ 16 | -Wno-error=undefined-bool-conversion \ 17 | -Wno-error=tautological-compare \ 18 | -Wno-error=switch \ 19 | -Wno-error=date-time 20 | 21 | LOCAL_PATH := $(call my-dir) 22 | include $(call all-makefiles-under,$(LOCAL_PATH)) 23 | 24 | GNSS_SANITIZE_DIAG := cfi bounds null unreachable integer address 25 | 26 | endif # ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 27 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /gps/android/2.1/AGnss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_AGNSS_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_AGNSS_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V2_1 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::Return; 35 | using ::android::hardware::Void; 36 | using ::android::hardware::hidl_vec; 37 | using ::android::hardware::hidl_string; 38 | using ::android::sp; 39 | using ::android::hardware::gnss::V2_0::IAGnssCallback; 40 | 41 | struct Gnss; 42 | struct AGnss : public V2_0::IAGnss { 43 | 44 | AGnss(Gnss* gnss); 45 | ~AGnss(); 46 | /* 47 | * Methods from ::android::hardware::gnss::V2_0::IAGnss interface follow. 48 | * These declarations were generated from IAGnss.hal. 49 | */ 50 | Return setCallback(const sp& callback) override; 51 | 52 | Return dataConnClosed() override; 53 | 54 | Return dataConnFailed() override; 55 | 56 | Return dataConnOpen(uint64_t networkHandle, const hidl_string& apn, 57 | V2_0::IAGnss::ApnIpType apnIpType) override; 58 | 59 | Return setServer(V2_0::IAGnssCallback::AGnssType type, 60 | const hidl_string& hostname, int32_t port) override; 61 | 62 | void statusCb(AGpsExtType type, LocAGpsStatusValue status); 63 | 64 | /* Data call setup callback passed down to GNSS HAL implementation */ 65 | static void agnssStatusIpV4Cb(AGnssExtStatusIpV4 status); 66 | 67 | private: 68 | Gnss* mGnss = nullptr; 69 | sp mAGnssCbIface = nullptr; 70 | 71 | AGpsExtType mType; 72 | }; 73 | 74 | } // namespace implementation 75 | } // namespace V2_1 76 | } // namespace gnss 77 | } // namespace hardware 78 | } // namespace android 79 | 80 | #endif // ANDROID_HARDWARE_GNSS_V2_0_AGNSS_H 81 | -------------------------------------------------------------------------------- /gps/android/2.1/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 23 | 24 | 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V2_1 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V2_0::IGnssDebug; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | /* Interface for GNSS Debug support. */ 42 | struct Gnss; 43 | struct GnssDebug : public IGnssDebug { 44 | GnssDebug(Gnss* gnss); 45 | ~GnssDebug() {}; 46 | 47 | // Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow 48 | Return getDebugData(getDebugData_cb _hidl_cb) override; 49 | // Methods from ::android::hardware::gnss::V2_0::IGnssDebug follow. 50 | Return getDebugData_2_0(getDebugData_2_0_cb _hidl_cb) override; 51 | 52 | private: 53 | Gnss* mGnss = nullptr; 54 | }; 55 | 56 | } // namespace implementation 57 | } // namespace V2_1 58 | } // namespace gnss 59 | } // namespace hardware 60 | } // namespace android 61 | 62 | #endif // ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 63 | -------------------------------------------------------------------------------- /gps/android/2.1/GnssNi.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #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_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 V2_1 83 | } // namespace gnss 84 | } // namespace hardware 85 | } // namespace android 86 | -------------------------------------------------------------------------------- /gps/android/2.1/GnssNi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_GNSSNI_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_GNSSNI_H 23 | 24 | #include 25 | #include 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace gnss { 30 | namespace V2_1 { 31 | namespace implementation { 32 | 33 | using ::android::hardware::gnss::V1_0::IGnssNi; 34 | using ::android::hardware::gnss::V1_0::IGnssNiCallback; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | struct Gnss; 42 | struct GnssNi : public IGnssNi { 43 | GnssNi(Gnss* gnss); 44 | ~GnssNi() = default; 45 | 46 | /* 47 | * Methods from ::android::hardware::gnss::V1_0::IGnssNi follow. 48 | * These declarations were generated from IGnssNi.hal. 49 | */ 50 | Return setCallback(const sp& callback) override; 51 | Return respond(int32_t notifId, 52 | IGnssNiCallback::GnssUserResponseType userResponse) override; 53 | 54 | private: 55 | struct GnssNiDeathRecipient : hidl_death_recipient { 56 | GnssNiDeathRecipient(sp gnssNi) : mGnssNi(gnssNi) { 57 | } 58 | ~GnssNiDeathRecipient() = default; 59 | virtual void serviceDied(uint64_t cookie, const wp& who) override; 60 | sp mGnssNi; 61 | }; 62 | 63 | private: 64 | sp mGnssNiDeathRecipient = nullptr; 65 | sp mGnssNiCbIface = nullptr; 66 | Gnss* mGnss = nullptr; 67 | }; 68 | 69 | } // namespace implementation 70 | } // namespace V2_1 71 | } // namespace gnss 72 | } // namespace hardware 73 | } // namespace android 74 | 75 | #endif // ANDROID_HARDWARE_GNSS_V2_0_GNSSNI_H 76 | -------------------------------------------------------------------------------- /gps/android/2.1/android.hardware.gnss@2.1-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@2.1-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /gps/android/2.1/android.hardware.gnss@2.1-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.1::IGnss/default 33 | @2.1::IGnss/default 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /gps/android/2.1/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2_0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2_0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #define LOG_TAG "android.hardware.gnss@2.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::V2_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 | #ifdef LOC_HIDL_VERSION 64 | #define VENDOR_ENHANCED_LIB "vendor.qti.gnss@" LOC_HIDL_VERSION "-service.so" 65 | 66 | void* libHandle = NULL; 67 | vendorEnhancedServiceMain* vendorEnhancedMainMethod = (vendorEnhancedServiceMain*) 68 | dlGetSymFromLib(libHandle, VENDOR_ENHANCED_LIB, "main"); 69 | if (NULL != vendorEnhancedMainMethod) { 70 | (*vendorEnhancedMainMethod)(0, NULL); 71 | } 72 | #else 73 | ALOGI("LOC_HIDL_VERSION not defined."); 74 | #endif 75 | joinRpcThreadpool(); 76 | } else { 77 | ALOGE("Error while registering IGnss 2.1 service: %d", status); 78 | } 79 | 80 | return 0; 81 | } 82 | -------------------------------------------------------------------------------- /gps/android/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | include $(call all-subdir-makefiles) 3 | -------------------------------------------------------------------------------- /gps/android/utils/Android.bp: -------------------------------------------------------------------------------- 1 | cc_library_static { 2 | 3 | name: "liblocbatterylistener", 4 | vendor: true, 5 | 6 | 7 | 8 | cflags: GNSS_CFLAGS + ["-DBATTERY_LISTENER_ENABLED"], 9 | local_include_dirs: ["."], 10 | 11 | srcs: ["battery_listener.cpp"], 12 | 13 | shared_libs: [ 14 | "liblog", 15 | "libhidlbase", 16 | "libcutils", 17 | "libutils", 18 | "android.hardware.health@1.0", 19 | "android.hardware.health@2.0", 20 | "android.hardware.health@2.1", 21 | "android.hardware.power@1.2", 22 | "libbase", 23 | ], 24 | 25 | static_libs: ["libhealthhalutils"], 26 | 27 | header_libs: [ 28 | "libgps.utils_headers", 29 | "libloc_pla_headers", 30 | ], 31 | } 32 | 33 | cc_library_headers { 34 | 35 | name: "liblocbatterylistener_headers", 36 | export_include_dirs: ["."], 37 | } 38 | -------------------------------------------------------------------------------- /gps/android/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/batching/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | cc_library_shared { 3 | 4 | name: "libbatching", 5 | vendor: true, 6 | 7 | 8 | 9 | shared_libs: [ 10 | "libutils", 11 | "libcutils", 12 | "liblog", 13 | "libloc_core", 14 | "libgps.utils", 15 | "libdl", 16 | ], 17 | 18 | srcs: [ 19 | "location_batching.cpp", 20 | "BatchingAdapter.cpp", 21 | ], 22 | 23 | header_libs: [ 24 | "libgps.utils_headers", 25 | "libloc_core_headers", 26 | "libloc_pla_headers", 27 | "liblocation_api_headers", 28 | ], 29 | 30 | cflags: GNSS_CFLAGS, 31 | } 32 | -------------------------------------------------------------------------------- /gps/batching/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | $(GPSUTILS_CFLAGS) \ 3 | $(LOCCORE_CFLAGS) \ 4 | -I./ \ 5 | -std=c++1y \ 6 | -D__func__=__PRETTY_FUNCTION__ \ 7 | -fno-short-enums 8 | 9 | ACLOCAL_AMFLAGS = -I m4 10 | 11 | requiredlibs = \ 12 | $(GPSUTILS_LIBS) \ 13 | $(LOCCORE_LIBS) \ 14 | -llog 15 | 16 | h_sources = \ 17 | BatchingAdapter.h 18 | 19 | libbatching_la_SOURCES = \ 20 | location_batching.cpp \ 21 | BatchingAdapter.cpp 22 | 23 | if USE_GLIB 24 | libbatching_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 25 | libbatching_la_LDFLAGS = -lstdc++ -g -Wl,-z,defs -lpthread $(requiredlibs) @GLIB_LIBS@ -shared -version-info 1:0:0 26 | libbatching_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 27 | else 28 | libbatching_la_CFLAGS = $(AM_CFLAGS) 29 | libbatching_la_LDFLAGS = -Wl,-z,defs -lpthread $(requiredlibs) -shared -version-info 1:0:0 30 | libbatching_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 31 | endif 32 | 33 | library_include_HEADERS = $(h_sources) 34 | 35 | library_includedir = $(pkgincludedir) 36 | 37 | #Create and Install libraries 38 | lib_LTLIBRARIES = libbatching.la 39 | 40 | pkgconfigdir = $(libdir)/pkgconfig 41 | pkgconfig_DATA = location-batching.pc 42 | sysconf_DATA = $(WORKSPACE)/hardware/qcom/gps/etc/flp.conf 43 | EXTRA_DIST = $(pkgconfig_DATA) 44 | 45 | -------------------------------------------------------------------------------- /gps/batching/configure.ac: -------------------------------------------------------------------------------- 1 | # configure.ac -- Autoconf script for gps location-batching 2 | # 3 | # Process this file with autoconf to produce a configure script 4 | 5 | # Requires autoconf tool later than 2.61 6 | AC_PREREQ(2.61) 7 | # Initialize the gps location-batching package version 1.0.0 8 | AC_INIT([location-batching],1.0.0) 9 | # Does not strictly follow GNU Coding standards 10 | AM_INIT_AUTOMAKE([foreign subdir-objects]) 11 | # Disables auto rebuilding of configure, Makefile.ins 12 | AM_MAINTAINER_MODE 13 | # Verifies the --srcdir is correct by checking for the path 14 | AC_CONFIG_SRCDIR([Makefile.am]) 15 | # defines some macros variable to be included by source 16 | AC_CONFIG_HEADERS([config.h]) 17 | AC_CONFIG_MACRO_DIR([m4]) 18 | 19 | # Checks for programs. 20 | AC_PROG_LIBTOOL 21 | AC_PROG_CXX 22 | AC_PROG_CC 23 | AM_PROG_CC_C_O 24 | AC_PROG_AWK 25 | AC_PROG_CPP 26 | AC_PROG_INSTALL 27 | AC_PROG_LN_S 28 | AC_PROG_MAKE_SET 29 | PKG_PROG_PKG_CONFIG 30 | 31 | # Checks for libraries. 32 | PKG_CHECK_MODULES([GPSUTILS], [gps-utils]) 33 | AC_SUBST([GPSUTILS_CFLAGS]) 34 | AC_SUBST([GPSUTILS_LIBS]) 35 | 36 | PKG_CHECK_MODULES([LOCCORE], [loc-core]) 37 | AC_SUBST([LOCCORE_CFLAGS]) 38 | AC_SUBST([LOCCORE_LIBS]) 39 | 40 | AC_ARG_WITH([locpla_includes], 41 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 42 | [specify the path to locpla-includes in loc-pla_git.bb]), 43 | [locpla_incdir=$withval], 44 | with_locpla_includes=no) 45 | 46 | if test "x$with_locpla_includes" != "xno"; then 47 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 48 | fi 49 | 50 | AC_ARG_WITH([glib], 51 | AC_HELP_STRING([--with-glib], 52 | [enable glib, building HLOS systems which use glib])) 53 | 54 | if (test "x${with_glib}" = "xyes"); then 55 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 56 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 57 | AC_MSG_ERROR(GThread >= 2.16 is required)) 58 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 59 | AC_MSG_ERROR(GLib >= 2.16 is required)) 60 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 61 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 62 | 63 | AC_SUBST(GLIB_CFLAGS) 64 | AC_SUBST(GLIB_LIBS) 65 | fi 66 | 67 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 68 | 69 | AC_CONFIG_FILES([ \ 70 | Makefile \ 71 | location-batching.pc 72 | ]) 73 | 74 | AC_OUTPUT 75 | -------------------------------------------------------------------------------- /gps/batching/location-batching.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-batching 7 | Description: QTI GPS Batching 8 | Version: @VERSION 9 | Libs: -L${libdir} -lbatching 10 | Cflags: -I${includedir}/location-batching 11 | -------------------------------------------------------------------------------- /gps/core/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | cc_library_shared { 3 | 4 | name: "libloc_core", 5 | vendor: true, 6 | 7 | 8 | 9 | shared_libs: [ 10 | "liblog", 11 | "libutils", 12 | "libcutils", 13 | "libgps.utils", 14 | "libdl", 15 | "liblog", 16 | ], 17 | 18 | srcs: [ 19 | "LocApiBase.cpp", 20 | "LocAdapterBase.cpp", 21 | "ContextBase.cpp", 22 | "LocContext.cpp", 23 | "loc_core_log.cpp", 24 | "data-items/DataItemsFactoryProxy.cpp", 25 | "SystemStatusOsObserver.cpp", 26 | "SystemStatus.cpp", 27 | ], 28 | 29 | cflags: [ 30 | "-fno-short-enums", 31 | "-D_ANDROID_", 32 | ] + GNSS_CFLAGS, 33 | 34 | local_include_dirs: [ 35 | "data-items", 36 | "observer", 37 | ], 38 | 39 | header_libs: [ 40 | "libutils_headers", 41 | "libgps.utils_headers", 42 | "libloc_pla_headers", 43 | "liblocation_api_headers", 44 | ], 45 | 46 | } 47 | 48 | cc_library_headers { 49 | 50 | name: "libloc_core_headers", 51 | vendor: true, 52 | export_include_dirs: ["."] + [ 53 | "data-items", 54 | "observer", 55 | ], 56 | } 57 | -------------------------------------------------------------------------------- /gps/core/LBSProxyBase.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013-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 | #ifndef IZAT_PROXY_BASE_H 30 | #define IZAT_PROXY_BASE_H 31 | #include 32 | 33 | namespace loc_core { 34 | 35 | class LocApiBase; 36 | class LocAdapterBase; 37 | class ContextBase; 38 | 39 | class LBSProxyBase { 40 | friend class ContextBase; 41 | inline virtual LocApiBase* 42 | getLocApi(LOC_API_ADAPTER_EVENT_MASK_T exMask, 43 | ContextBase* context) const { 44 | 45 | (void)exMask; 46 | (void)context; 47 | return NULL; 48 | } 49 | protected: 50 | inline LBSProxyBase() {} 51 | public: 52 | inline virtual ~LBSProxyBase() {} 53 | inline virtual bool hasAgpsExtendedCapabilities() const { return false; } 54 | inline virtual void modemPowerVote(bool power) const { 55 | 56 | (void)power; 57 | } 58 | virtual void injectFeatureConfig(ContextBase* context) const { 59 | 60 | (void)context; 61 | } 62 | inline virtual bool hasNativeXtraClient() const { return false; } 63 | inline virtual IzatDevId_t getIzatDevId() const { return 0; } 64 | }; 65 | 66 | typedef LBSProxyBase* (getLBSProxy_t)(); 67 | 68 | } // namespace loc_core 69 | 70 | #endif // IZAT_PROXY_BASE_H 71 | -------------------------------------------------------------------------------- /gps/core/LocContext.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2014, 2017-2020 The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation, nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | #ifndef __LOC_CONTEXT__ 30 | #define __LOC_CONTEXT__ 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | namespace loc_core { 38 | 39 | class LocContext : public ContextBase { 40 | static const MsgTask* mMsgTask; 41 | static ContextBase* mContext; 42 | static const MsgTask* getMsgTask(const char* name); 43 | static pthread_mutex_t mGetLocContextMutex; 44 | 45 | protected: 46 | LocContext(const MsgTask* msgTask); 47 | inline virtual ~LocContext() {} 48 | 49 | public: 50 | static const char* mLBSLibName; 51 | static const char* mLocationHalName; 52 | 53 | static ContextBase* getLocContext(const char* name); 54 | 55 | static void injectFeatureConfig(ContextBase *context); 56 | }; 57 | 58 | } 59 | 60 | #endif //__LOC_CONTEXT__ 61 | -------------------------------------------------------------------------------- /gps/core/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = -I./ \ 4 | $(LOCPLA_CFLAGS) \ 5 | $(GPSUTILS_CFLAGS) \ 6 | -I./data-items/ \ 7 | -I./data-items/common \ 8 | -I./observer \ 9 | -I$(WORKSPACE)/gps-noship/flp \ 10 | -D__func__=__PRETTY_FUNCTION__ \ 11 | -fno-short-enums \ 12 | -std=c++11 13 | 14 | libloc_core_la_h_sources = \ 15 | LocApiBase.h \ 16 | LocAdapterBase.h \ 17 | ContextBase.h \ 18 | LocContext.h \ 19 | LBSProxyBase.h \ 20 | loc_core_log.h \ 21 | LocAdapterProxyBase.h \ 22 | EngineHubProxyBase.h \ 23 | data-items/DataItemId.h \ 24 | data-items/IDataItemCore.h \ 25 | data-items/DataItemConcreteTypesBase.h \ 26 | observer/IDataItemObserver.h \ 27 | observer/IDataItemSubscription.h \ 28 | observer/IFrameworkActionReq.h \ 29 | observer/IOsObserver.h \ 30 | SystemStatusOsObserver.h \ 31 | SystemStatus.h 32 | 33 | libloc_core_la_c_sources = \ 34 | LocApiBase.cpp \ 35 | LocAdapterBase.cpp \ 36 | ContextBase.cpp \ 37 | LocContext.cpp \ 38 | loc_core_log.cpp \ 39 | data-items/DataItemsFactoryProxy.cpp \ 40 | SystemStatusOsObserver.cpp \ 41 | SystemStatus.cpp 42 | 43 | if USE_EXTERNAL_AP 44 | AM_CFLAGS += -DFEATURE_EXTERNAL_AP 45 | endif 46 | 47 | library_includedir = $(pkgincludedir) 48 | 49 | library_include_HEADERS = $(libloc_core_la_h_sources) 50 | 51 | libloc_core_la_SOURCES = $(libloc_core_la_c_sources) 52 | 53 | if USE_GLIB 54 | libloc_core_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 55 | libloc_core_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 56 | libloc_core_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 57 | else 58 | libloc_core_la_CFLAGS = $(AM_CFLAGS) 59 | libloc_core_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 60 | libloc_core_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 61 | endif 62 | 63 | if USE_FEATURE_AUTOMOTIVE 64 | AM_CFLAGS += -DFEATURE_AUTOMOTIVE 65 | endif 66 | 67 | libloc_core_la_LIBADD = -ldl $(GPSUTILS_LIBS) 68 | 69 | #Create and Install libraries 70 | lib_LTLIBRARIES = libloc_core.la 71 | 72 | pkgconfigdir = $(libdir)/pkgconfig 73 | pkgconfig_DATA = loc-core.pc 74 | EXTRA_DIST = $(pkgconfig_DATA) 75 | -------------------------------------------------------------------------------- /gps/core/data-items/DataItemsFactoryProxy.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2017, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation, nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef __DATAITEMFACTORYBASE__ 31 | #define __DATAITEMFACTORYBASE__ 32 | 33 | #include 34 | #include 35 | 36 | namespace loc_core 37 | { 38 | 39 | #define DATA_ITEMS_LIB_NAME "libdataitems.so" 40 | #define DATA_ITEMS_GET_CONCRETE_DI "getConcreteDataItem" 41 | 42 | typedef IDataItemCore * (get_concrete_data_item_fn)(DataItemId); 43 | 44 | class DataItemsFactoryProxy { 45 | public: 46 | static IDataItemCore* createNewDataItem(DataItemId id); 47 | static void closeDataItemLibraryHandle(); 48 | static void *dataItemLibHandle; 49 | static get_concrete_data_item_fn *getConcreteDIFunc; 50 | }; 51 | 52 | } // namespace loc_core 53 | 54 | #endif //__DATAITEMFACTORYBASE__ 55 | 56 | -------------------------------------------------------------------------------- /gps/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/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/etc/Android.bp: -------------------------------------------------------------------------------- 1 | prebuilt_etc { 2 | name: "gnss@2.0-base.policy", 3 | vendor: true, 4 | sub_dir: "seccomp_policy", 5 | src: "seccomp_policy/gnss@2.0-base.policy", 6 | } 7 | 8 | prebuilt_etc { 9 | name: "gnss@2.0-xtra-daemon.policy", 10 | vendor: true, 11 | sub_dir: "seccomp_policy", 12 | src: "seccomp_policy/gnss@2.0-xtra-daemon.policy", 13 | } 14 | 15 | prebuilt_etc { 16 | name: "gnss@2.0-xtwifi-client.policy", 17 | vendor: true, 18 | sub_dir: "seccomp_policy", 19 | src: "seccomp_policy/gnss@2.0-xtwifi-client.policy", 20 | } 21 | 22 | prebuilt_etc { 23 | name: "gnss@2.0-xtwifi-inet-agent.policy", 24 | vendor: true, 25 | sub_dir: "seccomp_policy", 26 | src: "seccomp_policy/gnss@2.0-xtwifi-inet-agent.policy", 27 | } 28 | -------------------------------------------------------------------------------- /gps/etc/seccomp_policy/gnss@2.0-xtra-daemon.policy: -------------------------------------------------------------------------------- 1 | #******************************************************************************* 2 | # Copyright (c) 2020 The Linux Foundation. All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are 6 | # met: 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above 10 | # copyright notice, this list of conditions and the following 11 | # disclaimer in the documentation and/or other materials provided 12 | # with the distribution. 13 | # * Neither the name of The Linux Foundation, nor the names of its 14 | # contributors may be used to endorse or promote products derived 15 | # from this software without specific prior written permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | #****************************************************************************** 30 | bind: 1 31 | getrlimit: 1 32 | 33 | pipe2: 1 34 | 35 | sched_getaffinity: 1 36 | timerfd_create: 1 37 | unlinkat: 1 38 | setpriority: 1 39 | 40 | epoll_create1: 1 41 | epoll_ctl: 1 42 | epoll_pwait: 1 43 | timerfd_settime: 1 44 | 45 | fdatasync: 1 46 | madvise: 1 47 | ftruncate: 1 48 | 49 | -------------------------------------------------------------------------------- /gps/etc/seccomp_policy/gnss@2.0-xtwifi-client.policy: -------------------------------------------------------------------------------- 1 | 2 | #******************************************************************************* 3 | # Copyright (c) 2020 The Linux Foundation. All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are 7 | # met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above 11 | # copyright notice, this list of conditions and the following 12 | # disclaimer in the documentation and/or other materials provided 13 | # with the distribution. 14 | # * Neither the name of The Linux Foundation, nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 19 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 25 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 27 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 28 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | #****************************************************************************** 31 | 32 | fdatasync: 1 33 | getdents64: 1 34 | gettimeofday: 1 35 | ioctl: 1 36 | lseek: 1 37 | madvise: 1 38 | mkdirat: 1 39 | pwrite64: 1 40 | 41 | timerfd_create: 1 42 | timerfd_settime: 1 43 | epoll_create1: 1 44 | epoll_pwait: 1 45 | epoll_ctl: 1 46 | 47 | sched_getaffinity: 1 48 | gettid: 1 49 | fchown: 1 50 | fchmod: 1 51 | fchmodat: 1 52 | getsockopt: 1 53 | fchownat: 1 54 | fstat: 1 55 | fstatfs: 1 56 | newfstatat: 1 57 | sendmsg: 1 58 | recvmsg: 1 59 | gettimeofday: 1 60 | setsockopt: 1 61 | rt_tgsigqueueinfo: 1 62 | ioctl: 1 63 | mmap: 1 64 | getuid32: 1 65 | getuid: 1 66 | fstat64: 1 67 | fstatat64: 1 68 | mkdir: 1 69 | rmdir: 1 70 | creat: 1 71 | chmod: 1 72 | lseek: 1 73 | geteuid32: 1 74 | -------------------------------------------------------------------------------- /gps/etc/seccomp_policy/gnss@2.0-xtwifi-inet-agent.policy: -------------------------------------------------------------------------------- 1 | 2 | #******************************************************************************* 3 | # Copyright (c) 2020 The Linux Foundation. All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are 7 | # met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above 11 | # copyright notice, this list of conditions and the following 12 | # disclaimer in the documentation and/or other materials provided 13 | # with the distribution. 14 | # * Neither the name of The Linux Foundation, nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 19 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 25 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 27 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 28 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | #****************************************************************************** 31 | 32 | unlinkat: 1 33 | sched_getaffinity: 1 34 | newfstatat: 1 35 | fchmodat: 1 36 | madvise: 1 37 | mmap: 1 38 | getuid: 1 39 | getuid32: 1 40 | fstat64: 1 41 | fstatat64: 1 42 | gettimeofday: 1 43 | getdents64: 1 44 | -------------------------------------------------------------------------------- /gps/geofence/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | 3 | cc_library_shared { 4 | 5 | name: "libgeofencing", 6 | vendor: true, 7 | 8 | 9 | 10 | srcs: [ 11 | "GeofenceAdapter.cpp", 12 | "location_geofence.cpp", 13 | ], 14 | 15 | shared_libs: [ 16 | "libutils", 17 | "libcutils", 18 | "libgps.utils", 19 | "liblog", 20 | "libloc_core", 21 | ], 22 | 23 | header_libs: [ 24 | "libgps.utils_headers", 25 | "libloc_core_headers", 26 | "libloc_pla_headers", 27 | "liblocation_api_headers", 28 | ], 29 | 30 | cflags: GNSS_CFLAGS, 31 | } 32 | -------------------------------------------------------------------------------- /gps/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/geofence/configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ(2.61) 2 | AC_INIT([location-geofence], 1.0.0) 3 | AM_INIT_AUTOMAKE([foreign subdir-objects]) 4 | AC_CONFIG_SRCDIR([Makefile.am]) 5 | AC_CONFIG_HEADERS([config.h]) 6 | AC_CONFIG_MACRO_DIR([m4]) 7 | 8 | # Check for programs 9 | AC_PROG_LIBTOOL 10 | AC_PROG_CXX 11 | AC_PROG_CC 12 | AM_PROG_CC_C_O 13 | AC_PROG_AWK 14 | AC_PROG_CPP 15 | AC_PROG_INSTALL 16 | AC_PROG_LN_S 17 | AC_PROG_MAKE_SET 18 | PKG_PROG_PKG_CONFIG 19 | 20 | # Check for libraries 21 | PKG_CHECK_MODULES([GPSUTILS], [gps-utils]) 22 | AC_SUBST([GPSUTILS_CFLAGS]) 23 | AC_SUBST([GPSUTILS_LIBS]) 24 | 25 | PKG_CHECK_MODULES([LOCCORE], [loc-core]) 26 | AC_SUBST([LOCCORE_CFLAGS]) 27 | AC_SUBST([LOCCORE_LIBS]) 28 | 29 | AS_CASE([$host], 30 | [arm*], [ARM=yes], 31 | [ARM=no] 32 | ) 33 | 34 | AC_ARG_WITH([locpla_includes], 35 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 36 | [specify the path to locpla-includes in loc-pla_git.bb]), 37 | [locpla_incdir=$withval], 38 | with_locpla_includes=no) 39 | 40 | if test "x$with_locpla_includes" != "xno"; then 41 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 42 | fi 43 | 44 | AC_ARG_WITH([glib], 45 | AC_HELP_STRING([--with-glib], 46 | [enable glib, building HLOS systems which use glib])) 47 | 48 | if (test "x${with_glib}" = "xyes"); then 49 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 50 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 51 | AC_MSG_ERROR(GThread >= 2.16 is required)) 52 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 53 | AC_MSG_ERROR(GLib >= 2.16 is required)) 54 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 55 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 56 | 57 | AC_SUBST(GLIB_CFLAGS) 58 | AC_SUBST(GLIB_LIBS) 59 | fi 60 | 61 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 62 | 63 | AC_SUBST([CFLAGS]) 64 | AC_SUBST([CPPFLAGS]) 65 | AC_SUBST([LIBS]) 66 | 67 | AC_CONFIG_FILES([ \ 68 | Makefile \ 69 | location-geofence.pc 70 | ]) 71 | 72 | AC_OUTPUT 73 | -------------------------------------------------------------------------------- /gps/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/gnss/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | 3 | cc_library_shared { 4 | 5 | name: "libgnss", 6 | vendor: true, 7 | 8 | 9 | 10 | shared_libs: [ 11 | "libutils", 12 | "libcutils", 13 | "libdl", 14 | "liblog", 15 | "libloc_core", 16 | "libgps.utils", 17 | ], 18 | 19 | srcs: [ 20 | "location_gnss.cpp", 21 | "GnssAdapter.cpp", 22 | "Agps.cpp", 23 | "XtraSystemStatusObserver.cpp", 24 | "NativeAgpsHandler.cpp", 25 | ], 26 | 27 | cflags: ["-fno-short-enums"] + GNSS_CFLAGS, 28 | header_libs: [ 29 | "libgps.utils_headers", 30 | "libloc_core_headers", 31 | "libloc_pla_headers", 32 | "liblocation_api_headers", 33 | ], 34 | 35 | } 36 | -------------------------------------------------------------------------------- /gps/gnss/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | $(LOCPLA_CFLAGS) \ 3 | $(LOCHAL_CFLAGS) \ 4 | $(GPSUTILS_CFLAGS) \ 5 | $(LOCCORE_CFLAGS) \ 6 | -I./ \ 7 | -I../utils \ 8 | -I$(WORKSPACE)/hardware/qcom/gps/core/data-items \ 9 | -I../location \ 10 | -std=c++1y 11 | 12 | libgnss_la_SOURCES = \ 13 | location_gnss.cpp \ 14 | GnssAdapter.cpp \ 15 | XtraSystemStatusObserver.cpp \ 16 | Agps.cpp \ 17 | NativeAgpsHandler.cpp 18 | 19 | if USE_GLIB 20 | libgnss_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 21 | libgnss_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -avoid-version 22 | libgnss_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 23 | else 24 | libgnss_la_CFLAGS = $(AM_CFLAGS) 25 | libgnss_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 26 | libgnss_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 27 | endif 28 | 29 | libgnss_la_LIBADD = -lstdc++ -ldl $(GPSUTILS_LIBS) $(LOCCORE_LIBS) 30 | 31 | #Create and Install libraries 32 | lib_LTLIBRARIES = libgnss.la 33 | -------------------------------------------------------------------------------- /gps/gnss/NativeAgpsHandler.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2020, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation, nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | #ifndef NATIVEAGPSHANDLER_H 30 | #define NATIVEAGPSHANDLER_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | using namespace std; 40 | using loc_core::IOsObserver; 41 | using loc_core::IDataItemObserver; 42 | using loc_core::IDataItemCore; 43 | 44 | class GnssAdapter; 45 | 46 | class NativeAgpsHandler : public IDataItemObserver { 47 | public: 48 | NativeAgpsHandler(IOsObserver* sysStatObs, GnssAdapter& adapter); 49 | ~NativeAgpsHandler(); 50 | AgpsCbInfo getAgpsCbInfo(); 51 | // IDataItemObserver overrides 52 | virtual void notify(const list& dlist); 53 | inline virtual void getName(string& name); 54 | private: 55 | static NativeAgpsHandler* sLocalHandle; 56 | static void agnssStatusIpV4Cb(AGnssExtStatusIpV4 statusInfo); 57 | void processATLRequestRelease(AGnssExtStatusIpV4 statusInfo); 58 | IOsObserver* mSystemStatusObsrvr; 59 | bool mConnected; 60 | string mApn; 61 | GnssAdapter& mAdapter; 62 | }; 63 | 64 | #endif // NATIVEAGPSHANDLER_H 65 | -------------------------------------------------------------------------------- /gps/location/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | cc_library_shared { 3 | 4 | name: "liblocation_api", 5 | vendor: true, 6 | 7 | 8 | 9 | shared_libs: [ 10 | "libutils", 11 | "libcutils", 12 | "libgps.utils", 13 | "libdl", 14 | "liblog", 15 | ], 16 | 17 | srcs: [ 18 | "LocationAPI.cpp", 19 | "LocationAPIClientBase.cpp", 20 | ], 21 | 22 | cflags: ["-fno-short-enums"] + GNSS_CFLAGS, 23 | 24 | header_libs: [ 25 | "libloc_pla_headers", 26 | "libgps.utils_headers", 27 | ], 28 | 29 | } 30 | 31 | cc_library_headers { 32 | 33 | name: "liblocation_api_headers", 34 | export_include_dirs: ["."], 35 | vendor: true, 36 | } 37 | -------------------------------------------------------------------------------- /gps/location/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = \ 4 | -I./ \ 5 | -I../utils \ 6 | $(LOCPLA_CFLAGS) \ 7 | $(GPSUTILS_CFLAGS) \ 8 | -std=c++11 9 | 10 | liblocation_api_la_SOURCES = \ 11 | LocationAPI.cpp \ 12 | LocationAPIClientBase.cpp 13 | 14 | if USE_EXTERNAL_AP 15 | AM_CFLAGS += -DFEATURE_EXTERNAL_AP 16 | endif 17 | 18 | if USE_GLIB 19 | liblocation_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 20 | liblocation_api_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 21 | liblocation_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 22 | else 23 | liblocation_api_la_CFLAGS = $(AM_CFLAGS) 24 | liblocation_api_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 25 | liblocation_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 26 | endif 27 | 28 | liblocation_api_la_LIBADD = -lstdc++ -ldl $(GPSUTILS_LIBS) 29 | 30 | library_include_HEADERS = \ 31 | LocationAPI.h \ 32 | LocationAPIClientBase.h \ 33 | location_interface.h \ 34 | LocationDataTypes.h \ 35 | ILocationAPI.h 36 | 37 | #Create and Install libraries 38 | lib_LTLIBRARIES = liblocation_api.la 39 | 40 | library_includedir = $(pkgincludedir) 41 | 42 | pkgconfigdir = $(libdir)/pkgconfig 43 | pkgconfig_DATA = location-api.pc 44 | EXTRA_DIST = $(pkgconfig_DATA) 45 | -------------------------------------------------------------------------------- /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/pla/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | cc_library_headers { 3 | 4 | name: "libloc_pla_headers", 5 | export_include_dirs: ["android"], 6 | vendor: true, 7 | } 8 | -------------------------------------------------------------------------------- /gps/utils/Android.bp: -------------------------------------------------------------------------------- 1 | 2 | cc_library_shared { 3 | 4 | name: "libgps.utils", 5 | vendor: true, 6 | 7 | 8 | 9 | //# Libs 10 | shared_libs: [ 11 | "libdl", 12 | "libutils", 13 | "libcutils", 14 | "liblog", 15 | "libprocessgroup", 16 | ], 17 | 18 | srcs: [ 19 | "loc_log.cpp", 20 | "loc_cfg.cpp", 21 | "msg_q.c", 22 | "linked_list.c", 23 | "loc_target.cpp", 24 | "LocHeap.cpp", 25 | "LocTimer.cpp", 26 | "LocThread.cpp", 27 | "MsgTask.cpp", 28 | "loc_misc_utils.cpp", 29 | "loc_nmea.cpp", 30 | "LocIpc.cpp", 31 | "LogBuffer.cpp", 32 | ], 33 | 34 | cflags: [ 35 | "-fno-short-enums", 36 | "-D_ANDROID_", 37 | ] + GNSS_CFLAGS, 38 | 39 | //# Includes 40 | ldflags: ["-Wl,--export-dynamic"], 41 | 42 | header_libs: [ 43 | "libutils_headers", 44 | "libloc_pla_headers", 45 | "liblocation_api_headers", 46 | ], 47 | } 48 | 49 | cc_library_headers { 50 | 51 | name: "libgps.utils_headers", 52 | export_include_dirs: ["."], 53 | vendor: true, 54 | } 55 | -------------------------------------------------------------------------------- /gps/utils/LocLoggerBase.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2020 The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation, nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | #ifndef LOC_LOGGER_BASE_H 30 | #define LOC_LOGGER_BASE_H 31 | 32 | namespace loc_util { 33 | class LocLoggerBase { 34 | public: 35 | virtual void log() {} 36 | }; 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /gps/utils/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = -Wundef \ 4 | -MD \ 5 | -Wno-trigraphs \ 6 | -g -O0 \ 7 | -fno-inline \ 8 | -fno-short-enums \ 9 | -fpic \ 10 | -I./ \ 11 | -std=c++14 \ 12 | $(LOCPLA_CFLAGS) 13 | 14 | libgps_utils_la_h_sources = \ 15 | msg_q.h \ 16 | linked_list.h \ 17 | loc_cfg.h \ 18 | loc_log.h \ 19 | loc_target.h \ 20 | loc_timer.h \ 21 | MsgTask.h \ 22 | LocHeap.h \ 23 | LocThread.h \ 24 | LocTimer.h \ 25 | LocIpc.h \ 26 | SkipList.h\ 27 | loc_misc_utils.h \ 28 | loc_nmea.h \ 29 | gps_extended_c.h \ 30 | gps_extended.h \ 31 | loc_gps.h \ 32 | log_util.h \ 33 | LocSharedLock.h \ 34 | LocUnorderedSetMap.h\ 35 | LocLoggerBase.h 36 | 37 | libgps_utils_la_c_sources = \ 38 | linked_list.c \ 39 | msg_q.c \ 40 | loc_cfg.cpp \ 41 | loc_log.cpp \ 42 | loc_target.cpp \ 43 | LocHeap.cpp \ 44 | LocTimer.cpp \ 45 | LocThread.cpp \ 46 | LocIpc.cpp \ 47 | LogBuffer.cpp \ 48 | MsgTask.cpp \ 49 | loc_misc_utils.cpp \ 50 | loc_nmea.cpp 51 | 52 | library_includedir = $(pkgincludedir) 53 | 54 | library_include_HEADERS = $(libgps_utils_la_h_sources) 55 | 56 | libgps_utils_la_SOURCES = $(libgps_utils_la_c_sources) 57 | 58 | if USE_GLIB 59 | libgps_utils_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 60 | libgps_utils_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 61 | libgps_utils_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 62 | else 63 | libgps_utils_la_CFLAGS = $(AM_CFLAGS) 64 | libgps_utils_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 65 | libgps_utils_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 66 | endif 67 | 68 | libgps_utils_la_LIBADD = $(CUTILS_LIBS) -ldl 69 | 70 | #Create and Install libraries 71 | lib_LTLIBRARIES = libgps_utils.la 72 | 73 | pkgconfigdir = $(libdir)/pkgconfig 74 | pkgconfig_DATA = gps-utils.pc 75 | EXTRA_DIST = $(pkgconfig_DATA) 76 | -------------------------------------------------------------------------------- /gps/utils/MsgTask.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2013, 2015, 2020 The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation, nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | #ifndef __MSG_TASK__ 30 | #define __MSG_TASK__ 31 | 32 | #include 33 | #include 34 | 35 | namespace loc_util { 36 | 37 | struct LocMsg { 38 | inline LocMsg() {} 39 | inline virtual ~LocMsg() {} 40 | virtual void proc() const = 0; 41 | inline virtual void log() const {} 42 | }; 43 | 44 | class MsgTask { 45 | const void* mQ; 46 | LocThread mThread; 47 | public: 48 | ~MsgTask() = default; 49 | MsgTask(const char* threadName = NULL); 50 | void sendMsg(const LocMsg* msg) const; 51 | void sendMsg(const std::function runnable) const; 52 | }; 53 | 54 | } // 55 | 56 | #endif //__MSG_TASK__ 57 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /libqti-perfd-client/Android.bp: -------------------------------------------------------------------------------- 1 | cc_library_shared { 2 | name: "libqti-perfd-client", 3 | proprietary: true, 4 | defaults: ["hidl_defaults"], 5 | srcs: [ 6 | "client.c", 7 | ], 8 | cflags: [ 9 | "-Werror", 10 | "-Wextra", 11 | "-Wall", 12 | ], 13 | shared_libs: [ 14 | "liblog", 15 | "libutils", 16 | ], 17 | } 18 | -------------------------------------------------------------------------------- /libqti-perfd-client/client.c: -------------------------------------------------------------------------------- 1 | #define LOG_TAG "libqti-perfd-client" 2 | 3 | #include 4 | #include 5 | 6 | void perf_get_feedback() {} 7 | void perf_hint() {} 8 | int perf_lock_acq(int handle, int duration, int arg3[], int arg4) { 9 | ALOGI("perf_lock_acq: handle: %d, duration: %d, arg3[0]: %d, arg4: %d", 10 | handle, duration, arg3[0], arg4); 11 | if (handle > 0) 12 | return handle; 13 | 14 | return 233; 15 | } 16 | void perf_lock_cmd() {} 17 | int perf_lock_rel(int handle) { 18 | ALOGI("perf_lock_rel: handle: %d", handle); 19 | if (handle > 0) 20 | return handle; 21 | 22 | return 233; 23 | } 24 | void perf_lock_use_profile() {} 25 | -------------------------------------------------------------------------------- /odm.prop: -------------------------------------------------------------------------------- 1 | # QC framework value-adds 2 | ro.vendor.qti.va_odm.support=1 3 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 5dp 23 | 24 | 8dp 25 | 26 | 16dp 27 | 28 | 5dp 29 | 33 | 19px 34 | 35 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/xml/power_profile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 96 4 | 403 5 | 6 | 6 7 | 2 8 | 9 | 10 | 300000 11 | 576000 12 | 748800 13 | 1017600 14 | 1209600 15 | 1363200 16 | 1516800 17 | 1593600 18 | 1708800 19 | 20 | 21 | 6 22 | 11 23 | 14 24 | 23 25 | 29 26 | 35 27 | 41 28 | 45 29 | 62 30 | 31 | 32 | 300000 33 | 652800 34 | 768000 35 | 979200 36 | 1017600 37 | 1209600 38 | 1363200 39 | 1516800 40 | 1708800 41 | 1900800 42 | 2016000 43 | 44 | 45 | 26 46 | 47 47 | 54 48 | 72 49 | 76 50 | 97 51 | 137 52 | 163 53 | 221 54 | 324 55 | 354 56 | 57 | 4 58 | 3 59 | 4 60 | 4000 61 | 50 62 | 2 63 | 2 64 | 1 65 | 120 66 | 30 67 | 29 68 | 52 69 | 121 70 | 650 71 | 70 72 | 20 73 | 52 74 | 75 | 3 76 | 2 77 | 78 | 79 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsLib/res/values-en-rAU/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | Turbo charging 23 | 24 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsLib/res/values-en-rCA/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | Turbo charging 23 | 24 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsLib/res/values-en-rGB/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | Turbo charging 23 | 24 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsLib/res/values-en-rIN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | Turbo charging 23 | 24 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsLib/res/values-en-rXC/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | Turbo charging 23 | 24 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsLib/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 10800000 21 | 22 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsLib/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | Turbo charging 23 | 24 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsProvider/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | true 22 | 23 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | false 23 | 24 | 25 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res-keyguard/values-en-rAU/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 23 | %s • Turbo charging 24 | 25 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res-keyguard/values-en-rCA/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 23 | %s • Turbo charging 24 | 25 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res-keyguard/values-en-rGB/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 23 | %s • Turbo charging 24 | 25 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res-keyguard/values-en-rIN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 23 | %s • Turbo charging 24 | 25 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res-keyguard/values-en-rXC/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 23 | %s • Turbo charging 24 | 25 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res-keyguard/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 23 | %s • Turbo charging 24 | 25 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/drawable/rounded.xml: -------------------------------------------------------------------------------- 1 | 11 | 16 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values-en-rAU/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | %2$s • Turbo charging (%1$s until full) 22 | 23 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values-en-rCA/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | %2$s • Turbo charging (%1$s until full) 22 | 23 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values-en-rGB/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | %2$s • Turbo charging (%1$s until full) 22 | 23 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values-en-rIN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | %2$s • Turbo charging (%1$s until full) 22 | 23 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values-en-rXC/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | %2$s • Turbo charging (%1$s until full) 22 | 23 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 25 | M21,0C19.94,0.01 18.83,0.04 17.73,0.11C16.91,0.17 16.09,0.25 15.3,0.36C14.5,0.48 13.72,0.62 12.95,0.81C11.42,1.19 9.97,1.72 8.65,2.43C7.32,3.14 6.12,4.02 5.08,5.07C4.04,6.11 3.15,7.31 2.44,8.64C1.73,9.97 1.19,11.42 0.82,12.94C0.63,13.7 0.48,14.49 0.37,15.29C0.25,16.09 0.17,16.9 0.12,17.72C0.05,18.82 0.02,19.93 0.01,21.55 26 | 27 | 12dp 28 | 29 | 30 | true 31 | 32 | 33 | true 34 | 35 | 36 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 1dp 20 | 21 | 22 | 33px 23 | 24 | 25 | 22px 26 | 27 | 28 | 44px 29 | 30 | 31 | 12dp 32 | 33 | 34 | 950px 35 | 550px 36 | 37 | 38 | 136px 39 | 136px 40 | 136px 41 | 42 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | %2$s • Turbo charging (%1$s until full) 22 | 23 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/bools.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | false 17 | 18 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 23 | org.codeaurora.ims 24 | 25 | 26 | org.codeaurora.ims 27 | 28 | -------------------------------------------------------------------------------- /parts/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2017-2020 The LineageOS Project 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | android_app { 8 | name: "XiaomiParts", 9 | 10 | srcs: ["src/**/*.java"], 11 | 12 | certificate: "platform", 13 | platform_apis: true, 14 | privileged: true, 15 | 16 | static_libs: [ 17 | "org.lineageos.settings.resources", 18 | "SettingsLib", 19 | ], 20 | 21 | optimize: { 22 | proguard_flags_files: ["proguard.flags"], 23 | }, 24 | 25 | } 26 | -------------------------------------------------------------------------------- /parts/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class org.lineageos.settings.dirac.* { 2 | *; 3 | } 4 | 5 | -keep class org.lineageos.settings.doze.* { 6 | *; 7 | } 8 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_doze_aod.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_doze_hand.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_doze_pickup.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_doze_pocket.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_doze_settings.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_doze_wake.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_fps.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 23 | 27 | 30 | 31 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_headphone.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_preset.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_benchmark.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_browser.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_camera.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_default.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_dialer.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_gaming.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /parts/res/drawable/ic_thermal_streaming.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /parts/res/layout/thermal_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 19 | -------------------------------------------------------------------------------- /parts/res/layout/thermal_list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 22 | 23 | 30 | 31 | 36 | 37 | 48 | 49 | 53 | 54 | 55 | 56 | 63 | 64 | -------------------------------------------------------------------------------- /parts/res/raw/clear_speaker_sound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArrowOS-Devices/android_device_xiaomi_violet/61dfe0d46cf26d5e01cf079f33739fb4861c5ab3/parts/res/raw/clear_speaker_sound.mp3 -------------------------------------------------------------------------------- /parts/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 |