├── Android.bp
├── Android.mk
├── AndroidProducts.mk
├── BoardConfig.mk
├── README.md
├── audio
├── aov_ec_mixer_paths.xml
├── audio_effects.xml
├── audio_ext_spkr.conf
├── audio_platform_info.xml
├── audio_policy_configuration.xml
└── mixer_paths.xml
├── bluetooth
└── bdroid_buildcfg.h
├── compatibility_matrix.xml
├── config.fs
├── configs
├── camera
│ ├── com.motorola.camera
│ │ └── always_aware_ocr.json
│ ├── mot_imx362_chromatix.xml
│ ├── mot_ov5695_chromatix.xml
│ ├── msm8953_mot_camera.xml
│ ├── ov16860_chromatix.xml
│ └── ov5693_chromatix.xml
├── component-overrides.xml
├── media_codecs
│ ├── media_codecs.xml
│ ├── media_codecs_performance.xml
│ └── media_profiles_V1_0.xml
├── nfc
│ ├── libnfc-nci.conf
│ ├── libnfc-nxp.conf
│ └── libnfc-nxp_retcn.conf
├── powerhint.xml
├── public.libraries.txt
├── qti_whitelist.xml
├── sec_config
├── sensors
│ ├── hals.conf
│ └── sensor_def_qcomdev.conf
├── telephony_product_privapp-permissions-qti.xml
├── thermal-engine-addison.conf
└── whitelist_modservice.xml
├── device.mk
├── extract-files.sh
├── extract-files_addison.sh
├── framework_manifest.xml
├── full_addison.mk
├── gps
├── Android.mk
├── android
│ ├── 1.0
│ │ ├── AGnss.cpp
│ │ ├── AGnss.h
│ │ ├── AGnssRil.cpp
│ │ ├── AGnssRil.h
│ │ ├── Android.mk
│ │ ├── Gnss.cpp
│ │ ├── Gnss.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
│ │ ├── android.hardware.gnss@1.0-service-qti.rc
│ │ ├── android.hardware.gnss@1.0-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
│ ├── 1.1
│ │ ├── AGnss.cpp
│ │ ├── AGnss.h
│ │ ├── AGnssRil.cpp
│ │ ├── AGnssRil.h
│ │ ├── Android.mk
│ │ ├── Gnss.cpp
│ │ ├── Gnss.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
│ │ ├── android.hardware.gnss@1.1-service-qti.rc
│ │ ├── android.hardware.gnss@1.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
│ ├── 2.0
│ │ ├── AGnss.cpp
│ │ ├── AGnss.h
│ │ ├── AGnssRil.cpp
│ │ ├── AGnssRil.h
│ │ ├── Android.mk
│ │ ├── Gnss.cpp
│ │ ├── Gnss.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
│ │ ├── android.hardware.gnss@2.0-service-qti.rc
│ │ ├── android.hardware.gnss@2.0-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
│ ├── measurement_corrections
│ │ └── 1.0
│ │ │ ├── MeasurementCorrections.cpp
│ │ │ └── MeasurementCorrections.h
│ ├── utils
│ │ ├── Android.mk
│ │ ├── battery_listener.cpp
│ │ └── battery_listener.h
│ └── visibility_control
│ │ └── 1.0
│ │ ├── GnssVisibilityControl.cpp
│ │ └── GnssVisibilityControl.h
├── batching
│ ├── Android.mk
│ ├── BatchingAdapter.cpp
│ ├── BatchingAdapter.h
│ ├── location-batching.pc.in
│ └── location_batching.cpp
├── build
│ └── target_specific_features.mk
├── core
│ ├── Android.mk
│ ├── ContextBase.cpp
│ ├── ContextBase.h
│ ├── EngineHubProxyBase.h
│ ├── LBSProxyBase.h
│ ├── LocAdapterBase.cpp
│ ├── LocAdapterBase.h
│ ├── LocAdapterProxyBase.h
│ ├── LocApiBase.cpp
│ ├── LocApiBase.h
│ ├── LocContext.cpp
│ ├── LocContext.h
│ ├── SystemStatus.cpp
│ ├── SystemStatus.h
│ ├── SystemStatusOsObserver.cpp
│ ├── SystemStatusOsObserver.h
│ ├── data-items
│ │ ├── DataItemConcreteTypesBase.h
│ │ ├── DataItemId.h
│ │ ├── DataItemsFactoryProxy.cpp
│ │ ├── DataItemsFactoryProxy.h
│ │ └── IDataItemCore.h
│ ├── loc_core_log.cpp
│ ├── loc_core_log.h
│ └── observer
│ │ ├── IDataItemObserver.h
│ │ ├── IDataItemSubscription.h
│ │ ├── IFrameworkActionReq.h
│ │ └── IOsObserver.h
├── etc
│ ├── apdr.conf
│ ├── flp.conf
│ ├── gps.conf
│ ├── izat.conf
│ ├── lowi.conf
│ ├── sap.conf
│ └── xtwifi.conf
├── geofence
│ ├── Android.mk
│ ├── GeofenceAdapter.cpp
│ ├── GeofenceAdapter.h
│ ├── location-geofence.pc.in
│ └── location_geofence.cpp
├── gnss
│ ├── Agps.cpp
│ ├── Agps.h
│ ├── Android.mk
│ ├── GnssAdapter.cpp
│ ├── GnssAdapter.h
│ ├── XtraSystemStatusObserver.cpp
│ ├── XtraSystemStatusObserver.h
│ └── location_gnss.cpp
├── gnsspps
│ ├── Android.mk
│ ├── configure.ac
│ ├── gnsspps.c
│ ├── gnsspps.h
│ ├── gnsspps.pc.in
│ └── timepps.h
├── loc_sll_if
│ ├── Android.mk
│ └── if
│ │ ├── Android.mk
│ │ └── loc_sll_interface.h
├── location
│ ├── Android.mk
│ ├── ILocationAPI.h
│ ├── LocationAPI.cpp
│ ├── LocationAPI.h
│ ├── LocationAPIClientBase.cpp
│ ├── LocationAPIClientBase.h
│ ├── LocationDataTypes.h
│ ├── location-api.pc.in
│ └── location_interface.h
├── pla
│ ├── Android.mk
│ ├── android
│ │ └── loc_pla.h
│ └── oe
│ │ └── loc_pla.h
├── synergy_loc_api
│ ├── Android.mk
│ ├── SynergyLocApi.cpp
│ ├── SynergyLocApi.h
│ └── synergy_loc_util_log.h
└── utils
│ ├── Android.mk
│ ├── LocHeap.cpp
│ ├── LocHeap.h
│ ├── LocIpc.cpp
│ ├── LocIpc.h
│ ├── LocSharedLock.h
│ ├── LocThread.cpp
│ ├── LocThread.h
│ ├── LocTimer.cpp
│ ├── LocTimer.h
│ ├── LocUnorderedSetMap.h
│ ├── MsgTask.cpp
│ ├── MsgTask.h
│ ├── 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
├── hardware-moto-sensors
├── .gitignore
├── Android.mk
├── BaseHal.h
├── InputEventReader.cpp
├── InputEventReader.h
├── NOTICE
├── SensorsLog.h
├── ak09912_akmd_6D_32b
│ ├── AKCommon.h
│ ├── AKCompass.h
│ ├── AKMD_Driver.c
│ ├── AKMD_Driver.h
│ ├── AKMLog.h
│ ├── Acc_aot.c
│ ├── Acc_aot.h
│ ├── CustomerSpec.h
│ ├── DispMessage.c
│ ├── DispMessage.h
│ ├── FST.h
│ ├── FST_AK09912.c
│ ├── FileIO.c
│ ├── FileIO.h
│ ├── Measure.c
│ ├── Measure.h
│ ├── libSmartCompass
│ │ ├── AKCertification.h
│ │ ├── AKConfigure.h
│ │ ├── AKDecomp.h
│ │ ├── AKDirection6D.h
│ │ ├── AKHDOE.h
│ │ ├── AKHFlucCheck.h
│ │ ├── AKMDevice.h
│ │ ├── AKManualCal.h
│ │ ├── AKVersion.h
│ │ ├── arm
│ │ │ └── libAK09912.a
│ │ └── arm64
│ │ │ └── libAK09912.a
│ ├── main.c
│ ├── misc.c
│ └── misc.h
├── capsensor
│ ├── Android.mk
│ └── capsense.cpp
├── doxygen
│ ├── Doxyfile
│ ├── DynamicSensorTests.md
│ ├── GreyBus.md
│ ├── HAL.md
│ ├── IIO.md
│ ├── README.md
│ └── header.tex
├── iio_hal
│ ├── Android.mk
│ ├── DynamicMetaSensor.cpp
│ ├── DynamicMetaSensor.h
│ ├── Hal.cpp
│ ├── IioHal.cpp
│ ├── IioHal.h
│ ├── IioSensor.cpp
│ ├── IioSensor.h
│ ├── UeventListener.cpp
│ └── UeventListener.h
├── iio_utils
│ ├── Android.mk
│ ├── NOTICE
│ ├── README
│ ├── generic_buffer.c
│ ├── iio_event_monitor.c
│ ├── iio_utils.h
│ └── lsiio.c
├── libiio
│ ├── Android.bp
│ ├── include
│ │ └── iio.h
│ └── src
├── libsensorhub
│ ├── Android.mk
│ ├── Endian.cpp
│ ├── Endian.hpp
│ ├── SensorHub.cpp
│ └── SensorHub.hpp
├── motosh_bin
│ ├── CRC32.c
│ ├── CRC32.h
│ ├── motosh.cpp
│ └── sensorhub-blacklist.txt
├── motosh_hal
│ ├── Android.mk
│ ├── HubSensors.cpp
│ ├── HubSensors.h
│ ├── RearProxSensor.cpp
│ ├── RearProxSensor.h
│ ├── SensorBase.cpp
│ ├── SensorBase.h
│ ├── SensorHal.cpp
│ ├── SensorList.cpp
│ ├── Sensors.h
│ ├── SensorsPollContext.cpp
│ ├── SensorsPollContext.h
│ └── sensorhub.c
├── rearProx
│ ├── Android.mk
│ ├── CapSensor.cpp
│ ├── CapSensor.h
│ ├── InputEventReader.cpp
│ ├── InputEventReader.h
│ ├── NativeSensorManager.cpp
│ ├── NativeSensorManager.h
│ ├── ProximitySensor.cpp
│ ├── ProximitySensor.h
│ ├── SensorBase.cpp
│ ├── SensorBase.h
│ ├── sensors.cpp
│ ├── sensors.h
│ └── sensors_extension.h
├── stml0xx_hal
│ ├── CapSense.cpp
│ ├── CapSense.h
│ ├── FusionSensorBase.cpp
│ ├── FusionSensorBase.h
│ ├── GameRotationVector.cpp
│ ├── GameRotationVector.h
│ ├── GeoMagRotationVector.cpp
│ ├── GeoMagRotationVector.h
│ ├── GyroIntegration.cpp
│ ├── GyroIntegration.h
│ ├── HubSensors.cpp
│ ├── HubSensors.h
│ ├── LinearAccelGravity.cpp
│ ├── LinearAccelGravity.h
│ ├── Quaternion.cpp
│ ├── Quaternion.h
│ ├── RearProxSensor.cpp
│ ├── RearProxSensor.h
│ ├── RotationVector.cpp
│ ├── RotationVector.h
│ ├── SensorBase.cpp
│ ├── SensorBase.h
│ ├── SensorHal.cpp
│ ├── SensorList.cpp
│ ├── SensorList.h
│ ├── Sensors.h
│ ├── SensorsPollContext.cpp
│ ├── SensorsPollContext.h
│ └── sensorhub.c
├── tof_hal
│ ├── Android.mk
│ ├── RearProxSensor.cpp
│ ├── RearProxSensor.h
│ ├── SensorsPollContext.cpp
│ ├── SensorsPollContext.h
│ └── TofModule.cpp
├── utils
│ ├── sensor_time.cpp
│ └── sensor_time.h
└── vl53l0_hal
│ ├── Android.mk
│ ├── RearProxSensor.cpp
│ ├── RearProxSensor.h
│ ├── SensorBase.cpp
│ ├── SensorBase.h
│ ├── SensorsPollContext.cpp
│ ├── SensorsPollContext.h
│ └── TofModule.cpp
├── idc
└── fpc1020.idc
├── include
└── hardware
│ └── mot_sensorhub_motosh.h
├── init
├── Android.bp
└── init_msm8953.cpp
├── keylayout
└── fpc1020.kl
├── libhidl
└── Android.mk
├── libshims
├── Android.bp
├── Android.mk
├── android_memset.S
├── jstring.h
├── justshoot_shim.cpp
├── libqsap_shim.c
├── memset32.S
└── strdup16to8.cpp
├── light
├── Android.bp
├── Light.cpp
├── Light.h
├── android.hardware.light@2.0-service.addison.rc
├── android.hardware.light@2.0-service.addison.xml
└── service.cpp
├── lineage.dependencies
├── lineage_addison.mk
├── manifest.xml
├── mot_aids.fs
├── overlay
├── frameworks
│ └── base
│ │ ├── core
│ │ └── res
│ │ │ └── res
│ │ │ ├── values-mcc204-mnc04
│ │ │ └── config.xml
│ │ │ ├── values-mcc310-mnc004
│ │ │ └── config.xml
│ │ │ ├── values-mcc311-mnc480
│ │ │ └── config.xml
│ │ │ ├── values
│ │ │ ├── config.xml
│ │ │ └── strings.xml
│ │ │ └── xml
│ │ │ └── power_profile.xml
│ │ └── packages
│ │ └── SettingsProvider
│ │ └── res
│ │ └── values
│ │ └── defaults.xml
├── lineage-sdk
│ └── lineage
│ │ └── res
│ │ └── res
│ │ └── values
│ │ └── config.xml
└── packages
│ ├── apps
│ ├── Bluetooth
│ │ └── res
│ │ │ └── values
│ │ │ └── config.xml
│ ├── CarrierConfig
│ │ └── res
│ │ │ └── xml
│ │ │ └── vendor.xml
│ ├── Settings
│ │ └── res
│ │ │ └── values
│ │ │ ├── arrays.xml
│ │ │ ├── config.xml
│ │ │ └── dimens.xml
│ └── Snap
│ │ └── res
│ │ └── values
│ │ └── config.xml
│ └── services
│ └── Telephony
│ └── res
│ └── values
│ └── config.xml
├── pocketmode
├── Android.mk
├── AndroidManifest.xml
├── pocketmode_whitelist.xml
├── proguard.flags
└── src
│ └── org
│ └── lineageos
│ └── pocketmode
│ ├── BootCompletedReceiver.java
│ ├── PocketModeService.java
│ └── ProximitySensor.java
├── power
├── Android.mk
└── power-8953.c
├── proprietary-files.txt
├── proprietary-files_addison.txt
├── rootdir
├── Android.mk
├── bin
│ ├── init.gbmods.sh
│ ├── init.qcom.early_boot.sh
│ ├── init.qcom.post_boot.sh
│ ├── init.qcom.sensors.sh
│ ├── init.qcom.sh
│ └── wlan_carrier_bin.sh
├── etc
│ ├── init.addison.rc
│ ├── init.mmi.rc
│ ├── init.mmi.usb.rc
│ ├── init.qcom.rc
│ ├── init.recovery.qcom.rc
│ └── ueventd.qcom.rc
└── root
│ ├── fstab.qcom
│ └── fstab.recovery
├── rro_overlays
├── TetheringOverlay
│ ├── Android.bp
│ ├── AndroidManifest.xml
│ └── res
│ │ └── values
│ │ └── config.xml
└── WifiOverlay
│ ├── Android.bp
│ ├── AndroidManifest.xml
│ └── res
│ └── values
│ └── config.xml
├── seccomp_policy
├── mediacodec.policy
└── mediaextractor.policy
├── sepolicy-mods
├── private
│ ├── mods_app.te
│ ├── seapp_contexts
│ └── service_contexts
├── public
│ ├── mods_app.te
│ └── service.te
└── vendor
│ ├── cameraserver.te
│ ├── device.te
│ ├── file.te
│ ├── file_contexts
│ ├── genfs_contexts
│ ├── hal_audio_default.te
│ ├── hal_camera_default.te
│ ├── hal_graphics_composer_default.te
│ ├── hal_health_default.te
│ ├── healthd.te
│ ├── hwservice.te
│ ├── hwservice_contexts
│ ├── init_mods.te
│ ├── mods_app.te
│ ├── mods_camd.te
│ ├── platform_app.te
│ ├── system_app.te
│ └── system_server.te
├── sepolicy
└── vendor
│ ├── akmd.te
│ ├── app.te
│ ├── atfwd.te
│ ├── audioserver.te
│ ├── bootanim.te
│ ├── cameraserver.te
│ ├── capsense_reset.te
│ ├── charge_only.te
│ ├── cnd.te
│ ├── device.te
│ ├── energyawareness.te
│ ├── file.te
│ ├── file_contexts
│ ├── firmware_file.te
│ ├── fsck.te
│ ├── genfs_contexts
│ ├── hal_audio_default.te
│ ├── hal_camera_default.te
│ ├── hal_cas_default.te
│ ├── hal_fingerprint_default.te
│ ├── hal_gnss_qti.te
│ ├── hal_graphics_composer_default.te
│ ├── hal_health_default.te
│ ├── hal_light_default.te
│ ├── hal_lineage_touch.te
│ ├── hal_lineage_touch_default.te
│ ├── hal_nfc_default.te
│ ├── hal_perf_default.te
│ ├── hal_power_default.te
│ ├── hal_power_stats_default.te
│ ├── hal_sensors_default.te
│ ├── hal_wifi_default.te
│ ├── hwservice.te
│ ├── hwservice_contexts
│ ├── hwservicemanager.te
│ ├── ims.te
│ ├── init.te
│ ├── init_wifi.te
│ ├── installd.te
│ ├── isdbt_app.te
│ ├── kernel.te
│ ├── location.te
│ ├── mediacodec.te
│ ├── mediadrmserver.te
│ ├── mediaextractor.te
│ ├── mm-qcamerad.te
│ ├── msm_irqbalanced.te
│ ├── netd.te
│ ├── netmgrd.te
│ ├── netutils_wrapper.te
│ ├── nfc.te
│ ├── per_mgr.te
│ ├── perfd.te
│ ├── persist_file.te
│ ├── platform_app.te
│ ├── pocketmode_app.te
│ ├── priv_app.te
│ ├── property.te
│ ├── property_contexts
│ ├── qseeproxy.te
│ ├── qti.te
│ ├── qti_init_shell.te
│ ├── radio.te
│ ├── rfs_access.te
│ ├── rfs_file.te
│ ├── rild.te
│ ├── rmt_storage.te
│ ├── seapp_contexts
│ ├── sensor_hub.te
│ ├── service.te
│ ├── service_contexts
│ ├── servicemanager.te
│ ├── surfaceflinger.te
│ ├── system_app.te
│ ├── system_server.te
│ ├── tee.te
│ ├── thermal-engine.te
│ ├── time_daemon.te
│ ├── toolbox.te
│ ├── ueventd.te
│ ├── untrusted_app.te
│ ├── vendor_init.te
│ ├── vendor_qti_init_shell.te
│ ├── vendor_ssr_setup.te
│ ├── vold.te
│ ├── wcnss_service.te
│ ├── webview_zygote.te
│ └── zygote.te
├── setup-makefiles.sh
├── vendor_prop.mk
├── vibrator
├── Android.bp
├── Vibrator.cpp
├── Vibrator.h
├── android.hardware.vibrator@1.0-service.addison.rc
├── android.hardware.vibrator@1.0-service.addison.xml
└── service.cpp
└── wifi
├── WCNSS_cfg.dat
├── WCNSS_qcom_cfg.ini
├── hostapd_default.conf
├── p2p_supplicant_overlay.conf
└── wpa_supplicant_overlay.conf
/Android.bp:
--------------------------------------------------------------------------------
1 | soong_namespace {
2 | }
3 |
--------------------------------------------------------------------------------
/AndroidProducts.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018-2022 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | PRODUCT_MAKEFILES := \
17 | $(LOCAL_DIR)/lineage_addison.mk
18 |
19 | COMMON_LUNCH_CHOICES := \
20 | lineage_addison-user \
21 | lineage_addison-userdebug \
22 | lineage_addison-eng
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Device Tree for Moto Z Play (addison)
2 | ===========================================
3 |
4 | The Motorola Moto Z Play (codenamed _"addison"_) is a mid-range smartphone from Motorola mobility.
5 | It was announced on August 2016.
6 |
7 | Basic | Spec Sheet
8 | -------:|:-------------------------
9 | CPU | Octa-core 2 GHz Cortex-A53
10 | Chipset | Qualcomm MSM8953 Snapdragon 625
11 | GPU | Adreno 506
12 | Memory | 3 GB RAM
13 | Shipped Android Version | 6.0.1
14 | Storage | 32 GB
15 | MicroSD | Up to 256 GB
16 | Battery | Li-Ion 3510mAh battery
17 | Display | 1080 x 1920 pixels, 5.5 inches (~403 ppi pixel density)
18 | Camera | 16 MP, 2150 x 1440 pixels, laser focus, dual flash LED
19 |
20 | Copyright 2016 - The LineageOS Project.
21 |
22 | 
23 |
--------------------------------------------------------------------------------
/audio/aov_ec_mixer_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/audio/audio_ext_spkr.conf:
--------------------------------------------------------------------------------
1 | global_config {
2 | name Addison
3 | sonification_pad 15
4 | sonification_prox_timeout_sec 5
5 | }
6 |
7 | ring {
8 | #dB to attenuate playback to meet safety level at each volume step
9 | #16 steps total, 15...0. In case of truncated list, last attenuation
10 | #given will be applied to all lower volume steps
11 | attenuation 38,38,35,35,32,32,29,29,26,26,24,24,22,22,20,20
12 | knee_step 16
13 | }
14 |
15 | voice {
16 | #dB to attenuate playback to meet safety level at each volume step
17 | #16 steps total, 15...0. In case of truncated list, last attenuation
18 | #given will be applied to all lower volume steps
19 | attenuation 35,35,32,32,29,29,26,26,23,23,20,20,17,17,14,14
20 | knee_step 16
21 | }
22 |
23 | media {
24 | #dB to attenuate playback to meet safety level at each volume step
25 | #16 steps total, 15...0. In case of truncated list, last attenuation
26 | #given will be applied to all lower volume steps
27 | attenuation 38,36,34,32,30,28,26,24,22,20,18,16,14,12,10,8
28 | knee_step 16
29 | }
30 |
--------------------------------------------------------------------------------
/bluetooth/bdroid_buildcfg.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 The CyanogenMod Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef _BDROID_BUILDCFG_H
18 | #define _BDROID_BUILDCFG_H
19 |
20 | //#include
21 | #include
22 |
23 | #define BTM_DEF_LOCAL_NAME "Moto Z Play"
24 | #define BLUETOOTH_QTI_SW TRUE
25 | #define MAX_ACL_CONNECTIONS 16
26 | #define MAX_L2CAP_CHANNELS 16
27 | #define BLE_VND_INCLUDED TRUE
28 | #define BTM_WBS_INCLUDED TRUE
29 | #define BTIF_HF_WBS_PREFERRED TRUE
30 | #define BTM_SCO_ENHANCED_SYNC_ENABLED FALSE
31 | #endif
32 |
--------------------------------------------------------------------------------
/configs/camera/com.motorola.camera/always_aware_ocr.json:
--------------------------------------------------------------------------------
1 | {
2 | "alwaysAware": {
3 | "supportedDetectors": [
4 | {
5 | "detector": "businessCard",
6 | "vendor": "abbyy"
7 | }
8 | ]
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/configs/component-overrides.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/configs/public.libraries.txt:
--------------------------------------------------------------------------------
1 | libadsprpc.so
2 | libOpenCL.so
3 | libqti-perfd-client.so
4 | libprotobuf-cpp-full.so
5 | libprotobuf-cpp-lite.so
--------------------------------------------------------------------------------
/configs/sensors/hals.conf:
--------------------------------------------------------------------------------
1 | sensors.msm8953.so
2 | sensors.iio.so
3 |
--------------------------------------------------------------------------------
/configs/telephony_product_privapp-permissions-qti.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
29 |
30 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/configs/whitelist_modservice.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/framework_manifest.xml:
--------------------------------------------------------------------------------
1 |
28 |
29 |
30 |
31 | vendor.qti.hardware.radio.atcmdfwd
32 | hwbinder
33 | 1.0
34 |
35 | IAtCmdFwd
36 | AtCmdFwdService
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/full_addison.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2015 The CyanogenMod Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # # Inherit from device product
18 | $(call inherit-product, device/motorola/addison/device.mk)
19 |
20 | # Inherit from those products - Most specific first
21 | $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
22 | $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
23 |
24 | # Device identifier - This must come after all inclusions
25 | PRODUCT_DEVICE := addison
26 | PRODUCT_NAME := full_addison
27 |
--------------------------------------------------------------------------------
/gps/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2019 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | include $(call first-makefiles-under,$(call my-dir))
18 |
--------------------------------------------------------------------------------
/gps/android/1.0/GnssDebug.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H
18 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H
19 |
20 |
21 | #include
22 | #include
23 |
24 | namespace android {
25 | namespace hardware {
26 | namespace gnss {
27 | namespace V1_0 {
28 | namespace implementation {
29 |
30 | using ::android::hardware::gnss::V1_0::IGnssDebug;
31 | using ::android::hardware::Return;
32 | using ::android::hardware::Void;
33 | using ::android::hardware::hidl_vec;
34 | using ::android::hardware::hidl_string;
35 | using ::android::sp;
36 |
37 | /* Interface for GNSS Debug support. */
38 | struct Gnss;
39 | struct GnssDebug : public IGnssDebug {
40 | GnssDebug(Gnss* gnss);
41 | ~GnssDebug() {};
42 |
43 | /*
44 | * Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow.
45 | * These declarations were generated from IGnssDebug.hal.
46 | */
47 | Return getDebugData(getDebugData_cb _hidl_cb) override;
48 |
49 | private:
50 | Gnss* mGnss = nullptr;
51 | };
52 |
53 | } // namespace implementation
54 | } // namespace V1_0
55 | } // namespace gnss
56 | } // namespace hardware
57 | } // namespace android
58 |
59 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H
60 |
--------------------------------------------------------------------------------
/gps/android/1.0/android.hardware.gnss@1.0-service-qti.rc:
--------------------------------------------------------------------------------
1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@1.0-service-qti
2 | interface android.hardware.gnss@1.0::IGnss default
3 | class hal
4 | user gps
5 | group system gps radio vendor_qti_diag
6 |
--------------------------------------------------------------------------------
/gps/android/1.0/android.hardware.gnss@1.0-service-qti.xml:
--------------------------------------------------------------------------------
1 |
28 |
29 |
30 | android.hardware.gnss
31 | hwbinder
32 | @1.0::IGnss/default
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/gps/android/1.1/GnssDebug.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H
18 | #define ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H
19 |
20 |
21 | #include
22 | #include
23 |
24 | namespace android {
25 | namespace hardware {
26 | namespace gnss {
27 | namespace V1_1 {
28 | namespace implementation {
29 |
30 | using ::android::hardware::gnss::V1_0::IGnssDebug;
31 | using ::android::hardware::Return;
32 | using ::android::hardware::Void;
33 | using ::android::hardware::hidl_vec;
34 | using ::android::hardware::hidl_string;
35 | using ::android::sp;
36 |
37 | /* Interface for GNSS Debug support. */
38 | struct Gnss;
39 | struct GnssDebug : public IGnssDebug {
40 | GnssDebug(Gnss* gnss);
41 | ~GnssDebug() {};
42 |
43 | /*
44 | * Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow.
45 | * These declarations were generated from IGnssDebug.hal.
46 | */
47 | Return getDebugData(getDebugData_cb _hidl_cb) override;
48 |
49 | private:
50 | Gnss* mGnss = nullptr;
51 | };
52 |
53 | } // namespace implementation
54 | } // namespace V1_1
55 | } // namespace gnss
56 | } // namespace hardware
57 | } // namespace android
58 |
59 | #endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H
60 |
--------------------------------------------------------------------------------
/gps/android/1.1/android.hardware.gnss@1.1-service-qti.rc:
--------------------------------------------------------------------------------
1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@1.1-service-qti
2 | interface android.hardware.gnss@1.0::IGnss default
3 | interface android.hardware.gnss@1.1::IGnss default
4 | class hal
5 | user gps
6 | group system gps radio vendor_qti_diag
7 |
--------------------------------------------------------------------------------
/gps/android/1.1/android.hardware.gnss@1.1-service-qti.xml:
--------------------------------------------------------------------------------
1 |
28 |
29 |
30 | android.hardware.gnss
31 | hwbinder
32 | @1.1::IGnss/default
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/gps/android/2.0/GnssDebug.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
3 | * Not a Contribution
4 | */
5 | /*
6 | * Copyright (C) 2016 The Android Open Source Project
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * you may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | */
20 |
21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H
22 | #define ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H
23 |
24 |
25 | #include
26 | #include
27 |
28 | namespace android {
29 | namespace hardware {
30 | namespace gnss {
31 | namespace V2_0 {
32 | namespace implementation {
33 |
34 | using ::android::hardware::gnss::V2_0::IGnssDebug;
35 | using ::android::hardware::Return;
36 | using ::android::hardware::Void;
37 | using ::android::hardware::hidl_vec;
38 | using ::android::hardware::hidl_string;
39 | using ::android::sp;
40 |
41 | /* Interface for GNSS Debug support. */
42 | struct Gnss;
43 | struct GnssDebug : public IGnssDebug {
44 | GnssDebug(Gnss* gnss);
45 | ~GnssDebug() {};
46 |
47 | // Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow
48 | Return getDebugData(getDebugData_cb _hidl_cb) override;
49 | // Methods from ::android::hardware::gnss::V2_0::IGnssDebug follow.
50 | Return getDebugData_2_0(getDebugData_2_0_cb _hidl_cb) override;
51 |
52 | private:
53 | Gnss* mGnss = nullptr;
54 | };
55 |
56 | } // namespace implementation
57 | } // namespace V2_0
58 | } // namespace gnss
59 | } // namespace hardware
60 | } // namespace android
61 |
62 | #endif // ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H
63 |
--------------------------------------------------------------------------------
/gps/android/2.0/android.hardware.gnss@2.0-service-qti.rc:
--------------------------------------------------------------------------------
1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@2.0-service-qti
2 | interface android.hardware.gnss@1.0::IGnss default
3 | interface android.hardware.gnss@1.1::IGnss default
4 | interface android.hardware.gnss@2.0::IGnss default
5 | class hal
6 | user gps
7 | group system gps radio vendor_qti_diag
8 |
--------------------------------------------------------------------------------
/gps/android/2.0/android.hardware.gnss@2.0-service-qti.xml:
--------------------------------------------------------------------------------
1 |
28 |
29 |
30 | android.hardware.gnss
31 | hwbinder
32 | @1.1::IGnss/default
33 | @2.0::IGnss/default
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/gps/android/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | include $(CLEAR_VARS)
3 | DIR_LIST := $(LOCAL_PATH)
4 | include $(DIR_LIST)/utils/Android.mk
5 | include $(DIR_LIST)/2.0/Android.mk
6 |
--------------------------------------------------------------------------------
/gps/android/utils/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | include $(CLEAR_VARS)
3 |
4 | LOCAL_MODULE := liblocbatterylistener
5 | LOCAL_SANITIZE += $(GNSS_SANITIZE)
6 | # activate the following line for debug purposes only, comment out for production
7 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
8 | LOCAL_VENDOR_MODULE := true
9 |
10 | LOCAL_CFLAGS += $(GNSS_CFLAGS)
11 |
12 | LOCAL_C_INCLUDES += \
13 | $(LOCAL_PATH) \
14 |
15 | LOCAL_SRC_FILES:= \
16 | battery_listener.cpp
17 | LOCAL_SHARED_LIBRARIES := \
18 | liblog \
19 | libhidlbase \
20 | libcutils \
21 | libutils \
22 | android.hardware.health@1.0 \
23 | android.hardware.health@2.0 \
24 | android.hardware.power@1.2 \
25 | libbase
26 |
27 | LOCAL_STATIC_LIBRARIES := libhealthhalutils
28 | LOCAL_CFLAGS += -DBATTERY_LISTENER_ENABLED
29 |
30 | include $(BUILD_STATIC_LIBRARY)
31 |
32 | include $(CLEAR_VARS)
33 | LOCAL_MODULE := liblocbatterylistener_headers
34 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
35 |
36 | include $(BUILD_HEADER_LIBRARY)
37 |
38 |
39 |
--------------------------------------------------------------------------------
/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.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE := libbatching
6 | LOCAL_SANITIZE += $(GNSS_SANITIZE)
7 | # activate the following line for debug purposes only, comment out for production
8 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
9 | LOCAL_VENDOR_MODULE := true
10 | LOCAL_MODULE_TAGS := optional
11 |
12 | LOCAL_SHARED_LIBRARIES := \
13 | libutils \
14 | libcutils \
15 | liblog \
16 | libloc_core \
17 | libgps.utils \
18 | libdl
19 |
20 | LOCAL_SRC_FILES += \
21 | location_batching.cpp \
22 | BatchingAdapter.cpp
23 |
24 | LOCAL_HEADER_LIBRARIES := \
25 | libgps.utils_headers \
26 | libloc_core_headers \
27 | libloc_pla_headers \
28 | liblocation_api_headers
29 |
30 | LOCAL_CFLAGS += $(GNSS_CFLAGS)
31 | include $(BUILD_SHARED_LIBRARY)
32 |
--------------------------------------------------------------------------------
/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/build/target_specific_features.mk:
--------------------------------------------------------------------------------
1 | GNSS_CFLAGS := \
2 | -Werror \
3 | -Wno-error=unused-parameter \
4 | -Wno-error=macro-redefined \
5 | -Wno-error=reorder \
6 | -Wno-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 |
--------------------------------------------------------------------------------
/gps/core/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE := libloc_core
6 | LOCAL_SANITIZE += $(GNSS_SANITIZE)
7 | # activate the following line for debug purposes only, comment out for production
8 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
9 | LOCAL_VENDOR_MODULE := true
10 | LOCAL_MODULE_TAGS := optional
11 |
12 | LOCAL_SHARED_LIBRARIES := \
13 | liblog \
14 | libutils \
15 | libcutils \
16 | libgps.utils \
17 | libdl \
18 | liblog
19 |
20 | LOCAL_SRC_FILES += \
21 | LocApiBase.cpp \
22 | LocAdapterBase.cpp \
23 | ContextBase.cpp \
24 | LocContext.cpp \
25 | loc_core_log.cpp \
26 | data-items/DataItemsFactoryProxy.cpp \
27 | SystemStatusOsObserver.cpp \
28 | SystemStatus.cpp
29 |
30 | LOCAL_CFLAGS += \
31 | -fno-short-enums \
32 | -D_ANDROID_
33 |
34 | LOCAL_C_INCLUDES:= \
35 | $(LOCAL_PATH)/data-items \
36 | $(LOCAL_PATH)/data-items/common \
37 | $(LOCAL_PATH)/observer \
38 |
39 | LOCAL_HEADER_LIBRARIES := \
40 | libutils_headers \
41 | libgps.utils_headers \
42 | libloc_pla_headers \
43 | liblocation_api_headers
44 |
45 | LOCAL_CFLAGS += $(GNSS_CFLAGS)
46 |
47 | include $(BUILD_SHARED_LIBRARY)
48 |
49 | include $(CLEAR_VARS)
50 | LOCAL_MODULE := libloc_core_headers
51 | LOCAL_EXPORT_C_INCLUDE_DIRS := \
52 | $(LOCAL_PATH) \
53 | $(LOCAL_PATH)/data-items \
54 | $(LOCAL_PATH)/data-items/common \
55 | $(LOCAL_PATH)/observer
56 | include $(BUILD_HEADER_LIBRARY)
57 |
--------------------------------------------------------------------------------
/gps/etc/apdr.conf:
--------------------------------------------------------------------------------
1 | # AP DR SENSOR Configuration file
2 | #
3 | # SENSOR_SERVICE options are one of below
4 | # accel,gyro,vehicle_accel,vehicle_gyro,pedometer,vehicle_odometry,accel_temp,
5 | # gyro_temp,baro,mag_calib,mag_uncalib,amd,rmd.
6 | #
7 | # SENSOR_PROVIDER options is one of -- default,native,ssc,samlite.
8 | #
9 | # SENSOR_RATE = 1~100 (Hz)
10 | #
11 | # SENSOR_SAMPLES = 1~N
12 | #
13 | # SENSOR_STATISTIC_ENABLED
14 | # bit 0: Diag Print Enabled
15 | # bit 1: Adb Print Enabled
16 | # SENSOR_STATISTIC_PRINT_COUNT
17 | # Skip Number of Print
18 | #
19 |
20 | SENSOR_SERVICE = accel
21 | SENSOR_PROVIDER = native
22 | SENSOR_RATE = 100
23 | SENSOR_SAMPLES = 1
24 | SENSOR_STATISTIC_ENABLED = 3
25 | SENSOR_STATISTIC_PRINT_COUNT = 50
26 |
27 | SENSOR_SERVICE = vehicle_accel
28 | SENSOR_PROVIDER = native
29 | SENSOR_RATE = 10
30 | SENSOR_SAMPLES = 1
31 | SENSOR_STATISTIC_ENABLED = 3
32 | SENSOR_STATISTIC_PRINT_COUNT = 50
33 |
34 | SENSOR_SERVICE = gyro
35 | SENSOR_PROVIDER = native
36 | SENSOR_RATE = 100
37 | SENSOR_SAMPLES = 1
38 | SENSOR_STATISTIC_ENABLED = 3
39 | SENSOR_STATISTIC_PRINT_COUNT = 50
40 |
41 | GNSS_POS_STATISTIC_ENABLED = 3
42 | GNSS_POS_STATISTIC_PRNTCNT = 10
43 | GNSS_MSR_STATISTIC_ENABLED = 3
44 | GNSS_MSR_STATISTIC_PRNTCNT = 10
45 |
46 |
--------------------------------------------------------------------------------
/gps/etc/gps.conf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_motorola_addison/daf1d8d27e577517e4dd52560180746f88212165/gps/etc/gps.conf
--------------------------------------------------------------------------------
/gps/etc/lowi.conf:
--------------------------------------------------------------------------------
1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
2 | #
3 | # LOWI Config file
4 | #
5 | # GENERAL DESCRIPTION
6 | # This file contains the config params for LOWI
7 | #
8 | # Copyright (c) 2012-2013 Qualcomm Atheros, Inc.
9 | # All Rights Reserved.
10 | # Qualcomm Atheros Confidential and Proprietary.
11 | #
12 | # Export of this technology or software is regulated by the U.S. Government.
13 | # Diversion contrary to U.S. law prohibited.
14 | #=============================================================================*/
15 |
16 | # X86 ONLY - UBUNTU:
17 | # Copy this file in the same directory where the executable is
18 |
19 | # The RSSI threshold used in the RTT outlier detection in half decibels. Default value recommended by the
20 | # system team currently is -140 (corresponding to -70 dB).
21 | LOWI_RSSI_THRESHOLD_FOR_RTT = -140
22 |
23 | # Number of measurment per AP for RTS/CTS
24 | LOWI_RTS_CTS_NUM_MEAS = 5
25 |
26 | # Maximum Number of Outstanding Requests supported
27 | LOWI_MAX_OUTSTANDING_REQUEST = 255
28 |
29 | # Maximum number of records in Cache
30 | LOWI_MAX_NUM_CACHE_RECORDS = 200
31 |
32 | # Default threshold before issuing another fresh scan (ms)
33 | LOWI_FRESH_SCAN_THRESHOLD = 500
34 |
35 | # Timeout in case no result is reported by the driver (seconds)
36 | LOWI_NO_RESULT_WAIT_TOLERANCE = 10
37 |
38 | # Use Fake Wifi driver. Only valid for engineering builds
39 | LOWI_USE_FAKE_WIFI_DRIVER = 0
40 |
41 | # Use ROME Wifi driver. Only valid for engineering builds
42 | # Will be removed later only for development support
43 | LOWI_USE_ROME_WIFI_DRIVER = 0
44 |
45 | # Use LOWI LP.
46 | # When enabled the Discovery Request will be routed to LOWI-LP
47 | LOWI_USE_LOWI_LP = 1
48 |
49 | # Log level
50 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100
51 | LOWI_LOG_LEVEL = 2
52 |
53 |
--------------------------------------------------------------------------------
/gps/geofence/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE := libgeofencing
6 | LOCAL_SANITIZE += $(GNSS_SANITIZE)
7 | # activate the following line for debug purposes only, comment out for production
8 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
9 | LOCAL_VENDOR_MODULE := true
10 | LOCAL_MODULE_TAGS := optional
11 |
12 | LOCAL_SRC_FILES:= \
13 | GeofenceAdapter.cpp \
14 | location_geofence.cpp
15 |
16 | LOCAL_SHARED_LIBRARIES := \
17 | libutils \
18 | libcutils \
19 | libgps.utils \
20 | liblog \
21 | libloc_core
22 |
23 | LOCAL_HEADER_LIBRARIES := \
24 | libgps.utils_headers \
25 | libloc_core_headers \
26 | libloc_pla_headers \
27 | liblocation_api_headers
28 |
29 | LOCAL_CFLAGS += $(GNSS_CFLAGS)
30 | include $(BUILD_SHARED_LIBRARY)
31 |
--------------------------------------------------------------------------------
/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.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE := libgnss
6 | LOCAL_SANITIZE += $(GNSS_SANITIZE)
7 | # activate the following line for debug purposes only, comment out for production
8 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
9 | LOCAL_VENDOR_MODULE := true
10 | LOCAL_MODULE_TAGS := optional
11 |
12 | LOCAL_SHARED_LIBRARIES := \
13 | libutils \
14 | libcutils \
15 | libdl \
16 | liblog \
17 | libloc_core \
18 | libgps.utils
19 |
20 | LOCAL_SRC_FILES += \
21 | location_gnss.cpp \
22 | GnssAdapter.cpp \
23 | Agps.cpp \
24 | XtraSystemStatusObserver.cpp
25 |
26 | LOCAL_CFLAGS += \
27 | -fno-short-enums \
28 |
29 | ifeq ($(TARGET_BUILD_VARIANT),user)
30 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER
31 | endif
32 |
33 | LOCAL_HEADER_LIBRARIES := \
34 | libgps.utils_headers \
35 | libloc_core_headers \
36 | libloc_pla_headers \
37 | liblocation_api_headers
38 |
39 | LOCAL_CFLAGS += $(GNSS_CFLAGS)
40 |
41 | include $(BUILD_SHARED_LIBRARY)
42 |
--------------------------------------------------------------------------------
/gps/gnsspps/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE := libgnsspps
6 | LOCAL_SANITIZE += $(GNSS_SANITIZE)
7 | # activate the following line for debug purposes only, comment out for production
8 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
9 | LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib
10 | LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64
11 | LOCAL_MODULE_TAGS := optional
12 |
13 | LOCAL_SHARED_LIBRARIES := \
14 | libutils \
15 | libcutils \
16 | libgps.utils \
17 | liblog
18 |
19 | LOCAL_SRC_FILES += \
20 | gnsspps.c
21 |
22 | LOCAL_CFLAGS += \
23 | -fno-short-enums \
24 | -D_ANDROID_
25 |
26 | ## Includes
27 | LOCAL_HEADER_LIBRARIES := \
28 | libgps.utils_headers \
29 | libloc_pla_headers
30 | LOCAL_CFLAGS += $(GNSS_CFLAGS)
31 | include $(BUILD_SHARED_LIBRARY)
32 |
33 | include $(CLEAR_VARS)
34 | LOCAL_MODULE := libgnsspps_headers
35 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
36 | include $(BUILD_HEADER_LIBRARY)
37 |
--------------------------------------------------------------------------------
/gps/gnsspps/gnsspps.h:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
2 | *
3 | * Redistribution and use in source and binary forms, with or without
4 | * modification, are permitted provided that the following conditions are
5 | * met:
6 | * * Redistributions of source code must retain the above copyright
7 | * notice, this list of conditions and the following disclaimer.
8 | * * Redistributions in binary form must reproduce the above
9 | * copyright notice, this list of conditions and the following
10 | * disclaimer in the documentation and/or other materials provided
11 | * with the distribution.
12 | * * Neither the name of The Linux Foundatoin, nor the names of its
13 | * contributors may be used to endorse or promote products derived
14 | * from this software without specific prior written permission.
15 | *
16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | */
28 | #ifndef _GNSSPPS_H
29 | #define _GNSSPPS_H
30 |
31 | #ifdef __cplusplus
32 | extern "C" {
33 | #endif
34 |
35 | /* opens the device and fetches from PPS source */
36 | int initPPS(char *devname);
37 | /* updates the fine time stamp */
38 | int getPPS(struct timespec *current_ts, struct timespec *current_boottime, struct timespec *last_boottime);
39 | /* stops fetching and closes the device */
40 | void deInitPPS();
41 |
42 | #ifdef __cplusplus
43 | }
44 | #endif
45 | #endif
46 |
--------------------------------------------------------------------------------
/gps/gnsspps/gnsspps.pc.in:
--------------------------------------------------------------------------------
1 | prefix=@prefix@
2 | exec_prefix=@exec_prefix@
3 | libdir=@libdir@
4 | includedir=@includedir@
5 |
6 | Name: gnsspps
7 | Description: QTI GPS gnsspps
8 | Version: @VERSION
9 | Libs: -L${libdir} -lgnsspps
10 | Cflags: -I${includedir}/gnsspps
11 |
--------------------------------------------------------------------------------
/gps/loc_sll_if/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(call all-makefiles-under,$(LOCAL_PATH))
4 |
--------------------------------------------------------------------------------
/gps/loc_sll_if/if/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE_OWNER:=qti
6 | LOCAL_MODULE:= loc_sll_if_headers
7 | LOCAL_VENDOR_MODULE := true
8 |
9 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
10 | include $(BUILD_HEADER_LIBRARY)
11 |
--------------------------------------------------------------------------------
/gps/location/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE := liblocation_api
6 | LOCAL_SANITIZE += $(GNSS_SANITIZE)
7 | # activate the following line for debug purposes only, comment out for production
8 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
9 | LOCAL_VENDOR_MODULE := true
10 | LOCAL_MODULE_TAGS := optional
11 |
12 | LOCAL_SHARED_LIBRARIES := \
13 | libutils \
14 | libcutils \
15 | libgps.utils \
16 | libdl \
17 | liblog
18 |
19 | LOCAL_SRC_FILES += \
20 | LocationAPI.cpp \
21 | LocationAPIClientBase.cpp
22 |
23 | LOCAL_CFLAGS += \
24 | -fno-short-enums
25 |
26 | LOCAL_HEADER_LIBRARIES := \
27 | libloc_pla_headers \
28 | libgps.utils_headers
29 |
30 | LOCAL_CFLAGS += $(GNSS_CFLAGS)
31 | include $(BUILD_SHARED_LIBRARY)
32 |
33 | include $(CLEAR_VARS)
34 | LOCAL_MODULE := liblocation_api_headers
35 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
36 | include $(BUILD_HEADER_LIBRARY)
37 |
--------------------------------------------------------------------------------
/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.mk:
--------------------------------------------------------------------------------
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 | LOCAL_PATH := $(call my-dir)
19 |
20 | include $(CLEAR_VARS)
21 | LOCAL_MODULE := libloc_pla_headers
22 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/android
23 | include $(BUILD_HEADER_LIBRARY)
24 |
--------------------------------------------------------------------------------
/gps/synergy_loc_api/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LOCAL_MODULE := libsynergy_loc_api
6 | LOCAL_SANITIZE += $(GNSS_SANITIZE)
7 | # activate the following line for debug purposes only, comment out for production
8 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
9 | LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib
10 | LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64
11 | LOCAL_MODULE_TAGS := optional
12 | LOCAL_VENDOR_MODULE := true
13 |
14 | ifeq ($(TARGET_DEVICE),apq8026_lw)
15 | LOCAL_CFLAGS += -DPDK_FEATURE_SET
16 | else ifeq ($(BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET),true)
17 | LOCAL_CFLAGS += -DPDK_FEATURE_SET
18 | endif
19 |
20 | LOCAL_SHARED_LIBRARIES := \
21 | libutils \
22 | libcutils \
23 | libloc_core \
24 | libgps.utils \
25 | libdl \
26 | liblog
27 |
28 | LOCAL_SRC_FILES = \
29 | SynergyLocApi.cpp
30 |
31 | LOCAL_CFLAGS += \
32 | -fno-short-enums \
33 | -D_ANDROID_
34 |
35 | ## Includes
36 | LOCAL_HEADER_LIBRARIES := \
37 | libloc_core_headers \
38 | libgps.utils_headers \
39 | libloc_pla_headers \
40 | loc_sll_if_headers \
41 | liblocation_api_headers
42 |
43 | LOCAL_CFLAGS += $(GNSS_CFLAGS)
44 | include $(BUILD_SHARED_LIBRARY)
45 |
46 | include $(CLEAR_VARS)
47 | LOCAL_MODULE := libsynergyloc_api_headers
48 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
49 | include $(BUILD_HEADER_LIBRARY)
50 |
--------------------------------------------------------------------------------
/gps/utils/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 |
5 |
6 | ## Libs
7 | LOCAL_SHARED_LIBRARIES := \
8 | libdl \
9 | libutils \
10 | libcutils \
11 | liblog \
12 | libprocessgroup
13 |
14 | LOCAL_SRC_FILES += \
15 | loc_log.cpp \
16 | loc_cfg.cpp \
17 | msg_q.c \
18 | linked_list.c \
19 | loc_target.cpp \
20 | LocHeap.cpp \
21 | LocTimer.cpp \
22 | LocThread.cpp \
23 | MsgTask.cpp \
24 | loc_misc_utils.cpp \
25 | loc_nmea.cpp \
26 | LocIpc.cpp
27 |
28 | # Flag -std=c++11 is not accepted by compiler when LOCAL_CLANG is set to true
29 | LOCAL_CFLAGS += \
30 | -fno-short-enums \
31 | -D_ANDROID_
32 |
33 | ifeq ($(TARGET_BUILD_VARIANT),user)
34 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER
35 | endif
36 |
37 | LOCAL_LDFLAGS += -Wl,--export-dynamic
38 |
39 | ## Includes
40 | LOCAL_HEADER_LIBRARIES := \
41 | libutils_headers \
42 | libloc_pla_headers \
43 | liblocation_api_headers
44 |
45 | LOCAL_MODULE := libgps.utils
46 | LOCAL_SANITIZE += $(GNSS_SANITIZE)
47 | # activate the following line for debug purposes only, comment out for production
48 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG)
49 | LOCAL_VENDOR_MODULE := true
50 | LOCAL_MODULE_TAGS := optional
51 |
52 | LOCAL_CFLAGS += $(GNSS_CFLAGS)
53 |
54 | include $(BUILD_SHARED_LIBRARY)
55 |
56 | include $(CLEAR_VARS)
57 | LOCAL_MODULE := libgps.utils_headers
58 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
59 | include $(BUILD_HEADER_LIBRARY)
60 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/.gitignore:
--------------------------------------------------------------------------------
1 | doxygen/out
2 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/InputEventReader.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2008 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef ANDROID_INPUT_EVENT_READER_H
18 | #define ANDROID_INPUT_EVENT_READER_H
19 |
20 | #include
21 | #include
22 | #include
23 | #include
24 |
25 | /*****************************************************************************/
26 |
27 | struct input_event;
28 |
29 | class InputEventCircularReader
30 | {
31 | struct input_event* const mBuffer;
32 | struct input_event* const mBufferEnd;
33 | struct input_event* mHead;
34 | struct input_event* mCurr;
35 | ssize_t mFreeSpace;
36 |
37 | public:
38 | InputEventCircularReader(size_t numEvents);
39 | ~InputEventCircularReader();
40 | ssize_t fill(int fd);
41 | ssize_t readEvent(input_event const** events);
42 | void next();
43 | };
44 |
45 | /*****************************************************************************/
46 |
47 | #endif // ANDROID_INPUT_EVENT_READER_H
48 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/SensorsLog.h:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | // Sensor log macros that include the function name and line number
4 | #define S_LOGE(format, x...) ALOGE("%s:%d " format, __func__, __LINE__, ##x)
5 | #define S_LOGW(format, x...) ALOGW("%s:%d " format, __func__, __LINE__, ##x)
6 | #define S_LOGI(format, x...) ALOGI("%s:%d " format, __func__, __LINE__, ##x)
7 | #define S_LOGD(format, x...) ALOGD("%s:%d " format, __func__, __LINE__, ##x)
8 | #define S_LOGV(format, x...) ALOGV("%s:%d " format, __func__, __LINE__, ##x)
9 |
10 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/ak09912_akmd_6D_32b/AKCommon.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | *
3 | * $Id: AKCommon.h 983 2013-02-08 04:43:03Z miyazaki.hr $
4 | *
5 | * -- Copyright Notice --
6 | *
7 | * Copyright (c) 2004 Asahi Kasei Microdevices Corporation, Japan
8 | * All Rights Reserved.
9 | *
10 | * This software program is the proprietary program of Asahi Kasei Microdevices
11 | * Corporation("AKM") licensed to authorized Licensee under the respective
12 | * agreement between the Licensee and AKM only for use with AKM's electronic
13 | * compass IC.
14 | *
15 | * THIS SOFTWARE IS PROVIDED TO YOU "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | * EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | * MERCHANTABLITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT OF
18 | * THIRD PARTY RIGHTS, AND WE SHALL NOT BE LIABLE FOR ANY LOSSES AND DAMAGES
19 | * WHICH MAY OCCUR THROUGH USE OF THIS SOFTWARE.
20 | *
21 | * -- End Asahi Kasei Microdevices Copyright Notice --
22 | *
23 | ******************************************************************************/
24 | #ifndef AKMD_INC_AKCOMMON_H
25 | #define AKMD_INC_AKCOMMON_H
26 |
27 | #include //errno
28 | #include //va_list
29 | #include //frpintf
30 | #include //atoi
31 | #include //memset
32 | #include
33 |
34 | #include "AKMLog.h"
35 |
36 | /*** Constant definition ******************************************************/
37 |
38 | /* Definition for operation mode */
39 | #define OPMODE_CONSOLE (0x01)
40 |
41 | /*** Type declaration *********************************************************/
42 |
43 | /*** Global variables *********************************************************/
44 | extern int g_stopRequest; /*!< 0:Not stop, 1:Stop */
45 | extern int g_opmode; /*!< 0:Daemon mode, 1:Console mode. */
46 | extern int g_dbgzone; /*!< Debug zone. */
47 |
48 | /*** Prototype of function ****************************************************/
49 |
50 | #endif //AKMD_INC_AKCOMMON_H
51 |
52 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/ak09912_akmd_6D_32b/Acc_aot.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | *
3 | * $Id: Acc_aot.h 983 2013-02-08 04:43:03Z miyazaki.hr $
4 | *
5 | * -- Copyright Notice --
6 | *
7 | * Copyright (c) 2004 Asahi Kasei Microdevices Corporation, Japan
8 | * All Rights Reserved.
9 | *
10 | * This software program is the proprietary program of Asahi Kasei Microdevices
11 | * Corporation("AKM") licensed to authorized Licensee under the respective
12 | * agreement between the Licensee and AKM only for use with AKM's electronic
13 | * compass IC.
14 | *
15 | * THIS SOFTWARE IS PROVIDED TO YOU "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | * EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | * MERCHANTABLITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT OF
18 | * THIRD PARTY RIGHTS, AND WE SHALL NOT BE LIABLE FOR ANY LOSSES AND DAMAGES
19 | * WHICH MAY OCCUR THROUGH USE OF THIS SOFTWARE.
20 | *
21 | * -- End Asahi Kasei Microdevices Copyright Notice --
22 | *
23 | ******************************************************************************/
24 | #ifndef AKMD_INC_ACCAOT_H
25 | #define AKMD_INC_ACCAOT_H
26 |
27 | #include "AKMD_Driver.h"
28 |
29 | /*** Constant definition ******************************************************/
30 |
31 | /*** Type declaration *********************************************************/
32 |
33 | /*** Global variables *********************************************************/
34 |
35 | /*** Prototype of function ****************************************************/
36 | int16_t AOT_InitDevice(void);
37 | void AOT_DeinitDevice(void);
38 | int16_t AOT_SetEnable(const int8_t enabled);
39 | int16_t AOT_SetDelay(const int64_t ns);
40 | int16_t AOT_GetAccData(int16_t data[3]);
41 | int16_t AOT_GetAccOffset(int16_t offset[3]);
42 | void AOT_GetAccVector(const int16_t data[3], const int16_t offset[3], int16_t vec[3]);
43 |
44 | #endif //AKMD_INC_ACCAOT_H
45 |
46 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/ak09912_akmd_6D_32b/FST.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | *
3 | * $Id: FST.h 983 2013-02-08 04:43:03Z miyazaki.hr $
4 | *
5 | * -- Copyright Notice --
6 | *
7 | * Copyright (c) 2004 Asahi Kasei Microdevices Corporation, Japan
8 | * All Rights Reserved.
9 | *
10 | * This software program is the proprietary program of Asahi Kasei Microdevices
11 | * Corporation("AKM") licensed to authorized Licensee under the respective
12 | * agreement between the Licensee and AKM only for use with AKM's electronic
13 | * compass IC.
14 | *
15 | * THIS SOFTWARE IS PROVIDED TO YOU "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | * EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | * MERCHANTABLITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT OF
18 | * THIRD PARTY RIGHTS, AND WE SHALL NOT BE LIABLE FOR ANY LOSSES AND DAMAGES
19 | * WHICH MAY OCCUR THROUGH USE OF THIS SOFTWARE.
20 | *
21 | * -- End Asahi Kasei Microdevices Copyright Notice --
22 | *
23 | ******************************************************************************/
24 | #ifndef AKMD_INC_FST_H
25 | #define AKMD_INC_FST_H
26 |
27 | #include "AKCommon.h"
28 | #include "AKCompass.h"
29 |
30 | int16 FST_Body(void);
31 |
32 | #endif
33 |
34 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/ak09912_akmd_6D_32b/libSmartCompass/AKCertification.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | *
3 | * $Id: AKCertification.h 255 2014-06-12 06:04:43Z yamada.rj $
4 | *
5 | * -- Copyright Notice --
6 | *
7 | * Copyright (c) 2004 Asahi Kasei Microdevices Corporation, Japan
8 | * All Rights Reserved.
9 | *
10 | * This software program is the proprietary program of Asahi Kasei Microdevices
11 | * Corporation("AKM") licensed to authorized Licensee under the respective
12 | * agreement between the Licensee and AKM only for use with AKM's electronic
13 | * compass IC.
14 | *
15 | * THIS SOFTWARE IS PROVIDED TO YOU "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | * EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | * MERCHANTABLITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT OF
18 | * THIRD PARTY RIGHTS, AND WE SHALL NOT BE LIABLE FOR ANY LOSSES AND DAMAGES
19 | * WHICH MAY OCCUR THROUGH USE OF THIS SOFTWARE.
20 | *
21 | * -- End Asahi Kasei Microdevices Copyright Notice --
22 | *
23 | ******************************************************************************/
24 | #ifndef AKSC_INC_AKCERTIFICATION_H
25 | #define AKSC_INC_AKCERTIFICATION_H
26 |
27 | //========================= Type declaration ===========================//
28 | #define AKSC_CI_MAX_CHARSIZE 16
29 | #define AKSC_CI_MAX_KEYSIZE 16
30 | #define AKSC_CERTIFICATION_CERTIFICATED ((int16)0x0001)
31 | #define AKSC_CERTIFICATION_DENIED ((int16)0x8000)
32 |
33 | //========================= Constant definition =========================//
34 |
35 | //========================= Prototype of Function =======================//
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/ak09912_akmd_6D_32b/libSmartCompass/AKManualCal.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | *
3 | * $Id: AKManualCal.h 255 2014-06-12 06:04:43Z yamada.rj $
4 | *
5 | * -- Copyright Notice --
6 | *
7 | * Copyright (c) 2004 Asahi Kasei Microdevices Corporation, Japan
8 | * All Rights Reserved.
9 | *
10 | * This software program is the proprietary program of Asahi Kasei Microdevices
11 | * Corporation("AKM") licensed to authorized Licensee under the respective
12 | * agreement between the Licensee and AKM only for use with AKM's electronic
13 | * compass IC.
14 | *
15 | * THIS SOFTWARE IS PROVIDED TO YOU "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | * EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | * MERCHANTABLITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT OF
18 | * THIRD PARTY RIGHTS, AND WE SHALL NOT BE LIABLE FOR ANY LOSSES AND DAMAGES
19 | * WHICH MAY OCCUR THROUGH USE OF THIS SOFTWARE.
20 | *
21 | * -- End Asahi Kasei Microdevices Copyright Notice --
22 | *
23 | ******************************************************************************/
24 | #ifndef AKSC_INC_AKMANUALCAL_H
25 | #define AKSC_INC_AKMANUALCAL_H
26 |
27 | #include "AKMDevice.h"
28 |
29 | //========================= Type declaration ===========================//
30 |
31 | //========================= Constant definition =========================//
32 |
33 | //========================= Prototype of Function =======================//
34 | AKLIB_C_API_START
35 | int16 AKSC_HOffsetCal( //(o) : Calibration success(1), failure(0)
36 | const int16vec hdata[], //(i) : Geomagnetic vectors(the size must be 3)
37 | int16vec *ho //(o) : Offset(5Q11)
38 | );
39 |
40 | AKLIB_C_API_END
41 |
42 | #endif
43 |
44 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/ak09912_akmd_6D_32b/libSmartCompass/AKVersion.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | *
3 | * $Id: AKVersion.h 176 2013-06-27 08:36:56Z yamada.rj $
4 | *
5 | * -- Copyright Notice --
6 | *
7 | * Copyright (c) 2004 Asahi Kasei Microdevices Corporation, Japan
8 | * All Rights Reserved.
9 | *
10 | * This software program is the proprietary program of Asahi Kasei Microdevices
11 | * Corporation("AKM") licensed to authorized Licensee under the respective
12 | * agreement between the Licensee and AKM only for use with AKM's electronic
13 | * compass IC.
14 | *
15 | * THIS SOFTWARE IS PROVIDED TO YOU "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | * EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | * MERCHANTABLITY, FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT OF
18 | * THIRD PARTY RIGHTS, AND WE SHALL NOT BE LIABLE FOR ANY LOSSES AND DAMAGES
19 | * WHICH MAY OCCUR THROUGH USE OF THIS SOFTWARE.
20 | *
21 | * -- End Asahi Kasei Microdevices Copyright Notice --
22 | *
23 | ******************************************************************************/
24 | #ifndef AKSC_INC_AKVERSION_H
25 | #define AKSC_INC_AKVERSION_H
26 |
27 | #include "AKMDevice.h"
28 |
29 | //========================= Type declaration ===========================//
30 |
31 | //========================= Constant definition =========================//
32 |
33 | //========================= Prototype of Function =======================//
34 | AKLIB_C_API_START
35 | int16 AKSC_GetVersion_Major(void);
36 | int16 AKSC_GetVersion_Minor(void);
37 | int16 AKSC_GetVersion_Revision(void);
38 | int16 AKSC_GetVersion_DateCode(void);
39 | int16 AKSC_GetVersion_Variation(void);
40 | int16 AKSC_GetVersion_Device(void);
41 | AKLIB_C_API_END
42 |
43 | #endif
44 |
45 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/ak09912_akmd_6D_32b/libSmartCompass/arm/libAK09912.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_motorola_addison/daf1d8d27e577517e4dd52560180746f88212165/hardware-moto-sensors/ak09912_akmd_6D_32b/libSmartCompass/arm/libAK09912.a
--------------------------------------------------------------------------------
/hardware-moto-sensors/ak09912_akmd_6D_32b/libSmartCompass/arm64/libAK09912.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_motorola_addison/daf1d8d27e577517e4dd52560180746f88212165/hardware-moto-sensors/ak09912_akmd_6D_32b/libSmartCompass/arm64/libAK09912.a
--------------------------------------------------------------------------------
/hardware-moto-sensors/capsensor/Android.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2015 Motorola Mobility, Inc.
2 | # Copyright (C) 2008 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | ifeq ($(BOARD_USES_CAP_SENSOR_SX9310), true)
17 | LOCAL_PATH := $(call my-dir)
18 |
19 | include $(CLEAR_VARS)
20 | LOCAL_MODULE := capsense_reset
21 | LOCAL_SRC_FILES := capsense.cpp
22 | LOCAL_SHARED_LIBRARIES := libc liblog libcutils libhardware_legacy
23 | LOCAL_MODULE_TAGS := optional
24 | LOCAL_VENDOR_MODULE := true
25 | LOCAL_MODULE_OWNER := moto
26 | include $(BUILD_EXECUTABLE)
27 | endif
28 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/capsensor/capsense.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include // for PAGE_SIZE
9 | #include
10 | #include
11 |
12 | #define LOG_TAG "hsj-listen"
13 | #define CAPRESET "/sys/class/capsense/reset"
14 | #define HSJ_EV "change@/devices/virtual/switch/h2w"
15 |
16 | void uevent_handler(void *data, const char *msg, int msg_len);
17 |
18 | int main(void)
19 | {
20 | static char uevent_data[PAGE_SIZE];
21 | int len;
22 |
23 | uevent_data[PAGE_SIZE-1] = '\0';
24 |
25 | uevent_init();
26 |
27 | // never returns
28 | while (1) {
29 | len = uevent_next_event(uevent_data, (int)(sizeof(uevent_data)) - 1);
30 | if(!strncmp(uevent_data, HSJ_EV, len)) {
31 | int fd = open(CAPRESET, O_WRONLY);
32 | if (fd < 0) {
33 | KLOG_ERROR(LOG_TAG, "Can't open capreset, %s\n", strerror(errno));
34 | continue;
35 | }
36 | len = TEMP_FAILURE_RETRY(write(fd, "1", 1));
37 | if (len < 1) {
38 | KLOG_ERROR(LOG_TAG, "Can't write capreset, %s\n", strerror(errno));
39 | }
40 | close(fd);
41 | }
42 | }
43 |
44 | return 0;
45 | }
46 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/doxygen/README.md:
--------------------------------------------------------------------------------
1 | Sensors HAL
2 | ===========
3 |
4 | Dynamic Sensors Overview
5 | ========================
6 |
7 | There are 3 main components to the dynamic sensors:
8 |
9 | 1. The [GreyBus interface](@ref doxygen/GreyBus.md) between the phone's
10 | kernel GreyBus module and the MOD
11 | 2. The [IIO interface](@ref doxygen/IIO.md) between the kernel GreyBus
12 | module and user-space
13 | 3. The [IIO HAL](@ref doxygen/HAL.md) (or sub-HAL) interface between the
14 | kernel `sysfs` and the Android framework.
15 |
16 | Each one will be discussed and documented in a separate chapter.
17 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/iio_hal/Android.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2015 Motorola Mobility, Inc.
2 | # Copyright (C) 2008 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | LOCAL_PATH := $(call my-dir)
17 |
18 | include $(CLEAR_VARS)
19 |
20 | LOCAL_MODULE := sensors.iio
21 | LOCAL_MODULE_TAGS := optional
22 | LOCAL_MULTILIB := both
23 |
24 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
25 | LOCAL_CFLAGS += -DDEBUG
26 | endif
27 |
28 | LOCAL_CFLAGS += -DLOG_TAG=\"IioSensors\"
29 |
30 | LOCAL_SRC_FILES := \
31 | Hal.cpp \
32 | IioHal.cpp \
33 | DynamicMetaSensor.cpp \
34 | IioSensor.cpp \
35 | UeventListener.cpp \
36 | ../motosh_hal/SensorBase.cpp
37 |
38 | LOCAL_C_INCLUDES += \
39 | $(LOCAL_PATH)/.. \
40 | $(LOCAL_PATH)/../motosh_hal \
41 | system/core/base/include \
42 | external/libselinux/include \
43 |
44 |
45 | LOCAL_SHARED_LIBRARIES += libiio.vendor libcrypto
46 | LOCAL_HEADER_LIBRARIES := libutils_headers libhardware_headers libiio.vendor_headers
47 | LOCAL_HEADER_LIBRARIES += generated_kernel_headers
48 | LOCAL_SHARED_LIBRARIES += liblog libcutils libutils libc libbase libselinux
49 | LOCAL_CFLAGS += -Wall -Wextra
50 | LOCAL_CXXFLAGS += -Weffc++ -std=c++14
51 |
52 | #LOCAL_PRELINK_MODULE := false
53 |
54 | LOCAL_VENDOR_MODULE := true
55 |
56 | include $(BUILD_SHARED_LIBRARY)
57 |
58 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/iio_hal/Hal.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 Motorola Mobility
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include "IioHal.h"
18 |
19 | /** This is it. The entry point to this HAL. Every hardware module must have a
20 | * data structure named HAL_MODULE_INFO_SYM. IioHal provides the specialization
21 | * necessary to make this a Dynamic IIO Sensors HAL. */
22 | SensorsModuleT< IioHal > HAL_MODULE_INFO_SYM("Dynamic IIO Sensors Module");
23 |
24 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/iio_utils/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | ifeq ($(MOT_SENSOR_HUB_HW_TYPE_L4), true)
4 |
5 | ################################################################################
6 | ## lsiio #######################################################################
7 | include $(CLEAR_VARS)
8 | LOCAL_MODULE_TAGS := optional
9 | LOCAL_MODULE := lsiio
10 | LOCAL_CFLAGS += -Wall -Wextra
11 |
12 | LOCAL_SRC_FILES := lsiio.c
13 |
14 | LOCAL_HEADER_LIBRARIES += generated_kernel_headers
15 |
16 | include $(BUILD_EXECUTABLE)
17 |
18 | ################################################################################
19 | ## IIO Event Monitor ###########################################################
20 | include $(CLEAR_VARS)
21 | LOCAL_MODULE_TAGS := optional
22 | LOCAL_MODULE := iio_event_monitor
23 | LOCAL_CFLAGS += -Wall -Wextra
24 |
25 | LOCAL_SRC_FILES := iio_event_monitor.c
26 |
27 | LOCAL_HEADER_LIBRARIES += generated_kernel_headers
28 |
29 | include $(BUILD_EXECUTABLE)
30 |
31 | ################################################################################
32 | ## Generic Buffer ##############################################################
33 | include $(CLEAR_VARS)
34 | LOCAL_MODULE_TAGS := optional
35 | LOCAL_MODULE := generic_buffer
36 | LOCAL_CFLAGS += -Wall -Wextra
37 |
38 | LOCAL_SRC_FILES := generic_buffer.c
39 |
40 | LOCAL_HEADER_LIBRARIES += generated_kernel_headers
41 |
42 | include $(BUILD_EXECUTABLE)
43 |
44 | endif # MOT_SENSOR_HUB_HW_TYPE_L4
45 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/iio_utils/NOTICE:
--------------------------------------------------------------------------------
1 | Industrialio event test code.
2 |
3 | Copyright (c) 2011-2012 Lars-Peter Clausen
4 |
5 | This program is free software; you can redistribute it and/or modify it
6 | under the terms of the GNU General Public License version 2 as published by
7 | the Free Software Foundation.
8 |
9 | This program is primarily intended as an example application.
10 | Reads the current buffer setup from sysfs and starts a short capture
11 | from the specified device, pretty printing the result after appropriate
12 | conversion.
13 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/iio_utils/README:
--------------------------------------------------------------------------------
1 | This directory contains some IIO utilities from the Linux Kernel's
2 | drivers/staging/iio/Documentation directory.
3 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/libiio/Android.bp:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Android Open Source Project
2 |
3 | cc_library_headers {
4 | name: "libiio.vendor_headers",
5 | export_include_dirs: ["include"],
6 | }
7 |
8 | cc_library_shared {
9 | name: "libiio.vendor",
10 | vendor_available: true,
11 | srcs: [
12 | "src/backend.c",
13 | "src/buffer.c",
14 | "src/channel.c",
15 | "src/context.c",
16 | "src/device.c",
17 | "src/local.c",
18 | "src/scan.c",
19 | "src/sort.c",
20 | "src/utilities.c",
21 | ],
22 |
23 | cflags: [
24 | "-Wall",
25 | "-Werror",
26 | "-Wno-sign-compare",
27 | "-Wno-unused-parameter",
28 | ],
29 | }
30 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/libiio/src:
--------------------------------------------------------------------------------
1 | ../../../../../external/libiio/src/
--------------------------------------------------------------------------------
/hardware-moto-sensors/libsensorhub/Android.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009-2015 Motorola Mobility, Inc.
2 | # Copyright (C) 2008 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | LOCAL_PATH := $(call my-dir)
17 |
18 | include $(CLEAR_VARS)
19 |
20 | LOCAL_MODULE := libsensorhub
21 | LOCAL_MODULE_TAGS := optional
22 |
23 | ifeq ($(MOT_SENSOR_HUB_HW_TYPE_L4), true)
24 | LOCAL_CFLAGS += -DMOTOSH
25 | else ifeq ($(MOT_SENSOR_HUB_HW_TYPE_L0), true)
26 | LOCAL_CFLAGS += -DSTML0XX
27 | endif
28 |
29 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
30 | LOCAL_CFLAGS += -DDEBUG
31 | endif
32 |
33 | LOCAL_SRC_FILES := \
34 | SensorHub.cpp Endian.cpp
35 |
36 | LOCAL_HEADER_LIBRARIES += generated_kernel_headers
37 |
38 | LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libc
39 | LOCAL_CFLAGS += -Wall -Wextra
40 | LOCAL_CXXFLAGS += -Weffc++ -std=c++14
41 |
42 | LOCAL_VENDOR_MODULE := true
43 |
44 | include $(BUILD_SHARED_LIBRARY)
45 |
46 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/libsensorhub/Endian.cpp:
--------------------------------------------------------------------------------
1 | #include "Endian.hpp"
2 |
3 | const Endian::TestUnion Endian::test = { 0x01020408 };
4 | const bool Endian::bigEndian = Endian::test.v[0] == 1;
5 |
6 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/motosh_bin/CRC32.h:
--------------------------------------------------------------------------------
1 | #ifndef CRC_32_H
2 | #define CRC_32_H
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | #include
9 | #include
10 |
11 | uint32_t calculateCrc32(uint8_t *data, size_t dataLen);
12 | int calculateFileCrc32(char *filePath, size_t dataLen, uint8_t fill, uint32_t *outCrc);
13 |
14 | #ifdef __cplusplus
15 | }
16 | #endif
17 | #endif
18 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/motosh_bin/sensorhub-blacklist.txt:
--------------------------------------------------------------------------------
1 | # Lines with a '#' in the first column are ignored.
2 | # Empty lines will also be ignored.
3 | #
4 | # This file should contain the CRC32 (as computed by motosh) of all firmware
5 | # versions released through the PlayStore. The assumption is that any features
6 | # or fixes present in these firmware versions have already been incorporated
7 | # into the build containing this blacklist, and therefore should be deleted
8 | # by motosh if encountered.
9 | #
10 | # The format is 8 ASCII-HEX characters, with no leading "0x", one per line.
11 | # For example: abcdef57
12 | #
13 | # For easier tracking, please include a comment above each entry containing
14 | # the version string of the firmware.
15 |
16 |
17 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/motosh_hal/Android.mk:
--------------------------------------------------------------------------------
1 |
2 | LOCAL_PATH := $(call my-dir)
3 |
4 | LOCAL_HEADER_LIBRARIES += generated_kernel_headers
5 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/motosh_hal/SensorHal.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2015 Motorola Mobility
3 | *
4 | * Copyright (C) 2008 The Android Open Source Project
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | #include "SensorsPollContext.h"
20 |
21 | /** This is the HAL entry point. The main() equivalent. Every hardware module
22 | * must have a data structure named HAL_MODULE_INFO_SYM. */
23 | SensorsModuleT< SensorsPollContext > HAL_MODULE_INFO_SYM("Motorola Sensors Module");
24 |
25 |
--------------------------------------------------------------------------------
/hardware-moto-sensors/motosh_hal/SensorsPollContext.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009-2015 Motorola Mobility
3 | *
4 | * Copyright (C) 2008 The Android Open Source Project
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | #ifndef SENSORS_POLL_CONTEXT_H
20 | #define SENSORS_POLL_CONTEXT_H
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include