├── configs ├── sensors │ └── hals.conf ├── external_camera_config.xml ├── public.libraries.txt └── check_features.sh ├── sepolicy ├── app.te ├── atfwd.te ├── nfc.te ├── wcnss_filter.te ├── healthd.te ├── vendor_ssr_setup.te ├── esepmdaemon.te ├── mediacodec.te ├── persist_file.te ├── rfs_file.te ├── firmware_file.te ├── qtelephony.te ├── untrusted_app_25.te ├── untrusted_app_27.te ├── hal_wifi_default.te ├── netd.te ├── vold.te ├── hal_light_default.te ├── netutils_wrapper.te ├── genfs_contexts ├── location.te ├── radio.te ├── hal_graphics_composer_default.te ├── zygote.te ├── mediadrmserver.te ├── energyawareness.te ├── kernel.te ├── audioserver.te ├── cnd.te ├── hal_audio_default.te ├── dataservice_app.te ├── qseeproxy.te ├── qti.te ├── hwservice.te ├── hal_power_default.te ├── per_mgr.te ├── service.te ├── ims.te ├── installd.te ├── time_daemon.te ├── seapp_contexts ├── mediaextractor.te ├── hal_health_default.te ├── hal_drm_default.te ├── ueventd.te ├── akmd.te ├── tee.te ├── priv_app.te ├── property.te ├── service_contexts ├── platform_app.te ├── surfaceflinger.te ├── rfs_access.te ├── hwservicemanager.te ├── bootanim.te ├── hal_nfc_default.te ├── untrusted_app.te ├── device.te ├── qti_init_shell.te ├── thermal-engine.te ├── toolbox.te ├── sensor_hub.te ├── init_wifi.te ├── rmt_storage.te ├── adspd.te ├── wcnss_service.te ├── vendor_init.te ├── netmgrd.te ├── mmi_laser.te ├── property_contexts ├── mmi_boot.te ├── fingerprintd.te ├── hal_camera_default.te ├── isdbt_app.te ├── system_app.te ├── hal_sensors_default.te ├── rild.te ├── hwservice_contexts ├── system_server.te ├── hal_fingerprint_fpc.te ├── hal_gnss_qti.te ├── perfd.te ├── charge_only.te ├── hal_fingerprint_default.te ├── servicemanager.te └── mm-qcamerad.te ├── hardware-moto-sensors ├── motosh_hal │ ├── Android.mk │ └── SensorHal.cpp ├── libsensorhub │ ├── Endian.cpp │ └── Android.mk ├── ak09912_akmd_6D_32b │ ├── libSmartCompass │ │ ├── arm │ │ │ └── libAK09912.a │ │ ├── arm64 │ │ │ └── libAK09912.a │ │ ├── AKCertification.h │ │ ├── AKManualCal.h │ │ └── AKVersion.h │ ├── FST.h │ └── Acc_aot.h ├── motosh_bin │ ├── CRC32.h │ └── sensorhub-blacklist.txt ├── SensorsLog.h ├── doxygen │ └── README.md ├── utils │ ├── sensor_time.cpp │ └── sensor_time.h ├── stml0xx_hal │ ├── FusionSensorBase.cpp │ ├── RotationVector.h │ ├── GeoMagRotationVector.h │ ├── LinearAccelGravity.h │ ├── RotationVector.cpp │ ├── SensorList.h │ ├── CapSense.h │ ├── GyroIntegration.h │ └── RearProxSensor.h ├── vl53l0_hal │ ├── TofModule.cpp │ └── Android.mk ├── tof_hal │ ├── TofModule.cpp │ └── Android.mk ├── capsensor │ ├── Android.mk │ └── capsense.cpp ├── rearProx │ ├── Android.mk │ ├── InputEventReader.h │ ├── CapSensor.h │ └── ProximitySensor.h └── InputEventReader.h ├── wifi ├── p2p_supplicant_overlay.conf └── wpa_supplicant_overlay.conf ├── LineageActions ├── res │ ├── mipmap-hdpi │ │ ├── ic_background.png │ │ └── ic_foreground.png │ ├── mipmap-mdpi │ │ ├── ic_background.png │ │ └── ic_foreground.png │ ├── mipmap-xhdpi │ │ ├── ic_background.png │ │ └── ic_foreground.png │ ├── mipmap-xxhdpi │ │ ├── ic_background.png │ │ └── ic_foreground.png │ ├── mipmap-xxxhdpi │ │ ├── ic_background.png │ │ └── ic_foreground.png │ ├── drawable │ │ ├── switchbar_background.xml │ │ ├── ic_settings_gestures_dashboard.xml │ │ ├── ic_settings_gestures.xml │ │ ├── ic_settings_screen_off_gestures.xml │ │ └── ic_settings_doze.xml │ ├── mipmap-anydpi │ │ └── ic_launcher.xml │ ├── layout │ │ ├── doze.xml │ │ └── fp_gesture.xml │ └── xml │ │ ├── doze_panel_indexable.xml │ │ ├── fp_gesture_panel_indexable.xml │ │ ├── screen_off_gesture_panel_indexable.xml │ │ └── doze_panel.xml ├── src │ └── org │ │ └── lineageos │ │ └── settings │ │ └── device │ │ ├── SensorAction.java │ │ ├── actions │ │ └── UpdatedStateNotifier.java │ │ ├── doze │ │ ├── ScreenStateNotifier.java │ │ └── ScreenReceiver.java │ │ ├── DozeSettingsActivity.java │ │ ├── GestureSettingsActivity.java │ │ ├── ActionsPreferenceActivity.java │ │ ├── FPGestureSettingsActivity.java │ │ ├── ScreenOffGestureSettingsActivity.java │ │ ├── GestureSettingsFragment.java │ │ ├── ActionsPreferenceFragment.java │ │ └── util │ │ └── ProximityUtils.java └── Android.mk ├── gps ├── android │ ├── android.hardware.gnss@1.1-service-qti.rc │ ├── service.cpp │ └── GnssDebug.h ├── Android.mk ├── Makefile.am ├── core │ ├── loc-core.pc.in │ └── Android.mk ├── gnsspps │ ├── gnsspps.pc.in │ ├── Android.mk │ └── Makefile.am ├── utils │ ├── gps-utils.pc.in │ ├── Android.mk │ └── Makefile.am ├── location │ ├── location-api.pc.in │ ├── Android.mk │ └── Makefile.am ├── loc-hal.pc.in ├── build │ └── target_specific_features.mk ├── pla │ └── Android.mk ├── gnss │ ├── Makefile.am │ └── Android.mk └── etc │ └── lowi.conf ├── seccomp_policy ├── mediaextractor.policy └── mediacodec.policy ├── thermal-engine └── Android.mk ├── rootdir └── etc │ ├── init.qcom.ril.sh │ ├── wlan_carrier_bin.sh │ ├── init.mmi.laser.sh │ └── init.mmi.boot.sh ├── init └── Android.mk ├── libshims ├── justshoot_shim.cpp └── Android.mk ├── dtbtool └── Android.mk ├── idc └── uinput-fpc.idc ├── keylayout ├── uinput-fpc.kl ├── ft5x06_ts.kl ├── synaptics_dsx.kl ├── synaptics_dsxv26.kl ├── synaptics_rmi4_i2c.kl └── gpio-keys.kl ├── lineage.dependencies ├── AndroidProducts.mk ├── vndk ├── vndk-sp-libs.mk └── Android.mk ├── overlay-lineage ├── packages │ └── apps │ │ └── Dialer │ │ └── res │ │ └── values │ │ └── config.xml └── frameworks │ └── base │ └── core │ └── res │ └── res │ └── values │ └── config.xml ├── README.md ├── overlay ├── frameworks │ └── base │ │ ├── packages │ │ ├── SystemUI │ │ │ └── res │ │ │ │ ├── values-sw372dp │ │ │ │ └── dimens.xml │ │ │ │ └── values │ │ │ │ └── config.xml │ │ └── SettingsProvider │ │ │ └── res │ │ │ └── values │ │ │ └── defaults.xml │ │ └── core │ │ └── res │ │ └── res │ │ ├── values-mcc302-mnc220 │ │ └── config.xml │ │ ├── values-mcc302-mnc221 │ │ └── config.xml │ │ ├── values-mcc302-mnc370 │ │ └── config.xml │ │ ├── values-mcc302-mnc610 │ │ └── config.xml │ │ ├── values-mcc302-mnc640 │ │ └── config.xml │ │ ├── values-mcc302-mnc720 │ │ └── config.xml │ │ └── values │ │ └── strings.xml └── packages │ ├── apps │ ├── DocumentsUI │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ ├── Settings │ │ └── res │ │ │ └── values │ │ │ ├── dimens.xml │ │ │ ├── config.xml │ │ │ └── arrays.xml │ └── Snap │ │ └── res │ │ └── values │ │ ├── qcomstrings.xml │ │ └── config.xml │ └── services │ └── Telephony │ └── res │ └── values │ └── config.xml ├── include ├── surround_rec_interface.h └── sound_trigger_prop_intf.h ├── liblight └── Android.mk ├── thermal └── Android.mk ├── audio └── audio_ext_spkr.conf ├── releasetools └── releasetools.py ├── libhidl └── Android.mk ├── bluetooth └── bdroid_buildcfg.h ├── lineagehw └── src │ └── org │ └── lineageos │ └── hardware │ └── KeyDisabler.java ├── lineage_potter.mk └── setup-makefiles.sh /configs/sensors/hals.conf: -------------------------------------------------------------------------------- 1 | sensors.ssc.so 2 | sensors.iio.so 3 | -------------------------------------------------------------------------------- /sepolicy/app.te: -------------------------------------------------------------------------------- 1 | get_prop(system_app, vendor_camera_prop); 2 | -------------------------------------------------------------------------------- /sepolicy/atfwd.te: -------------------------------------------------------------------------------- 1 | allow atfwd sysfs:file { open read }; 2 | -------------------------------------------------------------------------------- /sepolicy/nfc.te: -------------------------------------------------------------------------------- 1 | allow nfc nfc_vendor_data_file:dir search; 2 | -------------------------------------------------------------------------------- /sepolicy/wcnss_filter.te: -------------------------------------------------------------------------------- 1 | get_prop(wcnss_filter, diag_prop); 2 | -------------------------------------------------------------------------------- /sepolicy/healthd.te: -------------------------------------------------------------------------------- 1 | allow healthd sysfs:file { getattr open read }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor_ssr_setup.te: -------------------------------------------------------------------------------- 1 | allow vendor_ssr_setup sysfs:file read; 2 | -------------------------------------------------------------------------------- /sepolicy/esepmdaemon.te: -------------------------------------------------------------------------------- 1 | binder_call(esepmdaemon, servicemanager); 2 | 3 | -------------------------------------------------------------------------------- /sepolicy/mediacodec.te: -------------------------------------------------------------------------------- 1 | allow mediacodec firmware_file:file { open read }; 2 | -------------------------------------------------------------------------------- /sepolicy/persist_file.te: -------------------------------------------------------------------------------- 1 | allow persist_file self:filesystem associate; 2 | -------------------------------------------------------------------------------- /sepolicy/rfs_file.te: -------------------------------------------------------------------------------- 1 | allow rfs_file persist_file:filesystem associate; 2 | -------------------------------------------------------------------------------- /sepolicy/firmware_file.te: -------------------------------------------------------------------------------- 1 | allow firmware_file rootfs:filesystem associate; 2 | 3 | -------------------------------------------------------------------------------- /sepolicy/qtelephony.te: -------------------------------------------------------------------------------- 1 | allow qtelephony radio_service:service_manager find; 2 | -------------------------------------------------------------------------------- /sepolicy/untrusted_app_25.te: -------------------------------------------------------------------------------- 1 | get_prop(untrusted_app_25, vendor_camera_prop); 2 | -------------------------------------------------------------------------------- /sepolicy/untrusted_app_27.te: -------------------------------------------------------------------------------- 1 | get_prop(untrusted_app_27, vendor_camera_prop); 2 | -------------------------------------------------------------------------------- /hardware-moto-sensors/motosh_hal/Android.mk: -------------------------------------------------------------------------------- 1 | 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | -------------------------------------------------------------------------------- /sepolicy/hal_wifi_default.te: -------------------------------------------------------------------------------- 1 | allow hal_wifi_default kernel:system module_request; 2 | -------------------------------------------------------------------------------- /sepolicy/netd.te: -------------------------------------------------------------------------------- 1 | allow netd untrusted_app_25:unix_stream_socket { read write }; 2 | 3 | -------------------------------------------------------------------------------- /sepolicy/vold.te: -------------------------------------------------------------------------------- 1 | allow vold metadata_block_device:blk_file { rw_file_perms }; 2 | 3 | -------------------------------------------------------------------------------- /sepolicy/hal_light_default.te: -------------------------------------------------------------------------------- 1 | allow hal_light_default sysfs:file { open read write }; 2 | -------------------------------------------------------------------------------- /sepolicy/netutils_wrapper.te: -------------------------------------------------------------------------------- 1 | allow netutils_wrapper netmgrd:socket { read write }; 2 | 3 | -------------------------------------------------------------------------------- /sepolicy/genfs_contexts: -------------------------------------------------------------------------------- 1 | genfscon sysfs /devices/soc/soc:qcom,cpubw u:object_r:sysfs_msm_subsys:s0 2 | -------------------------------------------------------------------------------- /wifi/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_no_group_iface=1 3 | persistent_reconnect=1 -------------------------------------------------------------------------------- /sepolicy/location.te: -------------------------------------------------------------------------------- 1 | allow location sysfs:file r_file_perms; 2 | allow location kernel:system module_request; 3 | -------------------------------------------------------------------------------- /sepolicy/radio.te: -------------------------------------------------------------------------------- 1 | allow radio system_app_data_file:dir getattr; 2 | allow radio qmuxd_socket:sock_file write; 3 | -------------------------------------------------------------------------------- /sepolicy/hal_graphics_composer_default.te: -------------------------------------------------------------------------------- 1 | allow hal_graphics_composer_default persist_file:dir { getattr search }; 2 | -------------------------------------------------------------------------------- /sepolicy/zygote.te: -------------------------------------------------------------------------------- 1 | allow zygote self:capability sys_nice; 2 | allow zygote proc_cmdline:file { getattr open read }; 3 | -------------------------------------------------------------------------------- /sepolicy/mediadrmserver.te: -------------------------------------------------------------------------------- 1 | allow mediadrmserver firmware_file:dir search; 2 | allow mediadrmserver firmware_file:file r_file_perms; 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /sepolicy/energyawareness.te: -------------------------------------------------------------------------------- 1 | allow energyawareness sysfs_uio:file r_file_perms; 2 | allow energyawareness sysfs_rmt_storage:file r_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/kernel.te: -------------------------------------------------------------------------------- 1 | allow kernel hw_block_device:blk_file rw_file_perms; 2 | allow kernel vfat:file open; 3 | allow kernel self:socket create; 4 | -------------------------------------------------------------------------------- /sepolicy/audioserver.te: -------------------------------------------------------------------------------- 1 | allow audioserver sysfs:dir { open read }; 2 | allow audioserver vendor_data_file:file { append getattr open read write }; 3 | -------------------------------------------------------------------------------- /LineageActions/res/mipmap-hdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boulzordev/android_device_motorola_potter/HEAD/LineageActions/res/mipmap-hdpi/ic_background.png -------------------------------------------------------------------------------- /LineageActions/res/mipmap-hdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boulzordev/android_device_motorola_potter/HEAD/LineageActions/res/mipmap-hdpi/ic_foreground.png -------------------------------------------------------------------------------- /LineageActions/res/mipmap-mdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boulzordev/android_device_motorola_potter/HEAD/LineageActions/res/mipmap-mdpi/ic_background.png -------------------------------------------------------------------------------- /LineageActions/res/mipmap-mdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boulzordev/android_device_motorola_potter/HEAD/LineageActions/res/mipmap-mdpi/ic_foreground.png -------------------------------------------------------------------------------- /sepolicy/cnd.te: -------------------------------------------------------------------------------- 1 | allow cnd system_wpa_socket:sock_file { unlink }; 2 | allow cnd diag_device:chr_file { read write }; 3 | 4 | allow cnd sysfs:file { read open }; 5 | 6 | -------------------------------------------------------------------------------- /LineageActions/res/mipmap-xhdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boulzordev/android_device_motorola_potter/HEAD/LineageActions/res/mipmap-xhdpi/ic_background.png -------------------------------------------------------------------------------- /LineageActions/res/mipmap-xhdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boulzordev/android_device_motorola_potter/HEAD/LineageActions/res/mipmap-xhdpi/ic_foreground.png -------------------------------------------------------------------------------- /LineageActions/res/mipmap-xxhdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boulzordev/android_device_motorola_potter/HEAD/LineageActions/res/mipmap-xxhdpi/ic_background.png -------------------------------------------------------------------------------- /LineageActions/res/mipmap-xxhdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boulzordev/android_device_motorola_potter/HEAD/LineageActions/res/mipmap-xxhdpi/ic_foreground.png -------------------------------------------------------------------------------- /sepolicy/hal_audio_default.te: -------------------------------------------------------------------------------- 1 | allow hal_audio_default vendor_data_file:dir {add_name rw_file_perms }; 2 | allow hal_audio_default vendor_data_file:file create_file_perms; 3 | -------------------------------------------------------------------------------- /LineageActions/res/mipmap-xxxhdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boulzordev/android_device_motorola_potter/HEAD/LineageActions/res/mipmap-xxxhdpi/ic_background.png -------------------------------------------------------------------------------- /LineageActions/res/mipmap-xxxhdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boulzordev/android_device_motorola_potter/HEAD/LineageActions/res/mipmap-xxxhdpi/ic_foreground.png -------------------------------------------------------------------------------- /sepolicy/dataservice_app.te: -------------------------------------------------------------------------------- 1 | binder_call(dataservice_app, cnd) 2 | 3 | allow dataservice_app cnd_data_file:file r_file_perms; 4 | allow dataservice_app cnd_data_file:dir search; 5 | -------------------------------------------------------------------------------- /sepolicy/qseeproxy.te: -------------------------------------------------------------------------------- 1 | binder_call(qseeproxy, servicemanager); 2 | allow qseeproxy self:process getattr; 3 | allow qseeproxy qseeproxy_service_old:service_manager { add find }; 4 | -------------------------------------------------------------------------------- /sepolicy/qti.te: -------------------------------------------------------------------------------- 1 | get_prop(qti, diag_prop) 2 | allow qti diag_device:chr_file { read write }; 3 | allow qti sysfs:file { open read }; 4 | allow qti vendor_data_file:dir r_dir_perms; 5 | -------------------------------------------------------------------------------- /sepolicy/hwservice.te: -------------------------------------------------------------------------------- 1 | type nxpnfc_hwservice, hwservice_manager_type; 2 | type nxpese_hwservice, hwservice_manager_type; 3 | type fpc_extension_service, hwservice_manager_type; 4 | 5 | -------------------------------------------------------------------------------- /gps/android/android.hardware.gnss@1.1-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@1.1-service-qti 2 | class hal 3 | user gps 4 | group system gps radio 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /sepolicy/hal_power_default.te: -------------------------------------------------------------------------------- 1 | allow hal_power_default sysfs:file rw_file_perms; 2 | allow hal_power_default debugfs_rpm:file r_file_perms; 3 | allow hal_power_default sysfs_msm_subsys:dir r_dir_perms; 4 | 5 | -------------------------------------------------------------------------------- /sepolicy/per_mgr.te: -------------------------------------------------------------------------------- 1 | allow vendor_per_mgr self:capability net_raw; 2 | allow vendor_per_mgr servicemanager:binder { call transfer }; 3 | allow vendor_per_mgr per_mgr_service_old:service_manager { add find }; 4 | -------------------------------------------------------------------------------- /sepolicy/service.te: -------------------------------------------------------------------------------- 1 | type qseeproxy_service_old, service_manager_type; 2 | type per_mgr_service_old, service_manager_type; 3 | type camera_bgproc_service, service_manager_type; 4 | -------------------------------------------------------------------------------- /seccomp_policy/mediaextractor.policy: -------------------------------------------------------------------------------- 1 | # device specific syscalls. 2 | # extension of services/mediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy 3 | readlinkat: 1 4 | pread64: 1 5 | mremap: 1 6 | -------------------------------------------------------------------------------- /sepolicy/ims.te: -------------------------------------------------------------------------------- 1 | allow ims debug_prop:property_service set; 2 | get_prop(ims, debug_prop); 3 | allow ims self:capability net_raw; 4 | allow ims diag_device:chr_file { read write }; 5 | allow ims sysfs:file {open read }; 6 | -------------------------------------------------------------------------------- /sepolicy/installd.te: -------------------------------------------------------------------------------- 1 | allow installd firmware_file:filesystem quotaget; 2 | allow installd fsg_file:filesystem quotaget; 3 | allow installd persist_file:filesystem quotaget; 4 | allow installd idmap:process noatsecure; 5 | -------------------------------------------------------------------------------- /hardware-moto-sensors/ak09912_akmd_6D_32b/libSmartCompass/arm/libAK09912.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boulzordev/android_device_motorola_potter/HEAD/hardware-moto-sensors/ak09912_akmd_6D_32b/libSmartCompass/arm/libAK09912.a -------------------------------------------------------------------------------- /sepolicy/time_daemon.te: -------------------------------------------------------------------------------- 1 | get_prop(time_daemon, diag_prop); 2 | 3 | allow time_daemon persist_file:file { open read write }; 4 | allow time_daemon sysfs:file {open read }; 5 | allow time_daemon persist_file:dir r_dir_perms; 6 | -------------------------------------------------------------------------------- /gps/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | LOCAL_PATH := $(call my-dir) 3 | include $(LOCAL_PATH)/build/target_specific_features.mk 4 | 5 | include $(call all-makefiles-under,$(LOCAL_PATH)) 6 | endif 7 | -------------------------------------------------------------------------------- /hardware-moto-sensors/ak09912_akmd_6D_32b/libSmartCompass/arm64/libAK09912.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boulzordev/android_device_motorola_potter/HEAD/hardware-moto-sensors/ak09912_akmd_6D_32b/libSmartCompass/arm64/libAK09912.a -------------------------------------------------------------------------------- /thermal-engine/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE:=thermal-engine 6 | 7 | LOCAL_EXPORT_C_INCLUDE_DIRS:=$(LOCAL_PATH) 8 | 9 | include $(BUILD_HEADER_LIBRARY) 10 | -------------------------------------------------------------------------------- /sepolicy/seapp_contexts: -------------------------------------------------------------------------------- 1 | user=_app seinfo=platform name=com.motorola.dtv domain=isdbt_app type=app_data_file levelFrom=user 2 | user=_app seinfo=platform name=com.motorola.dtvservice domain=isdbt_app type=app_data_file levelFrom=user 3 | 4 | -------------------------------------------------------------------------------- /sepolicy/mediaextractor.te: -------------------------------------------------------------------------------- 1 | allow mediaextractor fuse:file r_file_perms; 2 | allow mediaextractor system_server:fifo_file { write append }; 3 | allow mediaextractor sdcardfs:file r_file_perms; 4 | allow mediaextractor vfat:file r_file_perms; 5 | -------------------------------------------------------------------------------- /gps/Makefile.am: -------------------------------------------------------------------------------- 1 | # Makefile.am - Automake script for gps loc_api 2 | # 3 | 4 | ACLOCAL_AMFLAGS = -I m4 5 | 6 | SUBDIRS = gnss 7 | 8 | pkgconfigdir = $(libdir)/pkgconfig 9 | pkgconfig_DATA = loc-hal.pc 10 | EXTRA_DIST = $(pkgconfig_DATA) 11 | -------------------------------------------------------------------------------- /rootdir/etc/init.qcom.ril.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | export PATH=/system/xbin:$PATH 3 | 4 | multisim=`getprop persist.radio.multisim.config` 5 | 6 | if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then 7 | start vendor.ril-daemon2 8 | fi 9 | -------------------------------------------------------------------------------- /sepolicy/hal_health_default.te: -------------------------------------------------------------------------------- 1 | allow hal_health_default mnt_vendor_file:dir search; 2 | allow hal_health_default persist_file:dir search; 3 | allow hal_health_default persist_file:file rw_file_perms; 4 | allow hal_health_default sysfs:file rw_file_perms; 5 | -------------------------------------------------------------------------------- /sepolicy/hal_drm_default.te: -------------------------------------------------------------------------------- 1 | allow hal_drm_default firmware_file:lnk_file read; 2 | allow hal_drm_default debug_prop:file read; 3 | allow hal_drm_default media_data_file:dir create_dir_perms; 4 | allow hal_drm_default media_data_file:file create_file_perms; 5 | -------------------------------------------------------------------------------- /sepolicy/ueventd.te: -------------------------------------------------------------------------------- 1 | allow ueventd sysfs_mmi_fp:file w_file_perms; 2 | 3 | allow ueventd synaptics_rmi_device:chr_file { rw_file_perms relabelfrom relabelto}; 4 | allow ueventd sysfs_fpc:file rw_file_perms; 5 | allow ueventd sysfs_sensors:file rw_file_perms; 6 | -------------------------------------------------------------------------------- /sepolicy/akmd.te: -------------------------------------------------------------------------------- 1 | type akmd, domain; 2 | type akmd_exec, exec_type, file_type; 3 | init_daemon_domain(akmd) 4 | 5 | allow akmd akmd_data_file:file rw_file_perms; 6 | allow akmd akmd_data_file:dir rw_dir_perms; 7 | allow akmd compass_device:chr_file rw_file_perms; 8 | -------------------------------------------------------------------------------- /sepolicy/tee.te: -------------------------------------------------------------------------------- 1 | allow tee persist_file:file r_file_perms; 2 | allow tee persist_file:dir r_dir_perms; 3 | allow tee fingerprintd_data_file:dir create_dir_perms; 4 | allow tee fingerprintd_data_file:file create_file_perms; 5 | allow tee system_data_file:dir r_dir_perms; 6 | -------------------------------------------------------------------------------- /gps/core/loc-core.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: loc-core 7 | Description: QTI GPS Loc Core 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lloc_core 10 | Cflags: -I${includedir}/loc-core 11 | -------------------------------------------------------------------------------- /gps/gnsspps/gnsspps.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: gnsspps 7 | Description: QTI GPS gnsspps 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgnsspps 10 | Cflags: -I${includedir}/gnsspps 11 | -------------------------------------------------------------------------------- /sepolicy/priv_app.te: -------------------------------------------------------------------------------- 1 | allow priv_app device:dir r_dir_perms; 2 | allow priv_app persist_file:filesystem getattr; 3 | allow priv_app proc_interrupts:file { open read getattr }; 4 | allow priv_app proc_modules:file { open read getattr }; 5 | 6 | get_prop(priv_app, adspd_prop); 7 | -------------------------------------------------------------------------------- /sepolicy/property.te: -------------------------------------------------------------------------------- 1 | type adspd_prop, property_type; 2 | type motosh_prop, property_type; 3 | type hw_rev_prop, property_type; 4 | type touch_prop, property_type; 5 | type diag_prop, property_type; 6 | type thermal_prop, property_type; 7 | type qti_telephony_prop, property_type; 8 | -------------------------------------------------------------------------------- /gps/utils/gps-utils.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: gps-utils 7 | Description: QTI GPS Location utils 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgps_utils 10 | Cflags: -I${includedir}/gps-utils 11 | -------------------------------------------------------------------------------- /sepolicy/service_contexts: -------------------------------------------------------------------------------- 1 | com.qualcomm.qti.qseeproxy u:object_r:qseeproxy_service_old:s0 2 | vendor.qcom.PeripheralManager u:object_r:per_mgr_service_old:s0 3 | media.camera_bgproc u:object_r:camera_bgproc_service:s0 4 | 5 | -------------------------------------------------------------------------------- /gps/location/location-api.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-api 7 | Description: Location API 8 | Version: @VERSION 9 | Libs: -L${libdir} -llocation_api 10 | Cflags: -I${includedir}/location-api 11 | -------------------------------------------------------------------------------- /sepolicy/platform_app.te: -------------------------------------------------------------------------------- 1 | get_prop(platform_app, camera_prop); 2 | binder_call(platform_app, hal_sensors_default); 3 | 4 | allow platform_app rootfs:dir getattr; 5 | 6 | allow platform_app init:unix_stream_socket { read write }; 7 | allow platform_app hal_sensors_default:unix_stream_socket { read write }; 8 | -------------------------------------------------------------------------------- /gps/loc-hal.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: loc-hal 7 | Description: QTI GPS Loc HAL 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgnss 10 | Cflags: -I${includedir} -I${includedir}/utils -I${includedir}/core -I${includedir}/loc-hal 11 | -------------------------------------------------------------------------------- /seccomp_policy/mediacodec.policy: -------------------------------------------------------------------------------- 1 | # device specific syscalls 2 | # extension of services/mediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy 3 | pselect6: 1 4 | eventfd2: 1 5 | sendto: 1 6 | recvfrom: 1 7 | _llseek: 1 8 | sysinfo: 1 9 | getcwd: 1 10 | getdents64: 1 11 | inotify_init1: 1 12 | inotify_add_watch: 1 13 | -------------------------------------------------------------------------------- /sepolicy/surfaceflinger.te: -------------------------------------------------------------------------------- 1 | get_prop(surfaceflinger, diag_prop); 2 | allow surfaceflinger perfd_data_file:sock_file write; 3 | allow surfaceflinger perfd_data_file:dir search; 4 | allow surfaceflinger perfd:unix_stream_socket connectto; 5 | allow surfaceflinger diag_device:chr_file { read write }; 6 | 7 | binder_call(surfaceflinger, hwservicemanager) 8 | 9 | -------------------------------------------------------------------------------- /sepolicy/rfs_access.te: -------------------------------------------------------------------------------- 1 | allow rfs_access self:capability net_raw; 2 | allow rfs_access persist_file:file { getattr open read rename setattr unlink write }; 3 | allow rfs_access vendor_tombstone_data_file:dir search; 4 | 5 | allow rfs_access persist_file:dir { add_name open remove_name read search setattr write }; 6 | allow rfs_access persist_file:file create; 7 | -------------------------------------------------------------------------------- /sepolicy/hwservicemanager.te: -------------------------------------------------------------------------------- 1 | #allow hwservicemanager init:binder call; 2 | allow hwservicemanager init:dir search; 3 | allow hwservicemanager init:file { open read }; 4 | allow hwservicemanager init:process getattr; 5 | 6 | binder_use(hwservicemanager); 7 | 8 | binder_call(hwservicemanager, hal_power_default); 9 | binder_call(hwservicemanager, hal_usb_default); 10 | -------------------------------------------------------------------------------- /sepolicy/bootanim.te: -------------------------------------------------------------------------------- 1 | allow bootanim hwservicemanager:binder call; 2 | 3 | # TODO(b/62954877). On Android Wear, bootanim reads the time 4 | # during boot to display. It currently gets that time from a file 5 | # in /data/system. This should be moved. In the meantime, suppress 6 | # this denial on wahoo since this functionality is not used. 7 | dontaudit bootanim system_data_file:dir read; 8 | -------------------------------------------------------------------------------- /init/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE_TAGS := optional 6 | LOCAL_C_INCLUDES := system/core/init 7 | LOCAL_CPPFLAGS := -Wall -DANDROID_TARGET=\"$(TARGET_BOARD_PLATFORM)\" 8 | LOCAL_SRC_FILES := init_potter.cpp 9 | LOCAL_MODULE := libinit_potter 10 | LOCAL_STATIC_LIBRARIES := \ 11 | libbase 12 | 13 | include $(BUILD_STATIC_LIBRARY) 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /configs/external_camera_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 0 6 | 1 7 | 2 8 | 3 9 | 38 10 | 39 11 | 100 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /libshims/justshoot_shim.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace android { 4 | extern "C" void _ZN7android9StopWatchC1EPKci(const char* name, int clock); 5 | 6 | extern "C" void _ZN7android10frameworks13sensorservice4V1_08toStringENS2_6ResultE() {} 7 | extern "C" void _ZN7android9StopWatchC1EPKcij(const char* name, int clock, uint32_t flags) { 8 | _ZN7android9StopWatchC1EPKci(name, clock); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /sepolicy/hal_nfc_default.te: -------------------------------------------------------------------------------- 1 | typeattribute hal_nfc_default binder_in_vendor_violators; 2 | 3 | allow hal_nfc_default system_data_file:dir { add_name write }; 4 | allow hal_nfc_default system_data_file:file { read getattr open }; 5 | allow hal_nfc_default nxpese_hwservice:hwservice_manager { add find }; 6 | allow hal_nfc_default nxpnfc_hwservice:hwservice_manager { add find }; 7 | 8 | allow hal_nfc_default nfc_vendor_data_file:dir search; 9 | -------------------------------------------------------------------------------- /sepolicy/untrusted_app.te: -------------------------------------------------------------------------------- 1 | get_prop(untrusted_app, camera_prop); 2 | get_prop(untrusted_app_25, camera_prop); 3 | allow untrusted_app sysfs_zram:dir { search read }; 4 | allow untrusted_app sysfs_zram:file { open read getattr }; 5 | 6 | allow untrusted_app firmware_file:dir read; 7 | allow untrusted_app fsg_file:dir read; 8 | 9 | allow untrusted_app proc_asound:dir search; 10 | allow untrusted_app proc_qtaguid_stat:file read; 11 | -------------------------------------------------------------------------------- /dtbtool/Android.mk: -------------------------------------------------------------------------------- 1 | ifeq ($(BOARD_KERNEL_SEPARATED_DT),true) 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_SRC_FILES := \ 7 | dtbtool.c 8 | 9 | LOCAL_CFLAGS += \ 10 | -Wall 11 | 12 | ## Hybrid v1/v2 dtbTool. Use a different name to avoid conflicts with copies in device repos 13 | LOCAL_MODULE := dtbTool_custom 14 | LOCAL_MODULE_TAGS := optional 15 | 16 | include $(BUILD_HOST_EXECUTABLE) 17 | endif 18 | -------------------------------------------------------------------------------- /sepolicy/device.te: -------------------------------------------------------------------------------- 1 | type adspd_device, dev_type; 2 | type amps_raw_device, dev_type; 3 | type compass_device, dev_type; 4 | type haptics_device, dev_type; 5 | type hob_device, dev_type; 6 | type hw_block_device, dev_type; 7 | type graphics_fb_device, dev_type; 8 | type laser_device, dev_type; 9 | type synaptics_rmi_device, dev_type; 10 | type shwi_device, dev_type; 11 | type isdbt_device, dev_type; 12 | type utags_block_device, dev_type; 13 | -------------------------------------------------------------------------------- /sepolicy/qti_init_shell.te: -------------------------------------------------------------------------------- 1 | set_prop(qti_init_shell, hw_rev_prop); 2 | allow qti_init_shell apk_data_file:dir { write add_name create }; 3 | allow qti_init_shell apk_data_file:file { create write setattr }; 4 | allow qti_init_shell hci_attach_dev:chr_file { read write open ioctl }; 5 | 6 | allow qti_init_shell kmsg_device:chr_file write; 7 | allow qti_init_shell sysfs_wcnsscore:file write; 8 | 9 | allow qti_init_shell kmsg_device:chr_file open; 10 | -------------------------------------------------------------------------------- /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 = 0 16 | 17 | -------------------------------------------------------------------------------- /configs/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libandroid.so 2 | libaaudio.so 3 | libc.so 4 | libcamera2ndk.so 5 | libdl.so 6 | libEGL.so 7 | libGLESv1_CM.so 8 | libGLESv2.so 9 | libGLESv3.so 10 | libicui18n.so 11 | libicuuc.so 12 | libjnigraphics.so 13 | liblog.so 14 | libmediandk.so 15 | libm.so 16 | libnativewindow.so 17 | libneuralnetworks.so 18 | libOpenMAXAL.so 19 | libOpenSLES.so 20 | libRS.so 21 | libstdc++.so 22 | libsync.so 23 | libvulkan.so 24 | libwebviewchromium_plat_support.so 25 | libz.so 26 | -------------------------------------------------------------------------------- /sepolicy/thermal-engine.te: -------------------------------------------------------------------------------- 1 | get_prop(thermal-engine, diag_prop) 2 | allow thermal-engine socket_device:sock_file { create setattr }; 3 | allow thermal-engine sysfs_rmt_storage:dir search; 4 | allow thermal-engine sysfs_rmt_storage:file r_file_perms; 5 | allow thermal-engine sysfs_uio:file r_file_perms; 6 | allow thermal-engine sysfs_uio:dir { read open search }; 7 | allow thermal-engine sysfs_uio:lnk_file { read }; 8 | allow thermal-engine sysfs_vadc_dev:lnk_file { read open }; 9 | allow thermal-engine sysfs_vadc_dev:dir r_dir_perms; 10 | -------------------------------------------------------------------------------- /sepolicy/toolbox.te: -------------------------------------------------------------------------------- 1 | set_prop(toolbox, diag_prop); 2 | set_prop(toolbox, hw_rev_prop); 3 | set_prop(toolbox, touch_prop); 4 | allow toolbox init:fifo_file { write getattr }; 5 | 6 | allow toolbox self:capability { chown }; 7 | 8 | allow toolbox proc:file rw_file_perms; 9 | allow toolbox radio_data_file:file rw_file_perms; 10 | allow toolbox firmware_file:file getattr; 11 | allow toolbox init:fifo_file ioctl; 12 | allow toolbox sysfs:dir r_dir_perms; 13 | allow toolbox sysfs:file rw_file_perms; 14 | allow toolbox init:fifo_file read; 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /sepolicy/sensor_hub.te: -------------------------------------------------------------------------------- 1 | type sensor_hub, domain; 2 | type sensor_hub_exec, exec_type, vendor_file_type, file_type; 3 | init_daemon_domain(sensor_hub) 4 | 5 | binder_use(sensor_hub) 6 | binder_service(sensor_hub) 7 | 8 | allow sensor_hub vendor_shell_exec:file entrypoint; 9 | 10 | allow sensor_hub sensors_device:chr_file rw_file_perms; 11 | set_prop(sensor_hub, motosh_prop) 12 | 13 | allow sensor_hub firmware_file:file { getattr open read }; 14 | allow sensor_hub vendor_file:file rx_file_perms; 15 | 16 | allow sensor_hub firmware_file:dir search; 17 | -------------------------------------------------------------------------------- /sepolicy/init_wifi.te: -------------------------------------------------------------------------------- 1 | type init_wifi, domain; 2 | type init_wifi_exec, exec_type, vendor_file_type, file_type; 3 | init_daemon_domain(init_wifi) 4 | 5 | binder_use(init_wifi) 6 | binder_service(init_wifi) 7 | binder_call(init_wifi, system_server) 8 | 9 | # shell scripts need to execute /system/bin/sh 10 | allow init_wifi vendor_shell_exec:file rx_file_perms; 11 | allow init_wifi vendor_toolbox_exec:file rx_file_perms; 12 | allow init_wifi vendor_shell_exec:file entrypoint; 13 | 14 | allow init_wifi sysfs_wcnsscore:file rw_file_perms; 15 | allow init_wifi sysfs_wcnsscore:dir r_dir_perms; 16 | -------------------------------------------------------------------------------- /gps/build/target_specific_features.mk: -------------------------------------------------------------------------------- 1 | GNSS_CFLAGS := \ 2 | -Werror \ 3 | -Wno-error=unused-parameter \ 4 | -Wno-error=format \ 5 | -Wno-error=macro-redefined \ 6 | -Wno-error=reorder \ 7 | -Wno-error=missing-braces \ 8 | -Wno-error=self-assign \ 9 | -Wno-error=enum-conversion \ 10 | -Wno-error=logical-op-parentheses \ 11 | -Wno-error=null-arithmetic \ 12 | -Wno-error=null-conversion \ 13 | -Wno-error=parentheses-equality \ 14 | -Wno-error=undefined-bool-conversion \ 15 | -Wno-error=tautological-compare \ 16 | -Wno-error=switch \ 17 | -Wno-error=date-time 18 | -------------------------------------------------------------------------------- /sepolicy/rmt_storage.te: -------------------------------------------------------------------------------- 1 | allow rmt_storage sysfs_rmt_storage:file rw_file_perms; 2 | allow rmt_storage sysfs_rmt_storage:dir { search open }; 3 | allow rmt_storage sysfs_uio:file r_file_perms; 4 | allow rmt_storage sysfs_uio:dir { read open search }; 5 | allow rmt_storage sysfs_uio:lnk_file { read }; 6 | allow rmt_storage debugfs_rmt_storage:dir search; 7 | allow rmt_storage debugfs_rmt_storage:file w_file_perms; 8 | 9 | allow rmt_storage fsg_file:file { open read }; 10 | 11 | allow rmt_storage fsg_file:dir search; 12 | allow rmt_storage fsg_file:lnk_file read; 13 | 14 | allow rmt_storage persist_file:dir r_dir_perms; 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | # fpc1020 "finger present" 12 | key 614 FPS_ONENAV_DOWN 13 | key 615 FPS_ONENAV_UP 14 | key 616 FPS_ONENAV_TAP 15 | key 617 FPS_ONENAV_HOLD 16 | key 618 FPS_ONENAV_YPLUS 17 | key 619 FPS_ONENAV_YMINUS 18 | key 620 FPS_ONENAV_XPLUS 19 | key 621 FPS_ONENAV_XMINUS 20 | -------------------------------------------------------------------------------- /sepolicy/adspd.te: -------------------------------------------------------------------------------- 1 | type adspd, domain; 2 | type adspd_exec, exec_type, vendor_file_type, file_type; 3 | init_daemon_domain(adspd) 4 | 5 | binder_use(adspd) 6 | binder_service(adspd) 7 | binder_call(adspd, system_server) 8 | 9 | allow adspd vendor_shell_exec:file entrypoint; 10 | 11 | allow adspd audio_device:chr_file { ioctl open read write }; 12 | allow adspd audio_device:dir search; 13 | allow adspd input_device:chr_file { ioctl open read }; 14 | allow adspd input_device:dir search; 15 | allow adspd sysfs_adsp:file write; 16 | # The below one is WRONG 17 | allow adspd sysfs:file write; 18 | 19 | set_prop(adspd, adspd_prop) 20 | -------------------------------------------------------------------------------- /lineage.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "remote": "github", 4 | "repository": "boulzordev/android_kernel_motorola_msm8953", 5 | "target_path": "kernel/motorola/msm8953", 6 | "branch": "lineage-16.0" 7 | }, 8 | { 9 | "remote": "github", 10 | "repository": "boulzordev/android_vendor_motorola_potter", 11 | "target_path": "vendor/motorola/potter", 12 | "branch": "lineage-16.0" 13 | }, 14 | { 15 | "remote": "github", 16 | "repository": "LineageOS/android_packages_resources_devicesettings", 17 | "target_path": "packages/resources/devicesettings", 18 | "branch": "lineage-16.0" 19 | } 20 | ] 21 | -------------------------------------------------------------------------------- /sepolicy/wcnss_service.te: -------------------------------------------------------------------------------- 1 | binder_call(wcnss_service, servicemanager); 2 | set_prop(wcnss_service, wifi_prop); 3 | get_prop(wcnss_service, diag_prop); 4 | allow wcnss_service toolbox_exec:file { execute getattr execute_no_trans read open }; 5 | allow wcnss_service shell_exec:file { execute getattr execute_no_trans read open }; 6 | allowxperm wcnss_service self:udp_socket ioctl priv_sock_ioctls; 7 | 8 | allow wcnss_service per_mgr_service_old:service_manager find; 9 | 10 | allow wcnss_service wifi_data_file:dir rw_dir_perms; 11 | allow wcnss_service wifi_data_file:file create_file_perms; 12 | 13 | allow wcnss_service sysfs:file rw_file_perms; 14 | -------------------------------------------------------------------------------- /sepolicy/vendor_init.te: -------------------------------------------------------------------------------- 1 | allow vendor_init camera_data_file:dir setattr; 2 | allow vendor_init media_rw_data_file:dir setattr; 3 | allow vendor_init rootfs:dir { add_name write }; 4 | allow vendor_init netmgr_data_file:dir setattr; 5 | allow vendor_init persist_file:filesystem getattr; 6 | allow vendor_init system_data_file:dir { add_name setattr write }; 7 | allow vendor_init tombstone_data_file:dir search; 8 | allow vendor_init radio_data_file:dir search; 9 | 10 | allow vendor_init dhcp_data_file:dir setattr; 11 | allow vendor_init radio_data_file:file r_file_perms; 12 | allow vendor_init wifi_data_file:dir setattr; 13 | allow vendor_init wpa_socket:dir setattr; 14 | -------------------------------------------------------------------------------- /sepolicy/netmgrd.te: -------------------------------------------------------------------------------- 1 | allow netmgrd netmgr_data_file:dir { add_name search write }; 2 | allow netmgrd netmgr_data_file:file create; 3 | allow netmgrd netmgr_data_file:file rw_file_perms; 4 | allow netmgrd net_data_file:dir r_dir_perms; 5 | allow netmgrd netd_socket:sock_file write; 6 | allow netmgrd toolbox_exec:file { execute getattr execute_no_trans read open }; 7 | r_dir_file(netmgrd, net_data_file) 8 | 9 | allow netmgrd netutils_wrapper:process noatsecure; 10 | 11 | allow netmgrd sysfs:file r_file_perms; 12 | allow netmgrd property_socket:sock_file write; 13 | allow netmgrd init:unix_stream_socket connectto; 14 | set_prop(netmgrd, vendor_xlat_prop) 15 | 16 | allow netmgrd kernel:system module_request; 17 | -------------------------------------------------------------------------------- /sepolicy/mmi_laser.te: -------------------------------------------------------------------------------- 1 | type mmi_laser, domain; 2 | type mmi_laser_exec, exec_type, vendor_file_type, file_type; 3 | init_daemon_domain(mmi_laser) 4 | 5 | binder_use(mmi_laser) 6 | binder_service(mmi_laser) 7 | binder_call(mmi_laser, system_server) 8 | 9 | # shell scripts need to execute /system/bin/sh 10 | allow mmi_laser vendor_shell_exec:file rx_file_perms; 11 | allow mmi_laser vendor_toolbox_exec:file rx_file_perms; 12 | allow mmi_laser vendor_shell_exec:file entrypoint; 13 | 14 | # Logs to /dev/kmsg 15 | allow mmi_laser kmsg_device:chr_file w_file_perms; 16 | 17 | allow mmi_laser persist_file:dir search; 18 | allow mmi_laser persist_file:file r_file_perms; 19 | allow mmi_laser sysfs_mmi_laser:file rw_file_perms; 20 | -------------------------------------------------------------------------------- /AndroidProducts.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017-2018 The LineageOS Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | PRODUCT_MAKEFILES := \ 17 | $(LOCAL_DIR)/lineage_potter.mk 18 | -------------------------------------------------------------------------------- /rootdir/etc/wlan_carrier_bin.sh: -------------------------------------------------------------------------------- 1 | #!/system/vendor/bin/sh 2 | carrier=`getprop ro.boot.carrier` 3 | 4 | case "$carrier" in 5 | "retbr" | "timbr" | "tefbr" | "oibr" | "amxbr" | "niibr") 6 | echo -n wlan/prima/WCNSS_qcom_wlan_nv_Brazil.bin > /sys/module/wcnsscore/parameters/nv_file 7 | ;; 8 | "perar" | "retar" | "tefar" | "amxar") 9 | echo -n wlan/prima/WCNSS_qcom_wlan_nv_Argentina.bin > /sys/module/wcnsscore/parameters/nv_file 10 | ;; 11 | "retin" | "amzin") 12 | echo -n wlan/prima/WCNSS_qcom_wlan_nv_India.bin > /sys/module/wcnsscore/parameters/nv_file 13 | ;; 14 | * ) 15 | echo -n wlan/prima/WCNSS_qcom_wlan_nv.bin > /sys/module/wcnsscore/parameters/nv_file 16 | ;; 17 | esac 18 | -------------------------------------------------------------------------------- /vndk/vndk-sp-libs.mk: -------------------------------------------------------------------------------- 1 | VNDK_SP_LIBRARIES := \ 2 | android.hardware.graphics.allocator@2.0 \ 3 | android.hardware.graphics.mapper@2.0 \ 4 | android.hardware.graphics.common@1.0 \ 5 | android.hardware.renderscript@1.0 \ 6 | android.hidl.base@1.0 \ 7 | android.hidl.memory@1.0 \ 8 | libRSCpuRef \ 9 | libRSDriver \ 10 | libRS_internal \ 11 | libbacktrace \ 12 | libbase \ 13 | libbcinfo \ 14 | libblas \ 15 | libc++ \ 16 | libcompiler_rt \ 17 | libcutils \ 18 | libft2 \ 19 | libhardware \ 20 | libhidlbase \ 21 | libhidlmemory \ 22 | libhidltransport \ 23 | libhwbinder \ 24 | libion \ 25 | liblzma \ 26 | libpng \ 27 | libunwind \ 28 | libutils \ 29 | -------------------------------------------------------------------------------- /sepolicy/property_contexts: -------------------------------------------------------------------------------- 1 | hw.aov.disable_hotword u:object_r:adspd_prop:s0 2 | hw.aov.hotword_dsp_path u:object_r:adspd_prop:s0 3 | hw.motosh.booted u:object_r:motosh_prop:s0 4 | ro.boot.hardware.revision u:object_r:hw_rev_prop:s0 5 | hw.touch.status u:object_r:touch_prop:s0 6 | sys.listeners.registered u:object_r:vendor_tee_listener_prop:s0 7 | camera.show_roi.cfg_bf u:object_r:camera_prop:s0 8 | persist.camera.debug.logfile u:object_r:camera_prop:s0 9 | persist.camera.daemon u:object_r:camera_prop:s0 10 | persist.net.doxlat u:object_r:vendor_xlat_prop:s0 11 | vendor.ril. u:object_r:vendor_radio_prop:s0 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /sepolicy/mmi_boot.te: -------------------------------------------------------------------------------- 1 | type mmi_boot, domain; 2 | type mmi_boot_exec, exec_type, vendor_file_type, file_type; 3 | init_daemon_domain(mmi_boot) 4 | 5 | binder_use(mmi_boot) 6 | binder_service(mmi_boot) 7 | binder_call(mmi_boot, system_server) 8 | 9 | # shell scripts need to execute /system/bin/sh 10 | allow mmi_boot vendor_shell_exec:file rx_file_perms; 11 | allow mmi_boot vendor_toolbox_exec:file rx_file_perms; 12 | allow mmi_boot vendor_shell_exec:file entrypoint; 13 | 14 | allow mmi_boot radio_data_file:dir { add_name search write }; 15 | allow mmi_boot radio_data_file:file { create setattr }; 16 | allow mmi_boot radio_data_file:file rw_file_perms; 17 | allow mmi_boot self:capability chown; 18 | allow mmi_boot sysfs_socinfo:file write; 19 | 20 | set_prop(mmi_boot, hw_rev_prop); 21 | -------------------------------------------------------------------------------- /sepolicy/fingerprintd.te: -------------------------------------------------------------------------------- 1 | allow fingerprintd firmware_file:dir search; 2 | allow fingerprintd firmware_file:file { getattr open read }; 3 | allow fingerprintd fingerprintd_data_file:dir { add_name getattr remove_name write }; 4 | allow fingerprintd fingerprintd_data_file:file { append create getattr open setattr unlink }; 5 | allow fingerprintd fingerprintd_data_file:sock_file { create unlink }; 6 | allow fingerprintd sysfs_mmi_fp:dir { open read search }; 7 | allow fingerprintd sysfs_mmi_fp:file rw_file_perms; 8 | allow fingerprintd system_data_file:sock_file unlink; 9 | allow fingerprintd sysfs_fpc:dir r_dir_perms; 10 | allow fingerprintd sysfs_fpc:file rw_file_perms; 11 | allow fingerprintd tee_device:chr_file { ioctl open read write }; 12 | allow fingerprintd uhid_device:chr_file rw_file_perms; 13 | -------------------------------------------------------------------------------- /sepolicy/hal_camera_default.te: -------------------------------------------------------------------------------- 1 | allow hal_camera_default gpu_device:dir r_dir_perms; 2 | allow hal_camera_default gpu_device:file r_file_perms; 3 | allow hal_camera_default hal_configstore_ISurfaceFlingerConfigs:hwservice_manager find; 4 | allow hal_camera_default hal_configstore_default:binder call; 5 | allow hal_camera_default unlabeled:file {open getattr read }; 6 | allow hal_camera_default camera_data_file:sock_file write; 7 | allow hal_camera_default persist_file:file { rw_file_perms setattr }; 8 | allow hal_camera_default hal_graphics_allocator_hwservice:hwservice_manager { find }; 9 | allow hal_camera_default system_server:unix_stream_socket { read write }; 10 | allow hal_camera_default sysfs:file { getattr open read }; 11 | 12 | binder_call(hal_camera_default, hal_configstore_default) 13 | binder_call(hal_camera_default, hal_graphics_allocator_default) 14 | -------------------------------------------------------------------------------- /sepolicy/isdbt_app.te: -------------------------------------------------------------------------------- 1 | type isdbt_app, domain, mlstrustedsubject; 2 | 3 | app_domain(isdbt_app) 4 | binder_use(isdbt_app) 5 | 6 | allow isdbt_app isdbt_device:chr_file rw_file_perms; 7 | allow isdbt_app media_rw_data_file:dir { rw_dir_perms create getattr rmdir search }; 8 | allow isdbt_app { accessibility_service activity_service appops_service connectivity_service content_service display_service graphicsstats_service input_method_service input_service location_service mount_service network_management_service radio_service registry_service surfaceflinger_service textservices_service uimode_service vibrator_service wifi_service audio_service audioserver_service media_router_service notification_service autofill_service mediametrics_service mediaserver_service media_session_service mediametrics_service batterystats_service power_service user_service }:service_manager find; 9 | -------------------------------------------------------------------------------- /hardware-moto-sensors/utils/sensor_time.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 "sensor_time.h" 18 | #include 19 | 20 | int64_t sensor_elapsed_realtime() { 21 | return android::elapsedRealtime(); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /sepolicy/system_app.te: -------------------------------------------------------------------------------- 1 | allow system_app proc_touchpanel:dir search; 2 | allow system_app sysfs_vibrator:file rw_file_perms; 3 | allow system_app sysfs_vibrator:dir search; 4 | allow system_app sysfs_graphics:file rw_file_perms; 5 | allow system_app sysfs_graphics:dir search; 6 | allow system_app proc_touchpanel:file rw_file_perms; 7 | allow system_app sysfs_fpc:file rw_file_perms; 8 | allow system_app fuse_device:filesystem getattr; 9 | allow system_app time_daemon:unix_stream_socket connectto; 10 | 11 | allow system_app init:unix_stream_socket { read write }; 12 | allow system_app sysfs_homebutton:file { getattr open write }; 13 | allow system_app sysfs_homebutton:dir search; 14 | allow system_app sysfs_screen_off_gestures:file { getattr open write }; 15 | 16 | get_prop(system_app, diag_prop); 17 | binder_call(system_app, qtitetherservice_service); 18 | binder_call(system_app, wificond); 19 | 20 | -------------------------------------------------------------------------------- /hardware-moto-sensors/stml0xx_hal/FusionSensorBase.cpp: -------------------------------------------------------------------------------- 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 | /* 18 | * Copyright (C) 2015 Motorola Mobility LLC 19 | */ 20 | 21 | #include "FusionSensorBase.h" 22 | 23 | FusionSensorBase::FusionSensorBase() 24 | { 25 | } 26 | -------------------------------------------------------------------------------- /LineageActions/src/org/lineageos/settings/device/SensorAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The CyanogenMod Project 3 | * Copyright (c) 2017 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.device; 19 | 20 | public interface SensorAction { 21 | public void action(); 22 | } 23 | -------------------------------------------------------------------------------- /gps/gnsspps/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | LOCAL_PATH := $(call my-dir) 3 | 4 | include $(CLEAR_VARS) 5 | 6 | LOCAL_MODULE := libgnsspps 7 | LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib 8 | LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64 9 | LOCAL_MODULE_TAGS := optional 10 | 11 | LOCAL_SHARED_LIBRARIES := \ 12 | libutils \ 13 | libcutils \ 14 | libgps.utils \ 15 | liblog 16 | 17 | LOCAL_SRC_FILES += \ 18 | gnsspps.c 19 | 20 | LOCAL_CFLAGS += \ 21 | -fno-short-enums \ 22 | -D_ANDROID_ 23 | 24 | ## Includes 25 | LOCAL_HEADER_LIBRARIES := \ 26 | libgps.utils_headers \ 27 | libloc_pla_headers 28 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 29 | include $(BUILD_SHARED_LIBRARY) 30 | 31 | include $(CLEAR_VARS) 32 | LOCAL_MODULE := libgnsspps_headers 33 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 34 | include $(BUILD_HEADER_LIBRARY) 35 | 36 | endif 37 | -------------------------------------------------------------------------------- /overlay-lineage/packages/apps/Dialer/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | true 20 | 21 | -------------------------------------------------------------------------------- /LineageActions/src/org/lineageos/settings/device/actions/UpdatedStateNotifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The CyanogenMod Project 3 | * Copyright (c) 2017 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.device.actions; 19 | 20 | public interface UpdatedStateNotifier { 21 | public void updateState(); 22 | } 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Device Tree for Moto G5 Plus (potter) 2 | =========================================== 3 | 4 | The Motorola Moto G5 Plus (codenamed _"potter"_) is a mid-range smartphone from Motorola mobility. 5 | It was announced on February 2017. 6 | 7 | Basic | Spec Sheet 8 | -------:|:------------------------- 9 | CPU | Octa-core 2.0 GHz Cortex-A53 10 | Chipset | Qualcomm MSM8953 Snapdragon 625 11 | GPU | Adreno 506 12 | Memory | 4 GB RAM 13 | Shipped Android Version | 7.0.0 14 | Storage | 32 GB 15 | MicroSD | Up to 256 GB 16 | Battery | Li-Ion 3000mAh battery 17 | Display | 1080 x 1920 pixels, 5.2 inches (~402 ppi pixel density) 18 | Rear Camera | 12 MP, f/1.7, 4032 x 3024 pixels, Dual Pixel Autofocus, dual flash LED 19 | Front Camera | 5 MP, f/2.2, 2592 x 1944 pixels 20 | 21 | Copyright 2017 - The LineageOS Project. 22 | 23 | ![Moto G5 Plus](http://cdn2.gsmarena.com/vv/pics/motorola/motorola-moto-g5-plus-1.jpg "Moto G5 Plus") 24 | -------------------------------------------------------------------------------- /sepolicy/hal_sensors_default.te: -------------------------------------------------------------------------------- 1 | binder_call(hal_sensors_default, hwservicemanager) 2 | binder_call(hal_sensors_default, servicemanager) 3 | 4 | binder_call(hal_sensors_default, mm-qcamerad) 5 | binder_call(hal_sensors_default, system_server) 6 | 7 | binder_call(hal_sensors_default, system_app) 8 | binder_call(hal_sensors_default, priv_app) 9 | binder_call(hal_sensors_default, platform_app) 10 | 11 | allow hal_sensors_default sensors_device:chr_file { ioctl open read }; 12 | allow hal_sensors_default sysfs:file { open read write }; 13 | allow hal_sensors_default system_data_file:file { getattr open read }; 14 | 15 | allow hal_sensors_default proc_net:file { getattr open read }; 16 | allow hal_sensors_default sysfs_capsense:dir search; 17 | allow hal_sensors_default sysfs_capsense:file { open write }; 18 | allow hal_sensors_default system_data_file:dir {add_name write }; 19 | allow hal_sensors_default system_data_file:file r_file_perms; 20 | 21 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values-sw372dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 0dp 20 | 0dp 21 | 22 | -------------------------------------------------------------------------------- /overlay/packages/apps/DocumentsUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | true 20 | 21 | -------------------------------------------------------------------------------- /sepolicy/rild.te: -------------------------------------------------------------------------------- 1 | binder_call(rild, servicemanager); 2 | binder_call(rild, audioserver_service); 3 | binder_call(rild, system_server); 4 | allow rild per_mgr_service_old:service_manager find; 5 | set_prop(rild, diag_prop); 6 | allow rild nv_data_file:dir rw_dir_perms; 7 | allow rild nv_data_file:file create_file_perms; 8 | allow rild radio_data_file:dir rw_dir_perms; 9 | allow rild radio_data_file:file create_file_perms; 10 | allow rild fsg_file:file { getattr open read }; 11 | allow rild fsg_file:dir { search open read }; 12 | allow rild fsg_file:lnk_file read; 13 | 14 | allow rild cutback_data_file:dir rw_dir_perms; 15 | allow rild cutback_data_file:sock_file create_file_perms; 16 | 17 | allow rild rild_exec:file execute_no_trans; 18 | allow rild persist_file:dir r_dir_perms; 19 | allow rild persist_file:file rw_file_perms; 20 | allow rild fwk_sensor_hwservice:hwservice_manager find; 21 | allow rild proc:file { open read }; 22 | set_prop(rild, vendor_radio_prop) 23 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc302-mnc220/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin 5 | XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin 6 | XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin 7 | NTP_SERVER=north-america.pool.ntp.org 8 | SUPL_MODE=0 9 | SUPL_HOST=NONE 10 | SUPL_PORT=7275 11 | SUPL_VER=0x20000 12 | LPP_PROFILE=2 13 | NMEA_PROVIDER=0 14 | A_GLONASS_POS_PROTOCOL_SELECT=0 15 | ERR_ESTIMATE=0 16 | INTERMEDIATE_POS=0 17 | GPS_LOCK=0 18 | SUPL_ES=0 19 | 20 | 21 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc302-mnc221/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin 5 | XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin 6 | XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin 7 | NTP_SERVER=north-america.pool.ntp.org 8 | SUPL_MODE=0 9 | SUPL_HOST=NONE 10 | SUPL_PORT=7275 11 | SUPL_VER=0x20000 12 | LPP_PROFILE=2 13 | NMEA_PROVIDER=0 14 | A_GLONASS_POS_PROTOCOL_SELECT=0 15 | ERR_ESTIMATE=0 16 | INTERMEDIATE_POS=0 17 | GPS_LOCK=0 18 | SUPL_ES=0 19 | 20 | 21 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc302-mnc370/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin 5 | XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin 6 | XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin 7 | NTP_SERVER=north-america.pool.ntp.org 8 | SUPL_MODE=0 9 | SUPL_HOST=NONE 10 | SUPL_PORT=7275 11 | SUPL_VER=0x20000 12 | LPP_PROFILE=2 13 | NMEA_PROVIDER=0 14 | A_GLONASS_POS_PROTOCOL_SELECT=0 15 | ERR_ESTIMATE=0 16 | INTERMEDIATE_POS=0 17 | GPS_LOCK=0 18 | SUPL_ES=0 19 | 20 | 21 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc302-mnc610/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin 5 | XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin 6 | XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin 7 | NTP_SERVER=north-america.pool.ntp.org 8 | SUPL_MODE=0 9 | SUPL_HOST=NONE 10 | SUPL_PORT=7275 11 | SUPL_VER=0x20000 12 | LPP_PROFILE=2 13 | NMEA_PROVIDER=0 14 | A_GLONASS_POS_PROTOCOL_SELECT=0 15 | ERR_ESTIMATE=0 16 | INTERMEDIATE_POS=0 17 | GPS_LOCK=0 18 | SUPL_ES=0 19 | 20 | 21 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc302-mnc640/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin 5 | XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin 6 | XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin 7 | NTP_SERVER=north-america.pool.ntp.org 8 | SUPL_MODE=0 9 | SUPL_HOST=NONE 10 | SUPL_PORT=7275 11 | SUPL_VER=0x20000 12 | LPP_PROFILE=2 13 | NMEA_PROVIDER=0 14 | A_GLONASS_POS_PROTOCOL_SELECT=0 15 | ERR_ESTIMATE=0 16 | INTERMEDIATE_POS=0 17 | GPS_LOCK=0 18 | SUPL_ES=0 19 | 20 | 21 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc302-mnc720/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin 5 | XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin 6 | XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin 7 | NTP_SERVER=north-america.pool.ntp.org 8 | SUPL_MODE=0 9 | SUPL_HOST=NONE 10 | SUPL_PORT=7275 11 | SUPL_VER=0x20000 12 | LPP_PROFILE=2 13 | NMEA_PROVIDER=0 14 | A_GLONASS_POS_PROTOCOL_SELECT=0 15 | ERR_ESTIMATE=0 16 | INTERMEDIATE_POS=0 17 | GPS_LOCK=0 18 | SUPL_ES=0 19 | 20 | 21 | -------------------------------------------------------------------------------- /LineageActions/src/org/lineageos/settings/device/doze/ScreenStateNotifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The CyanogenMod Project 3 | * Copyright (c) 2017 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.device.doze; 19 | 20 | public interface ScreenStateNotifier { 21 | public void screenTurnedOn(); 22 | public void screenTurnedOff(); 23 | } 24 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | true 22 | 23 | -------------------------------------------------------------------------------- /include/surround_rec_interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Extrapolated / reversed header for SSR 3 | */ 4 | 5 | #ifndef _SURROUND_REC_INTERFACE_H_ 6 | #define _SURROUND_REC_INTERFACE_H_ 7 | 8 | typedef char *get_param(void *arg); 9 | typedef void set_param(void *arg, const char *arg1); 10 | 11 | typedef struct get_param_data { 12 | const char *name; 13 | get_param *get_param_fn; 14 | } get_param_data_t; 15 | 16 | typedef struct set_param_data { 17 | const char *name; 18 | set_param *set_param_fn; 19 | } set_param_data_t; 20 | 21 | const get_param_data_t* surround_rec_get_get_param_data(void); 22 | 23 | const set_param_data_t* surround_rec_get_set_param_data(void); 24 | 25 | int surround_rec_init(void **arg, int arg1, int arg2, int arg3, 26 | int arg4, const char *arg5); 27 | 28 | void surround_rec_deinit(void *arg); 29 | 30 | void surround_rec_process(void *arg, const int16_t *arg1, int16_t *arg2); 31 | 32 | #endif /* #ifndef _SURROUND_REC_INTERFACE_H_ */ 33 | -------------------------------------------------------------------------------- /sepolicy/hwservice_contexts: -------------------------------------------------------------------------------- 1 | motorola.hardware.camera.provider::ICameraProvider u:object_r:hal_camera_hwservice:s0 2 | motorola.hardware.mods_camera.provider::ICameraProvider u:object_r:hal_camera_hwservice:s0 3 | vendor.nxp.nxpnfc::INxpNfc u:object_r:nxpnfc_hwservice:s0 4 | vendor.nxp.nxpese::INxpEse u:object_r:nxpese_hwservice:s0 5 | com.fingerprints.extension::IFingerprintAuthenticator u:object_r:fpc_extension_service:s0 6 | com.fingerprints.extension::IFingerprintCalibration u:object_r:fpc_extension_service:s0 7 | com.fingerprints.extension::IFingerprintEngineering u:object_r:fpc_extension_service:s0 8 | com.fingerprints.extension::IFingerprintNavigation u:object_r:fpc_extension_service:s0 9 | com.fingerprints.extension::IFingerprintSensorTest u:object_r:fpc_extension_service:s0 10 | 11 | -------------------------------------------------------------------------------- /LineageActions/res/drawable/switchbar_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /LineageActions/res/mipmap-anydpi/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /gps/pla/Android.mk: -------------------------------------------------------------------------------- 1 | GNSS_CFLAGS := \ 2 | -Werror \ 3 | -Wno-error=unused-parameter \ 4 | -Wno-error=format \ 5 | -Wno-error=macro-redefined \ 6 | -Wno-error=reorder \ 7 | -Wno-error=missing-braces \ 8 | -Wno-error=self-assign \ 9 | -Wno-error=enum-conversion \ 10 | -Wno-error=logical-op-parentheses \ 11 | -Wno-error=null-arithmetic \ 12 | -Wno-error=null-conversion \ 13 | -Wno-error=parentheses-equality \ 14 | -Wno-error=undefined-bool-conversion \ 15 | -Wno-error=tautological-compare \ 16 | -Wno-error=switch \ 17 | -Wno-error=date-time 18 | 19 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 20 | ifneq ($(BUILD_TINY_ANDROID),true) 21 | 22 | LOCAL_PATH := $(call my-dir) 23 | 24 | include $(CLEAR_VARS) 25 | LOCAL_MODULE := libloc_pla_headers 26 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/android 27 | include $(BUILD_HEADER_LIBRARY) 28 | 29 | endif # not BUILD_TINY_ANDROID 30 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 31 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 5dp 21 | 95% 22 | 23 | 24 | -------------------------------------------------------------------------------- /hardware-moto-sensors/utils/sensor_time.h: -------------------------------------------------------------------------------- 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 | #ifndef SENSOR_TIME_H 18 | #define SENSOR_TIME_H 19 | 20 | #include 21 | 22 | #ifdef __cplusplus 23 | #define EXTERNC extern "C" 24 | #else 25 | #define EXTERNC 26 | #endif 27 | 28 | EXTERNC int64_t sensor_elapsed_realtime(); 29 | 30 | #undef EXTERNC 31 | 32 | #endif // SENSOR_TIME_H 33 | -------------------------------------------------------------------------------- /sepolicy/system_server.te: -------------------------------------------------------------------------------- 1 | binder_call(system_server, rild); 2 | 3 | allow system_server sysfs_homebutton:file rw_file_perms; 4 | allow system_server sysfs_homebutton:dir r_dir_perms; 5 | allow system_server rild:binder transfer; 6 | allow system_server sysfs_capsense:dir search; 7 | allow system_server sysfs_capsense:file rw_file_perms; 8 | allow system_server init:unix_stream_socket { read }; 9 | # allow system_server dalvikcache_data_file:file { execute }; 10 | 11 | # Screen off gestures 12 | allow system_server sysfs_screen_off_gestures:dir search; 13 | allow system_server sysfs_screen_off_gestures:file rw_file_perms; 14 | 15 | allow system_server qti_debugfs:file { getattr open read }; 16 | allow system_server init:unix_stream_socket write; 17 | 18 | allow system_server sensors_device:chr_file { ioctl open read }; 19 | 20 | allow system_server vendor_file:file { getattr open read execute }; 21 | 22 | allow system_server mm-qcamerad:binder call; 23 | 24 | get_prop(system_server, vendor_camera_prop); 25 | -------------------------------------------------------------------------------- /gps/gnss/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | $(LOCPLA_CFLAGS) \ 3 | $(LOCHAL_CFLAGS) \ 4 | $(GPSUTILS_CFLAGS) \ 5 | $(LOCCORE_CFLAGS) \ 6 | -I./ \ 7 | -I../utils \ 8 | -I$(WORKSPACE)/hardware/qcom/gps/core/data-items \ 9 | -I../location \ 10 | -std=c++11 11 | 12 | libgnss_la_SOURCES = \ 13 | location_gnss.cpp \ 14 | GnssAdapter.cpp \ 15 | XtraSystemStatusObserver.cpp \ 16 | Agps.cpp 17 | 18 | if USE_GLIB 19 | libgnss_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 20 | libgnss_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -avoid-version 21 | libgnss_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 22 | else 23 | libgnss_la_CFLAGS = $(AM_CFLAGS) 24 | libgnss_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 25 | libgnss_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 26 | endif 27 | 28 | libgnss_la_LIBADD = -lstdc++ $(GPSUTILS_LIBS) $(LOCCORE_LIBS) 29 | 30 | #Create and Install libraries 31 | lib_LTLIBRARIES = libgnss.la 32 | -------------------------------------------------------------------------------- /gps/location/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := liblocation_api 9 | LOCAL_VENDOR_MODULE := true 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | LOCAL_SHARED_LIBRARIES := \ 13 | libutils \ 14 | libcutils \ 15 | libgps.utils \ 16 | libdl \ 17 | liblog 18 | 19 | LOCAL_SRC_FILES += \ 20 | LocationAPI.cpp \ 21 | LocationAPIClientBase.cpp 22 | 23 | LOCAL_CFLAGS += \ 24 | -fno-short-enums 25 | 26 | LOCAL_HEADER_LIBRARIES := \ 27 | libloc_pla_headers \ 28 | libgps.utils_headers 29 | 30 | LOCAL_PRELINK_MODULE := false 31 | 32 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 33 | include $(BUILD_SHARED_LIBRARY) 34 | 35 | include $(CLEAR_VARS) 36 | LOCAL_MODULE := liblocation_api_headers 37 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 38 | include $(BUILD_HEADER_LIBRARY) 39 | 40 | endif # not BUILD_TINY_ANDROID 41 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 42 | -------------------------------------------------------------------------------- /hardware-moto-sensors/vl53l0_hal/TofModule.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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("ToF Sensor Module"); 24 | 25 | -------------------------------------------------------------------------------- /hardware-moto-sensors/tof_hal/TofModule.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("ToF Sensor Module"); 24 | 25 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /sepolicy/hal_fingerprint_fpc.te: -------------------------------------------------------------------------------- 1 | type hal_fingerprint_fpc, domain; 2 | hal_server_domain(hal_fingerprint_fpc, hal_fingerprint) 3 | 4 | type hal_fingerprint_fpc_exec, exec_type, vendor_file_type, file_type; 5 | init_daemon_domain(hal_fingerprint_fpc) 6 | 7 | hwbinder_use(hal_fingerprint_fpc) 8 | vndbinder_use(hal_fingerprint_fpc) 9 | 10 | # Check if hwservicemanager is ready 11 | get_prop(hal_fingerprint_fpc, hwservicemanager_prop) 12 | 13 | 14 | 15 | r_dir_file(hal_fingerprint_fpc, firmware_file) 16 | r_dir_file(hal_fingerprint_fpc, sysfs_devfreq) 17 | 18 | allow hal_fingerprint_fpc tee_device:chr_file { open read write ioctl }; 19 | allow hal_fingerprint_fpc uhid_device:chr_file rw_file_perms; 20 | allow hal_fingerprint_fpc sysfs_fpc:dir r_dir_perms; 21 | allow hal_fingerprint_fpc sysfs_fpc:file rw_file_perms; 22 | 23 | 24 | allow hal_fingerprint_fpc fingerprintd_data_file:dir rw_dir_perms; 25 | allow hal_fingerprint_fpc fingerprintd_data_file:file create_file_perms; 26 | 27 | allow hal_fingerprint_fpc self:netlink_socket create_socket_perms_no_ioctl; 28 | -------------------------------------------------------------------------------- /liblight/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | LOCAL_PATH:= $(call my-dir) 17 | # HAL module implemenation stored in 18 | # hw/..so 19 | include $(CLEAR_VARS) 20 | 21 | LOCAL_MODULE_RELATIVE_PATH := hw 22 | LOCAL_SHARED_LIBRARIES := liblog 23 | LOCAL_SRC_FILES := lights.c 24 | LOCAL_MODULE := lights.$(TARGET_BOARD_PLATFORM) 25 | LOCAL_MODULE_TAGS := optional 26 | 27 | include $(BUILD_SHARED_LIBRARY) 28 | -------------------------------------------------------------------------------- /gps/gnsspps/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | $(LOCPLA_CFLAGS) \ 3 | $(GPSUTILS_CFLAGS) \ 4 | -I$(WORKSPACE)/system/core/include \ 5 | -I./ 6 | 7 | ACLOCAL_AMFLAGS = -I m4 8 | 9 | libgnsspps_la_SOURCES = \ 10 | gnsspps.c 11 | 12 | if USE_GLIB 13 | libgnsspps_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 14 | libgnsspps_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 15 | libgnsspps_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 16 | else 17 | libgnsspps_la_CFLAGS = $(AM_CFLAGS) 18 | libgnsspps_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 19 | libgnsspps_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 20 | endif 21 | 22 | libgnsspps_la_LIBADD = -lstdc++ $(GPSUTILS_LIBS) 23 | 24 | library_include_HEADERS = \ 25 | gnsspps.h 26 | 27 | #Create and Install libraries 28 | lib_LTLIBRARIES = libgnsspps.la 29 | 30 | library_includedir = $(pkgincludedir) 31 | pkgconfigdir = $(libdir)/pkgconfig 32 | pkgconfig_DATA = gnsspps.pc 33 | EXTRA_DIST = $(pkgconfig_DATA) 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/packages/apps/Snap/res/values/qcomstrings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | false 20 | enable 21 | on 22 | 23 | -------------------------------------------------------------------------------- /LineageActions/res/layout/doze.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /sepolicy/hal_gnss_qti.te: -------------------------------------------------------------------------------- 1 | binder_call(hal_gnss_qti, servicemanager); 2 | get_prop(hal_gnss_qti, diag_prop); 3 | allow hal_gnss_qti per_mgr_service_old:service_manager find; 4 | allow hal_gnss_qti debug_prop:file read; 5 | allow hal_gnss_qti property_socket:sock_file write; 6 | 7 | # Most HALs are not allowed to use network sockets. Qcom library 8 | # libqdi is used across multiple processes which are clients of 9 | # netmgrd including the GNSS HAL. libqdi first attempts to get the network 10 | # interface using an IOCTL on a UDP INET socket, which isn't allowed here. 11 | # If that fails, it falls back to using libc's if_nameindex() which requires 12 | # a netlink route socket, which HALs may use. Due to the initial 13 | # attempt to use a UDP socket, we still see a selinux denial, 14 | # but it is safe to ignore. 15 | # TODO (b/37730994) Remove udp_socket requirement from 16 | # libqdi and have all its clients use netlink route 17 | # sockets. 18 | # Taken from device/google/wahoo 19 | dontaudit hal_gnss_qti self:udp_socket create; 20 | 21 | allow hal_gnss_qti sysfs:file {open read }; 22 | -------------------------------------------------------------------------------- /LineageActions/res/layout/fp_gesture.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /thermal/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2015 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | LOCAL_PATH := $(call my-dir) 16 | 17 | include $(CLEAR_VARS) 18 | 19 | LOCAL_MODULE := thermal.$(TARGET_BOARD_PLATFORM) 20 | LOCAL_MODULE_RELATIVE_PATH := hw 21 | LOCAL_PROPRIETARY_MODULE := true 22 | 23 | LOCAL_SRC_FILES := thermal.c 24 | LOCAL_SRC_FILES += thermal-8953.c 25 | 26 | LOCAL_SHARED_LIBRARIES := liblog libcutils 27 | LOCAL_MODULE_TAGS := optional 28 | LOCAL_CFLAGS := -Wno-unused-parameter 29 | 30 | include $(BUILD_SHARED_LIBRARY) 31 | -------------------------------------------------------------------------------- /audio/audio_ext_spkr.conf: -------------------------------------------------------------------------------- 1 | global_config { 2 | name Potter 3 | sonification_pad 21 4 | sonification_prox_timeout_sec 5 5 | force_ring_ramp true 6 | } 7 | 8 | ring { 9 | #dB to attenuate playback to meet safety level at each volume step 10 | #16 steps total, 15...0. In case of truncated list, last attenuation 11 | #given will be applied to all lower volume steps 12 | attenuation 35,33,30,28,26,23,21,19,16,14,11,9,7,3,0,0 13 | knee_step 16 14 | } 15 | 16 | voice { 17 | #dB to attenuate playback to meet safety level at each volume step 18 | #16 steps total, 15...0. In case of truncated list, last attenuation 19 | #given will be applied to all lower volume steps 20 | attenuation 32,29,29,26,26,23,23,20,20,17,17,14,14,11,11,11 21 | knee_step 16 22 | } 23 | 24 | media { 25 | #dB to attenuate playback to meet safety level at each volume step 26 | #16 steps total, 15...0. In case of truncated list, last attenuation 27 | #given will be applied to all lower volume steps 28 | attenuation 35,33,30,28,26,23,21,19,16,14,11,9,7,3,0,0 29 | knee_step 16 30 | } 31 | -------------------------------------------------------------------------------- /gps/gnss/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libgnss 9 | LOCAL_VENDOR_MODULE := true 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | LOCAL_SHARED_LIBRARIES := \ 13 | libutils \ 14 | libcutils \ 15 | libdl \ 16 | liblog \ 17 | libloc_core \ 18 | libgps.utils 19 | 20 | LOCAL_SRC_FILES += \ 21 | location_gnss.cpp \ 22 | GnssAdapter.cpp \ 23 | Agps.cpp \ 24 | XtraSystemStatusObserver.cpp 25 | 26 | LOCAL_CFLAGS += \ 27 | -fno-short-enums \ 28 | -Wno-reinterpret-base-class 29 | 30 | ifeq ($(TARGET_BUILD_VARIANT),user) 31 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 32 | endif 33 | 34 | LOCAL_HEADER_LIBRARIES := \ 35 | libgps.utils_headers \ 36 | libloc_core_headers \ 37 | libloc_pla_headers \ 38 | liblocation_api_headers 39 | 40 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 41 | 42 | LOCAL_PRELINK_MODULE := false 43 | 44 | include $(BUILD_SHARED_LIBRARY) 45 | 46 | endif # not BUILD_TINY_ANDROID 47 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 48 | -------------------------------------------------------------------------------- /releasetools/releasetools.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 The CyanogenMod Project 2 | # Copyright (C) 2017 The LineageOS Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | def IncrementalOTA_InstallEnd(info): 18 | ReplaceDeviceConfig(info) 19 | 20 | def FullOTA_InstallEnd(info): 21 | ReplaceDeviceConfig(info) 22 | 23 | def ReplaceDeviceConfig(info): 24 | info.script.Mount("/system") 25 | info.script.AppendExtra('ui_print("Checking NFC, compass and DTV support");') 26 | info.script.AppendExtra('run_program("/sbin/sh", "/system/vendor/bin/check_features.sh");') 27 | info.script.Unmount("/system") 28 | 29 | -------------------------------------------------------------------------------- /gps/android/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #define LOG_TAG "android.hardware.gnss@1.1-service-qti" 22 | 23 | #include 24 | #include 25 | 26 | using android::hardware::gnss::V1_1::IGnss; 27 | using android::hardware::defaultPassthroughServiceImplementation; 28 | 29 | int main() { 30 | return defaultPassthroughServiceImplementation(); 31 | } 32 | -------------------------------------------------------------------------------- /libhidl/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017 The LineageOS Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | include $(CLEAR_VARS) 17 | LOCAL_SHARED_LIBRARIES := libhidltransport 18 | LOCAL_MODULE := android.hidl.base@1.0 19 | LOCAL_MODULE_TAGS := optional 20 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 21 | LOCAL_VENDOR_MODULE := true 22 | include $(BUILD_SHARED_LIBRARY) 23 | 24 | include $(CLEAR_VARS) 25 | LOCAL_SHARED_LIBRARIES := libhidltransport 26 | LOCAL_MODULE := android.hidl.manager@1.0 27 | LOCAL_MODULE_TAGS := optional 28 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 29 | LOCAL_VENDOR_MODULE := true 30 | include $(BUILD_SHARED_LIBRARY) 31 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | true 21 | 22 | 28 | 1 29 | 30 | 31 | -------------------------------------------------------------------------------- /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_PROPRIETARY_MODULE := true 25 | LOCAL_MODULE_OWNER := moto 26 | LOCAL_CFLAGS += -Wno-gnu-designator -Wno-writable-strings 27 | include $(BUILD_EXECUTABLE) 28 | endif 29 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | Moto G5 Plus 25 | 26 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | 25 | 26 | 0 27 | -1 28 | -1 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /gps/location/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = \ 4 | -I./ \ 5 | -I../utils \ 6 | $(LOCPLA_CFLAGS) \ 7 | $(GPSUTILS_CFLAGS) \ 8 | -std=c++11 9 | 10 | liblocation_api_la_SOURCES = \ 11 | LocationAPI.cpp \ 12 | LocationAPIClientBase.cpp 13 | 14 | if USE_GLIB 15 | liblocation_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 16 | liblocation_api_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 17 | liblocation_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 18 | else 19 | liblocation_api_la_CFLAGS = $(AM_CFLAGS) 20 | liblocation_api_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 21 | liblocation_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 22 | endif 23 | 24 | liblocation_api_la_LIBADD = -lstdc++ -ldl $(GPSUTILS_LIBS) 25 | 26 | library_include_HEADERS = \ 27 | LocationAPI.h \ 28 | LocationAPIClientBase.h \ 29 | location_interface.h 30 | 31 | #Create and Install libraries 32 | lib_LTLIBRARIES = liblocation_api.la 33 | 34 | library_includedir = $(pkgincludedir) 35 | 36 | pkgconfigdir = $(libdir)/pkgconfig 37 | pkgconfig_DATA = location-api.pc 38 | EXTRA_DIST = $(pkgconfig_DATA) 39 | -------------------------------------------------------------------------------- /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 G5 Plus" 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 BT_CLEAN_TURN_ON_DISABLED TRUE 29 | #define BTM_WBS_INCLUDED TRUE 30 | #define BTIF_HF_WBS_PREFERRED TRUE 31 | #define BTM_SCO_ENHANCED_SYNC_ENABLED FALSE 32 | #undef PROPERTY_VALUE_MAX 33 | #endif 34 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /LineageActions/res/xml/doze_panel_indexable.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /rootdir/etc/init.mmi.laser.sh: -------------------------------------------------------------------------------- 1 | #!/system/vendor/bin/sh 2 | scriptname=${0##*/} 3 | dbg_on=1 4 | debug() 5 | { 6 | [ $dbg_on ] && echo "Debug: $*" 7 | } 8 | 9 | notice() 10 | { 11 | echo "$*" 12 | echo "$scriptname: $*" > /dev/kmsg 13 | } 14 | 15 | error_and_leave() 16 | { 17 | local err_msg 18 | local err_code=$1 19 | case $err_code in 20 | 1) err_msg="Error: No response";; 21 | 2) err_msg="Error: in factory mode";; 22 | 3) err_msg="Error: calibration file not exist";; 23 | 4) err_msg="Error: the calibration sys file not show up";; 24 | esac 25 | notice "$err_msg" 26 | exit $err_code 27 | } 28 | 29 | bootmode=`getprop ro.bootmode` 30 | if [ $bootmode == "mot-factory" ] 31 | then 32 | error_and_leave 2 33 | fi 34 | 35 | laser_offset_path=/sys/kernel/range/offset 36 | laser_offset_string=$(ls $laser_offset_path) 37 | [ -z "$laser_offset_string" ] && error_and_leave 4 38 | 39 | cal_offset_path=/persist/camera/focus/offset_cal 40 | cal_offset_string=$(ls $cal_offset_path) 41 | [ -z "$cal_offset_string" ] && error_and_leave 3 42 | 43 | offset_cal=$(cat $cal_offset_path) 44 | debug "offset cal value [$offset_cal]" 45 | 46 | debug "set cal value to kernel" 47 | echo $offset_cal > $laser_offset_path 48 | notice "laser cal data update success" 49 | -------------------------------------------------------------------------------- /hardware-moto-sensors/stml0xx_hal/RotationVector.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 | /* 18 | * Copyright (C) 2016 Motorola Mobility LLC 19 | */ 20 | 21 | #ifndef ROTATION_VECTOR_H 22 | #define ROTATION_VECTOR_H 23 | 24 | #include 25 | #include "FusionSensorBase.h" 26 | 27 | class RotationVector : public FusionSensorBase { 28 | public: 29 | RotationVector(); 30 | virtual ~RotationVector(); 31 | 32 | static RotationVector* getInstance(); 33 | 34 | bool processFusion(FusionData& fusionData, bool reset); 35 | 36 | private: 37 | static RotationVector self; 38 | }; 39 | 40 | #endif // ROTATION_VECTOR_H 41 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /LineageActions/src/org/lineageos/settings/device/DozeSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.lineageos.settings.device; 18 | 19 | import android.os.Bundle; 20 | 21 | import android.preference.PreferenceActivity; 22 | 23 | public class DozeSettingsActivity extends PreferenceActivity { 24 | 25 | @Override 26 | protected void onCreate(Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | if (savedInstanceState == null){ 29 | getFragmentManager().beginTransaction() 30 | .replace(android.R.id.content, new DozeSettingsFragment()).commit(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /LineageActions/res/xml/fp_gesture_panel_indexable.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /LineageActions/src/org/lineageos/settings/device/GestureSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.lineageos.settings.device; 18 | 19 | import android.os.Bundle; 20 | 21 | import android.preference.PreferenceActivity; 22 | 23 | public class GestureSettingsActivity extends PreferenceActivity { 24 | 25 | @Override 26 | protected void onCreate(Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | if (savedInstanceState == null){ 29 | getFragmentManager().beginTransaction() 30 | .replace(android.R.id.content, new GestureSettingsFragment()).commit(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /LineageActions/src/org/lineageos/settings/device/ActionsPreferenceActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.lineageos.settings.device; 18 | 19 | import android.os.Bundle; 20 | 21 | import android.preference.PreferenceActivity; 22 | 23 | public class ActionsPreferenceActivity extends PreferenceActivity { 24 | 25 | @Override 26 | protected void onCreate(Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | if (savedInstanceState == null){ 29 | getFragmentManager().beginTransaction() 30 | .replace(android.R.id.content, new ActionsPreferenceFragment()).commit(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /LineageActions/src/org/lineageos/settings/device/FPGestureSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.lineageos.settings.device; 18 | 19 | import android.os.Bundle; 20 | 21 | import android.preference.PreferenceActivity; 22 | 23 | public class FPGestureSettingsActivity extends PreferenceActivity { 24 | 25 | @Override 26 | protected void onCreate(Bundle savedInstanceState) { 27 | super.onCreate(savedInstanceState); 28 | if (savedInstanceState == null){ 29 | getFragmentManager().beginTransaction() 30 | .replace(android.R.id.content, new FPGestureSettingsFragment()).commit(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /hardware-moto-sensors/stml0xx_hal/GeoMagRotationVector.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 | /* 18 | * Copyright (C) 2016 Motorola Mobility LLC 19 | */ 20 | 21 | #ifndef GEOMAG_ROTATION_VECTOR_H 22 | #define GEOMAG_ROTATION_VECTOR_H 23 | 24 | #include 25 | #include "FusionSensorBase.h" 26 | 27 | class GeoMagRotationVector : public FusionSensorBase { 28 | public: 29 | GeoMagRotationVector(); 30 | virtual ~GeoMagRotationVector(); 31 | 32 | static GeoMagRotationVector* getInstance(); 33 | 34 | bool processFusion(FusionData& fusionData, bool reset); 35 | 36 | private: 37 | static GeoMagRotationVector self; 38 | }; 39 | 40 | #endif // GEOMAG_ROTATION_VECTOR_H 41 | -------------------------------------------------------------------------------- /LineageActions/res/xml/screen_off_gesture_panel_indexable.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 20 | 21 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /LineageActions/src/org/lineageos/settings/device/ScreenOffGestureSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.lineageos.settings.device; 18 | 19 | import android.os.Bundle; 20 | 21 | import android.preference.PreferenceActivity; 22 | 23 | public class ScreenOffGestureSettingsActivity extends PreferenceActivity { 24 | @Override 25 | protected void onCreate(Bundle savedInstanceState) { 26 | super.onCreate(savedInstanceState); 27 | if (savedInstanceState == null){ 28 | getFragmentManager().beginTransaction() 29 | .replace(android.R.id.content, new ScreenOffGestureSettingsFragment()).commit(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /hardware-moto-sensors/stml0xx_hal/LinearAccelGravity.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 | /* 18 | * Copyright (C) 2015 Motorola Mobility LLC 19 | */ 20 | 21 | #ifndef LINEAR_ACCEL_GRAVITY_H 22 | #define LINEAR_ACCEL_GRAVITY_H 23 | 24 | #include 25 | #include "FusionSensorBase.h" 26 | 27 | class LinearAccelGravity : public FusionSensorBase { 28 | public: 29 | LinearAccelGravity(); 30 | virtual ~LinearAccelGravity(); 31 | 32 | static LinearAccelGravity* getInstance(); 33 | 34 | bool processFusion(FusionData& fusionData, bool reset); 35 | 36 | private: 37 | static LinearAccelGravity self; 38 | float gameRVData[4]; 39 | int64_t gameRVts; 40 | }; 41 | 42 | #endif // LINEAR_ACCEL_GRAVITY_H 43 | -------------------------------------------------------------------------------- /LineageActions/src/org/lineageos/settings/device/GestureSettingsFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.lineageos.settings.device; 18 | 19 | import android.os.Bundle; 20 | import android.support.v14.preference.PreferenceFragment; 21 | 22 | public class GestureSettingsFragment extends PreferenceFragment { 23 | 24 | @Override 25 | public void onActivityCreated(Bundle savedInstanceState) { 26 | super.onActivityCreated(savedInstanceState); 27 | getActivity().getActionBar().setDisplayHomeAsUpEnabled(true); 28 | } 29 | 30 | @Override 31 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { 32 | addPreferencesFromResource(R.xml.actions_panel); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 21 | true 22 | 23 | 24 | true 25 | 26 | 27 | true 28 | 29 | 30 | -------------------------------------------------------------------------------- /LineageActions/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE_TAGS := optional 5 | 6 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 7 | 8 | LOCAL_PACKAGE_NAME := LineageActions 9 | LOCAL_CERTIFICATE := platform 10 | LOCAL_PRIVATE_PLATFORM_APIS := true 11 | LOCAL_USE_AAPT2 := true 12 | LOCAL_PRIVILEGED_MODULE := true 13 | 14 | LOCAL_STATIC_JAVA_LIBRARIES := \ 15 | android-support-v14-preference \ 16 | android-support-v7-appcompat \ 17 | android-support-v7-preference \ 18 | android-support-v7-recyclerview \ 19 | org.lineageos.platform.internal 20 | 21 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags 22 | 23 | LOCAL_RESOURCE_DIR := \ 24 | $(LOCAL_PATH)/res \ 25 | frameworks/support/v14/preference/res \ 26 | frameworks/support/v7/appcompat/res \ 27 | frameworks/support/v7/preference/res \ 28 | frameworks/support/v7/recyclerview/res \ 29 | $(TOP)/packages/resources/devicesettings/res 30 | 31 | LOCAL_AAPT_FLAGS := --auto-add-overlay \ 32 | --extra-packages android.support.v14.preference:android.support.v7.appcompat:android.support.v7.preference:android.support.v7.recyclerview 33 | 34 | LOCAL_PROGUARD_ENABLED := disabled 35 | LOCAL_DEX_PREOPT := false 36 | 37 | include frameworks/base/packages/SettingsLib/common.mk 38 | 39 | include $(BUILD_PACKAGE) 40 | 41 | include $(call all-makefiles-under,$(LOCAL_PATH)) 42 | -------------------------------------------------------------------------------- /hardware-moto-sensors/rearProx/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2008 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | LOCAL_PATH := $(call my-dir) 16 | 17 | # HAL module implemenation, not prelinked, and stored in 18 | # hw/..so 19 | include $(CLEAR_VARS) 20 | 21 | LOCAL_MODULE := sensors.rp 22 | 23 | 24 | 25 | LOCAL_MODULE_TAGS := optional 26 | 27 | LOCAL_PROPRIETARY_MODULE := true 28 | 29 | LOCAL_CLANG := true 30 | 31 | LOCAL_SRC_FILES := \ 32 | sensors.cpp \ 33 | SensorBase.cpp \ 34 | ProximitySensor.cpp \ 35 | CapSensor.cpp \ 36 | InputEventReader.cpp \ 37 | NativeSensorManager.cpp 38 | 39 | LOCAL_SHARED_LIBRARIES += \ 40 | libc \ 41 | libutils \ 42 | libcutils \ 43 | liblog \ 44 | libdl 45 | 46 | 47 | include $(BUILD_SHARED_LIBRARY) 48 | 49 | -------------------------------------------------------------------------------- /LineageActions/res/xml/doze_panel.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 25 | 26 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /LineageActions/src/org/lineageos/settings/device/ActionsPreferenceFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 The CyanogenMod Project 3 | * Copyright (C) 2017 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.device; 19 | 20 | import android.os.Bundle; 21 | import android.support.v14.preference.PreferenceFragment; 22 | 23 | public class ActionsPreferenceFragment extends PreferenceFragment { 24 | @Override 25 | public void onActivityCreated(Bundle savedInstanceState) { 26 | super.onActivityCreated(savedInstanceState); 27 | getActivity().getActionBar().setDisplayHomeAsUpEnabled(true); 28 | } 29 | 30 | @Override 31 | public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { 32 | addPreferencesFromResource(R.xml.main_panel); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /rootdir/etc/init.mmi.boot.sh: -------------------------------------------------------------------------------- 1 | #!/system/vendor/bin/sh 2 | 3 | PATH=/sbin:/system/vendor/bin 4 | export PATH 5 | 6 | scriptname=${0##*/} 7 | 8 | # We take this from cpuinfo because hex "letters" are lowercase there - (lolwhat) 9 | cinfo=`getprop ro.boot.hwrev` 10 | hw=${cinfo#???} 11 | 12 | # Now "cook" the value so it can be matched against devtree names 13 | m2=${hw%?} 14 | minor2=${hw#$m2} 15 | m1=${m2%?} 16 | minor1=${m2#$m1} 17 | if [ "$minor2" == "0" ]; then 18 | minor2="" 19 | if [ "$minor1" == "0" ]; then 20 | minor1="" 21 | fi 22 | fi 23 | 24 | rev="p${hw%??}$minor1$minor2" 25 | rev2=`echo $rev | tr '[:upper:]' '[:lower:]'` 26 | 27 | setprop ro.boot.hardware.revision $rev2 28 | unset hw cinfo m1 m2 minor1 minor2 29 | 30 | # Let kernel know our image version/variant/crm_version 31 | if [ -f /sys/devices/soc0/select_image ]; then 32 | image_version="10:" 33 | image_version+=`getprop ro.build.id` 34 | image_version+=":" 35 | image_version+=`getprop ro.build.version.incremental` 36 | image_variant=`getprop ro.product.name` 37 | image_variant+="-" 38 | image_variant+=`getprop ro.build.type` 39 | oem_version=`getprop ro.build.version.codename` 40 | echo 10 > /sys/devices/soc0/select_image 41 | echo $image_version > /sys/devices/soc0/image_version 42 | echo $image_variant > /sys/devices/soc0/image_variant 43 | echo $oem_version > /sys/devices/soc0/image_crm_version 44 | fi 45 | 46 | 47 | -------------------------------------------------------------------------------- /overlay/packages/apps/Snap/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | false 21 | 22 | 23 | false 24 | 25 | 26 | true 27 | 28 | 29 | true 30 | 31 | 32 | true 33 | 34 | 35 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 25 | true 26 | 27 | 30 | false 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /configs/check_features.sh: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | 3 | sku=`getprop ro.boot.hardware.sku` 4 | 5 | if [ "$sku" = "XT1687" ]; then 6 | # XT1687 doesn't have NFC chip 7 | rm /system/vendor/etc/permissions/android.hardware.nfc.xml 8 | rm /system/vendor/etc/permissions/android.hardware.nfc.hce.xml 9 | rm /system/vendor/etc/permissions/com.android.nfc_extras.xml 10 | rm -r /system/app/NfcNci 11 | else 12 | # Only XT1687 variant got a compass 13 | rm /system/vendor/etc/permissions/android.hardware.sensor.compass.xml 14 | fi 15 | 16 | if ! [ "$sku" = "XT1683" ]; then 17 | # Others variants doesn't have DTV support 18 | rm /system/vendor/etc/permissions/com.motorola.hardware.dtv.xml 19 | rm /system/vendor/etc/permissions/mot_dtv_permissions.xml 20 | rm /system/vendor/bin/hw/motorola.hardware.tv@1.0-service 21 | rm /system/vendor/etc/init/motorola.hardware.tv@1.0-service.rc 22 | rm /system/vendor/lib/libdtvtuner.so 23 | rm /system/vendor/lib/hw/motorola.hardware.tv@1.0-impl.so 24 | rm /system/vendor/lib/motorola.hardware.tv@1.0.so 25 | rm /system/vendor/lib/motorola.hardware.tv@1.0_vendor.so 26 | rm /system/vendor/lib64/libdtvtuner.so 27 | rm /system/vendor/lib64/hw/motorola.hardware.tv@1.0-impl.so 28 | rm /system/vendor/lib64/motorola.hardware.tv@1.0.so 29 | rm /system/vendor/lib64/motorola.hardware.tv@1.0_vendor.so 30 | rm -r /system/vendor/app/DTVPlayer 31 | rm -r /system/vendor/app/DTVService 32 | fi 33 | 34 | -------------------------------------------------------------------------------- /vndk/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(LOCAL_PATH)/vndk-sp-libs.mk 4 | 5 | define define-vndk-sp-lib 6 | include $$(CLEAR_VARS) 7 | LOCAL_MODULE := $1.vndk-sp-gen 8 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 9 | LOCAL_PREBUILT_MODULE_FILE := $$(TARGET_OUT_INTERMEDIATE_LIBRARIES)/$1.so 10 | LOCAL_STRIP_MODULE := false 11 | LOCAL_MULTILIB := first 12 | LOCAL_MODULE_TAGS := optional 13 | LOCAL_INSTALLED_MODULE_STEM := $1.so 14 | LOCAL_MODULE_SUFFIX := .so 15 | LOCAL_MODULE_RELATIVE_PATH := vndk-sp 16 | include $$(BUILD_PREBUILT) 17 | 18 | ifneq ($$(TARGET_2ND_ARCH),) 19 | ifneq ($$(TARGET_TRANSLATE_2ND_ARCH),true) 20 | include $$(CLEAR_VARS) 21 | LOCAL_MODULE := $1.vndk-sp-gen 22 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 23 | LOCAL_PREBUILT_MODULE_FILE := $$($$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_INTERMEDIATE_LIBRARIES)/$1.so 24 | LOCAL_STRIP_MODULE := false 25 | LOCAL_MULTILIB := 32 26 | LOCAL_MODULE_TAGS := optional 27 | LOCAL_INSTALLED_MODULE_STEM := $1.so 28 | LOCAL_MODULE_SUFFIX := .so 29 | LOCAL_MODULE_RELATIVE_PATH := vndk-sp 30 | include $$(BUILD_PREBUILT) 31 | endif # TARGET_TRANSLATE_2ND_ARCH is not true 32 | endif # TARGET_2ND_ARCH is not empty 33 | endef 34 | 35 | $(foreach lib,$(VNDK_SP_LIBRARIES),\ 36 | $(eval $(call define-vndk-sp-lib,$(lib)))) 37 | 38 | include $(CLEAR_VARS) 39 | LOCAL_MODULE := vndk-sp 40 | LOCAL_MODULE_TAGS := optional 41 | LOCAL_REQUIRED_MODULES := $(addsuffix .vndk-sp-gen,$(VNDK_SP_LIBRARIES)) 42 | include $(BUILD_PHONY_PACKAGE) 43 | -------------------------------------------------------------------------------- /LineageActions/res/drawable/ic_settings_gestures_dashboard.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | 25 | 28 | 29 | -------------------------------------------------------------------------------- /libshims/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 The CyanogenMod Project 3 | # Copyright (C) 2017 The LineageOS Project 4 | # Copyright (C) 2018 Alberto97 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 | LOCAL_PATH := $(call my-dir) 19 | 20 | # ADSP 21 | include $(CLEAR_VARS) 22 | LOCAL_C_INCLUDES := external/tinyalsa/include 23 | LOCAL_SRC_FILES := mixer.c 24 | LOCAL_MODULE := libshim_adsp 25 | LOCAL_MODULE_TAGS := optional 26 | include $(BUILD_SHARED_LIBRARY) 27 | 28 | include $(CLEAR_VARS) 29 | LOCAL_SRC_FILES := libqsap_shim.c 30 | LOCAL_SHARED_LIBRARIES := libqsap_sdk liblog 31 | LOCAL_C_INCLUDES := $(TOP)/system/qcom/softap/sdk 32 | LOCAL_MODULE := libqsap_shim 33 | LOCAL_MODULE_TAGS := optional 34 | LOCAL_PROPRIETARY_MODULE := true 35 | include $(BUILD_SHARED_LIBRARY) 36 | 37 | include $(CLEAR_VARS) 38 | LOCAL_SRC_FILES := justshoot_shim.cpp 39 | LOCAL_SHARED_LIBRARIES := libutils 40 | LOCAL_MODULE := libjustshoot_shim 41 | LOCAL_MODULE_TAGS := optional 42 | LOCAL_PROPRIETARY_MODULE := true 43 | include $(BUILD_SHARED_LIBRARY) 44 | -------------------------------------------------------------------------------- /lineagehw/src/org/lineageos/hardware/KeyDisabler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.lineageos.hardware; 18 | 19 | import org.lineageos.internal.util.FileUtils; 20 | 21 | /* 22 | * Disable capacitive keys 23 | * 24 | * This is intended for use on devices in which the capacitive keys 25 | * can be fully disabled for replacement with a soft navbar. You 26 | * really should not be using this on a device with mechanical or 27 | * otherwise visible-when-inactive keys 28 | */ 29 | 30 | public class KeyDisabler { 31 | 32 | private static String CONTROL_PATH = "/sys/homebutton/enable"; 33 | 34 | public static boolean isSupported() { 35 | return FileUtils.isFileWritable(CONTROL_PATH); 36 | } 37 | 38 | public static boolean isActive() { 39 | return FileUtils.readOneLine(CONTROL_PATH).equals("0"); 40 | } 41 | 42 | public static boolean setActive(boolean state) { 43 | return true; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /LineageActions/res/drawable/ic_settings_gestures.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 23 | 26 | 29 | 30 | -------------------------------------------------------------------------------- /LineageActions/res/drawable/ic_settings_screen_off_gestures.xml: -------------------------------------------------------------------------------- 1 | 13 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /hardware-moto-sensors/rearProx/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 | -------------------------------------------------------------------------------- /gps/utils/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | #Compile this library only for builds with the latest modem image 4 | 5 | LOCAL_PATH := $(call my-dir) 6 | 7 | include $(CLEAR_VARS) 8 | 9 | 10 | ## Libs 11 | LOCAL_SHARED_LIBRARIES := \ 12 | libutils \ 13 | libcutils \ 14 | liblog 15 | 16 | LOCAL_SRC_FILES += \ 17 | loc_log.cpp \ 18 | loc_cfg.cpp \ 19 | msg_q.c \ 20 | linked_list.c \ 21 | loc_target.cpp \ 22 | LocHeap.cpp \ 23 | LocTimer.cpp \ 24 | LocThread.cpp \ 25 | MsgTask.cpp \ 26 | loc_misc_utils.cpp \ 27 | loc_nmea.cpp \ 28 | LocIpc.cpp 29 | 30 | # Flag -std=c++11 is not accepted by compiler when LOCAL_CLANG is set to true 31 | LOCAL_CFLAGS += \ 32 | -fno-short-enums \ 33 | -D_ANDROID_ 34 | 35 | ifeq ($(TARGET_BUILD_VARIANT),user) 36 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 37 | endif 38 | 39 | LOCAL_LDFLAGS += -Wl,--export-dynamic 40 | 41 | ## Includes 42 | LOCAL_HEADER_LIBRARIES := \ 43 | libutils_headers \ 44 | libloc_pla_headers \ 45 | liblocation_api_headers 46 | 47 | LOCAL_MODULE := libgps.utils 48 | LOCAL_VENDOR_MODULE := true 49 | LOCAL_MODULE_TAGS := optional 50 | 51 | LOCAL_PRELINK_MODULE := false 52 | 53 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 54 | 55 | include $(BUILD_SHARED_LIBRARY) 56 | 57 | include $(CLEAR_VARS) 58 | LOCAL_MODULE := libgps.utils_headers 59 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 60 | include $(BUILD_HEADER_LIBRARY) 61 | 62 | endif # not BUILD_TINY_ANDROID 63 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 64 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /LineageActions/res/drawable/ic_settings_doze.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /LineageActions/src/org/lineageos/settings/device/util/ProximityUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The CyanogenMod Project 3 | * Copyright (C) 2017 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.device.utils; 19 | 20 | import android.content.Context; 21 | import lineageos.providers.LineageSettings; 22 | 23 | public class ProximityUtils { 24 | public static boolean isProximityWakeEnabled(Context context){ 25 | boolean mProximityWakeSupported = context.getResources().getBoolean( 26 | org.lineageos.platform.internal.R.bool.config_proximityCheckOnWake); 27 | boolean defaultProximity = context.getResources().getBoolean( 28 | org.lineageos.platform.internal.R.bool.config_proximityCheckOnWakeEnabledByDefault); 29 | boolean proximityWakeCheckEnabled = LineageSettings.System.getInt(context.getContentResolver(), 30 | LineageSettings.System.PROXIMITY_ON_WAKE, defaultProximity ? 1 : 0) == 1; 31 | return mProximityWakeSupported && proximityWakeCheckEnabled; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /sepolicy/perfd.te: -------------------------------------------------------------------------------- 1 | type perfd, domain; 2 | type perfd_exec, exec_type, vendor_file_type, file_type; 3 | init_daemon_domain(perfd) 4 | 5 | allow perfd cgroup:file r_file_perms; 6 | 7 | allow perfd cameraserver:process signull; 8 | 9 | # files in /data/misc/perfd and /data/system/perfd 10 | allow perfd perfd_data_file:dir create_dir_perms; 11 | allow perfd perfd_data_file:{ file sock_file } create_file_perms; 12 | 13 | allow perfd proc_kernel_sched:file r_file_perms; 14 | 15 | # read access /sys 16 | r_dir_file(perfd, sysfs_type) 17 | # normally write is not granted to the default "sysfs" label. 18 | # In this case, perfd needs access to files in /sys that are 19 | # commonly created and destroyed. When the kernel creates them, 20 | # they are created with the default label "sysfs". For robustness, 21 | # allow perfd to write to "sysfs" to ensure it can optimally 22 | # tune the power/cpu settings. 23 | allow perfd sysfs:file write; 24 | allow perfd sysfs_msm_perf:file write; 25 | allow perfd sysfs_ssr:file write; 26 | allow perfd sysfs_devices_system_cpu:file write; 27 | allow perfd sysfs_power_management:file write; 28 | allow perfd sysfs_devfreq:file write; 29 | allow perfd sysfs_lib:file write; 30 | 31 | allow perfd proc_kernel_sched:file w_file_perms; 32 | allow perfd gpu_device:chr_file rw_file_perms; 33 | 34 | # perfd uses kill(pid, 0) to determine if a process exists. 35 | # Determining if a process exists does not require the kill capability 36 | # since a permission denied indicates the process exists. 37 | dontaudit perfd self:capability kill; 38 | 39 | allow perfd surfaceflinger:process signull; 40 | allow perfd hal_graphics_composer_default:process signull; 41 | 42 | get_prop(perfd, freq_prop); 43 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lineage_potter.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 The CyanogenMod Project 3 | # Copyright (C) 2017-2018 The LineageOS Project 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # Inherit from those products. Most specific first. 18 | $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) 19 | $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) 20 | $(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_n.mk) 21 | 22 | # Inherit from potter device 23 | $(call inherit-product, device/motorola/potter/device.mk) 24 | 25 | # Inherit some common Lineage stuff. 26 | $(call inherit-product, vendor/lineage/config/common_full_phone.mk) 27 | 28 | # Boot animation 29 | TARGET_SCREEN_WIDTH := 1080 30 | TARGET_SCREEN_HEIGHT := 1920 31 | 32 | ## Device identifier. This must come after all inclusions 33 | PRODUCT_DEVICE := potter 34 | PRODUCT_NAME := lineage_potter 35 | PRODUCT_BRAND := motorola 36 | PRODUCT_MANUFACTURER := motorola 37 | 38 | PRODUCT_SYSTEM_PROPERTY_BLACKLIST := ro.product.model 39 | 40 | PRODUCT_BUILD_PROP_OVERRIDES += \ 41 | PRODUCT_NAME="Moto G5 Plus" 42 | 43 | # for specific 44 | $(call inherit-product, vendor/motorola/potter/potter-vendor.mk) 45 | -------------------------------------------------------------------------------- /keylayout/ft5x06_ts.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | key 158 BACK 29 | key 139 APP_SWITCH 30 | key 172 HOME 31 | key 217 SEARCH 32 | -------------------------------------------------------------------------------- /keylayout/synaptics_dsx.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | key 158 BACK 29 | key 139 APP_SWITCH 30 | key 172 HOME 31 | key 217 SEARCH 32 | -------------------------------------------------------------------------------- /keylayout/synaptics_dsxv26.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014,2016, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | key 158 BACK 29 | key 139 APP_SWITCH 30 | key 172 HOME 31 | key 217 SEARCH 32 | -------------------------------------------------------------------------------- /keylayout/synaptics_rmi4_i2c.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | key 158 BACK 29 | key 139 APP_SWITCH 30 | key 172 HOME 31 | key 217 SEARCH 32 | -------------------------------------------------------------------------------- /gps/core/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libloc_core 9 | LOCAL_VENDOR_MODULE := true 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | ifeq ($(TARGET_DEVICE),apq8026_lw) 13 | LOCAL_CFLAGS += -DPDK_FEATURE_SET 14 | else ifeq ($(BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET),true) 15 | LOCAL_CFLAGS += -DPDK_FEATURE_SET 16 | endif 17 | 18 | LOCAL_SHARED_LIBRARIES := \ 19 | liblog \ 20 | libutils \ 21 | libcutils \ 22 | libgps.utils \ 23 | libdl \ 24 | liblog 25 | 26 | LOCAL_SRC_FILES += \ 27 | LocApiBase.cpp \ 28 | LocAdapterBase.cpp \ 29 | ContextBase.cpp \ 30 | LocDualContext.cpp \ 31 | loc_core_log.cpp \ 32 | data-items/DataItemsFactoryProxy.cpp \ 33 | SystemStatusOsObserver.cpp \ 34 | SystemStatus.cpp 35 | 36 | LOCAL_CFLAGS += \ 37 | -fno-short-enums \ 38 | -Wno-reinterpret-base-class \ 39 | -D_ANDROID_ 40 | 41 | LOCAL_C_INCLUDES:= \ 42 | $(LOCAL_PATH)/data-items \ 43 | $(LOCAL_PATH)/data-items/common \ 44 | $(LOCAL_PATH)/observer \ 45 | 46 | LOCAL_HEADER_LIBRARIES := \ 47 | libutils_headers \ 48 | libgps.utils_headers \ 49 | libloc_pla_headers \ 50 | liblocation_api_headers 51 | 52 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 53 | 54 | include $(BUILD_SHARED_LIBRARY) 55 | 56 | include $(CLEAR_VARS) 57 | LOCAL_MODULE := libloc_core_headers 58 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ 59 | $(LOCAL_PATH) \ 60 | $(LOCAL_PATH)/data-items \ 61 | $(LOCAL_PATH)/data-items/common \ 62 | $(LOCAL_PATH)/observer 63 | include $(BUILD_HEADER_LIBRARY) 64 | 65 | endif # not BUILD_TINY_ANDROID 66 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 67 | -------------------------------------------------------------------------------- /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_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 37 | # Need the UAPI output directory to be populated with motosh.h/stml0xx.h 38 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 39 | 40 | LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libc 41 | LOCAL_CFLAGS += -Wall -Wextra 42 | LOCAL_CFLAGS += -Wno-gnu-designator -Wno-writable-strings 43 | LOCAL_CXXFLAGS += -Weffc++ -std=c++14 44 | 45 | LOCAL_PROPRIETARY_MODULE := true 46 | 47 | include $(BUILD_SHARED_LIBRARY) 48 | 49 | -------------------------------------------------------------------------------- /hardware-moto-sensors/stml0xx_hal/RotationVector.cpp: -------------------------------------------------------------------------------- 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 | /* 18 | * Copyright (C) 2016 Motorola Mobility LLC 19 | */ 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include "GyroIntegration.h" 26 | #include "Quaternion.h" 27 | #include "RotationVector.h" 28 | #include "SensorList.h" 29 | 30 | RotationVector RotationVector::self; 31 | 32 | RotationVector::RotationVector() 33 | { 34 | } 35 | 36 | RotationVector::~RotationVector() 37 | { 38 | } 39 | 40 | RotationVector *RotationVector::getInstance() 41 | { 42 | return &self; 43 | } 44 | 45 | bool RotationVector::processFusion(FusionData& fusionData, bool reset) 46 | { 47 | static struct GyroIntegrationState gis; 48 | 49 | if (reset) { 50 | gis.initialized = 0; 51 | } 52 | 53 | // Integrate forward the 6-axis 54 | GyroIntegration::integrate(&gis, fusionData.rotationVector, fusionData.geoMagRotation, fusionData); 55 | fusionData.rotationVector.accuracy = 0; 56 | fusionData.rotationVector.timestamp = fusionData.gyro.timestamp; 57 | 58 | return true; 59 | } 60 | -------------------------------------------------------------------------------- /keylayout/gpio-keys.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | key 115 VOLUME_UP 29 | key 114 VOLUME_DOWN 30 | key 102 HOME WAKE 31 | key 528 FOCUS 32 | key 766 CAMERA 33 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /sepolicy/charge_only.te: -------------------------------------------------------------------------------- 1 | type charge_only, domain; 2 | type charge_only_exec, exec_type, file_type; 3 | init_daemon_domain(charge_only) 4 | 5 | allow charge_only chargeonly_data_file:dir rw_dir_perms; 6 | allow charge_only chargeonly_data_file:file rw_file_perms; 7 | 8 | # Write to /dev/kmsg 9 | allow charge_only kmsg_device:chr_file rw_file_perms; 10 | 11 | # Read access to pseudo filesystems. 12 | r_dir_file(charge_only, sysfs_type) 13 | r_dir_file(charge_only, rootfs) 14 | r_dir_file(charge_only, cgroup) 15 | 16 | allow charge_only self:capability { net_admin sys_tty_config sys_boot }; 17 | allow charge_only self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl; 18 | 19 | wakelock_use(charge_only) 20 | 21 | # Write to /sys/power/state 22 | # TODO: Split into a separate type? 23 | allow charge_only sysfs:dir { read open }; 24 | allow charge_only sysfs:file { read open write }; 25 | 26 | allow charge_only sysfs_wake_lock:file rw_file_perms; 27 | allow charge_only system_data_file:dir { write add_name }; 28 | 29 | allow charge_only sysfs_batteryinfo:file r_file_perms; 30 | 31 | # Read /sys/fs/pstore/console-ramoops 32 | # Don't worry about overly broad permissions for now, as there's 33 | # only one file in /sys/fs/pstore 34 | allow charge_only pstorefs:dir r_dir_perms; 35 | allow charge_only pstorefs:file r_file_perms; 36 | 37 | allow charge_only graphics_device:dir r_dir_perms; 38 | allow charge_only graphics_device:chr_file rw_file_perms; 39 | allow charge_only input_device:dir r_dir_perms; 40 | allow charge_only input_device:chr_file r_file_perms; 41 | allow charge_only tty_device:chr_file rw_file_perms; 42 | allow charge_only proc_sysrq:file rw_file_perms; 43 | 44 | # charger needs to tell init to continue the boot 45 | # process when running in charger mode. 46 | set_prop(charge_only, system_prop) 47 | -------------------------------------------------------------------------------- /hardware-moto-sensors/rearProx/CapSensor.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_CAPSENSOR_SENSOR_H 18 | #define ANDROID_CAPSENSOR_SENSOR_H 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "SensorBase.h" 26 | #include "InputEventReader.h" 27 | #include "NativeSensorManager.h" 28 | 29 | /*****************************************************************************/ 30 | 31 | struct input_event; 32 | 33 | class CapSensor : public SensorBase { 34 | InputEventCircularReader mInputReader; 35 | sensors_event_t mPendingEvent; 36 | bool mHasPendingEvent; 37 | 38 | int setInitialState(); 39 | float indexToValue(size_t index) const; 40 | 41 | public: 42 | CapSensor(struct SensorContext *context); 43 | virtual ~CapSensor(); 44 | virtual int readEvents(sensors_event_t* data, int count); 45 | virtual bool hasPendingEvents() const; 46 | virtual int enable(int32_t handle, int enabled); 47 | virtual int setDelay(int32_t handle, int64_t ns); 48 | }; 49 | 50 | /*****************************************************************************/ 51 | 52 | #endif // ANDROID_CAPSENSOR_SENSOR_H 53 | 54 | -------------------------------------------------------------------------------- /hardware-moto-sensors/stml0xx_hal/SensorList.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 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 SENSORLIST_H 20 | #define SENSORLIST_H 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | #include 27 | #include "mot_sensorhub_stml0xx.h" 28 | 29 | #include "Sensors.h" 30 | 31 | #define ACCEL_MAX_DELAY_US 200000 32 | #define ACCEL_MIN_DELAY_US 10000 33 | 34 | #define GYRO_MAX_DELAY_US 200000 35 | #define GYRO_MIN_DELAY_US 5000 36 | 37 | #define MAG_MAX_DELAY_US 200000 38 | #define MAG_MIN_DELAY_US 20000 39 | 40 | #define FUSION_MAX_DELAY_US 10000 41 | 42 | extern std::vector sSensorList; 43 | #ifdef _ENABLE_MAGNETOMETER 44 | extern const struct sensor_t threeAxCalMagSensorType; 45 | extern const struct sensor_t threeAxunCalMagSensorType; 46 | extern const struct sensor_t orientationSensorType; 47 | extern const struct sensor_t geoRotationSensorType; 48 | extern const struct sensor_t rotationSensorType; 49 | #endif // _ENABLE_MAGNETOMETER 50 | #ifdef _ENABLE_CAPSENSE 51 | extern const struct sensor_t capSensorType; 52 | #endif // _ENABLE_CAPSENSE 53 | #endif // SENSORLIST_H 54 | 55 | -------------------------------------------------------------------------------- /sepolicy/hal_fingerprint_default.te: -------------------------------------------------------------------------------- 1 | allow hal_fingerprint_default sysfs_fpc:file rw_file_perms; 2 | allow hal_fingerprint_default sysfs_fpc:dir r_dir_perms; 3 | allow hal_fingerprint_default fpc_data_file:dir rw_dir_perms; 4 | allow hal_fingerprint_default tee_device:chr_file rw_file_perms; 5 | allow hal_fingerprint_default firmware_file:dir search; 6 | allow hal_fingerprint_default firmware_file:file r_file_perms; 7 | allow hal_fingerprint_default fpc_data_file:sock_file { create unlink rw_file_perms }; 8 | allow hal_fingerprint_default sysfs_graphics:dir r_dir_perms; 9 | allow hal_fingerprint_default sysfs_graphics:file r_file_perms; 10 | allow hal_fingerprint_default sysfs_leds:dir r_dir_perms; 11 | allow hal_fingerprint_default sysfs_leds:file r_file_perms; 12 | allow hal_fingerprint_default fingerprintd_data_file:sock_file { create unlink }; 13 | allow hal_fingerprint_default uhid_device:chr_file rw_file_perms; 14 | allow hal_fingerprint_default fpc_socket:sock_file unlink; 15 | 16 | allow hal_fingerprint_default fingerprintd_data_file:dir { add_name getattr remove_name search write }; 17 | allow hal_fingerprint_default fingerprintd_data_file:file create_file_perms; 18 | 19 | allow hal_fingerprint_default fpc_data_file:dir { add_name getattr remove_name search write }; 20 | allow hal_fingerprint_default fps_data_file:dir { add_name getattr remove_name search write }; 21 | 22 | allow hal_fingerprint_default fpc_data_file:file { append create setattr open unlink }; 23 | allow hal_fingerprint_default fps_data_file:file { append create setattr open unlink }; 24 | 25 | # Add com.fingerprints.extension::IFingerprint* service to hwservicemanager 26 | add_hwservice(hal_fingerprint_default, fpc_extension_service) 27 | 28 | # Allow hal_fingerprint_fpc to add and find fpc_extension_service 29 | allow hal_fingerprint_default fpc_extension_service:hwservice_manager { add find }; 30 | 31 | 32 | -------------------------------------------------------------------------------- /LineageActions/src/org/lineageos/settings/device/doze/ScreenReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The CyanogenMod Project 3 | * Copyright (c) 2017 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.device.doze; 19 | 20 | import java.util.List; 21 | 22 | import android.content.BroadcastReceiver; 23 | import android.content.Context; 24 | import android.content.Intent; 25 | import android.content.IntentFilter; 26 | 27 | import org.lineageos.settings.device.actions.Constants; 28 | 29 | public class ScreenReceiver extends BroadcastReceiver { 30 | private final ScreenStateNotifier mNotifier; 31 | 32 | public ScreenReceiver(Context context, ScreenStateNotifier notifier) { 33 | mNotifier = notifier; 34 | 35 | IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON); 36 | filter.addAction(Intent.ACTION_SCREEN_OFF); 37 | context.registerReceiver(this, filter); 38 | } 39 | 40 | @Override 41 | public void onReceive(Context context, Intent intent) { 42 | if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) { 43 | mNotifier.screenTurnedOff(); 44 | } else if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) { 45 | mNotifier.screenTurnedOn(); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /hardware-moto-sensors/rearProx/ProximitySensor.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_PROXIMITY_SENSOR_H 18 | #define ANDROID_PROXIMITY_SENSOR_H 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "SensorBase.h" 26 | #include "InputEventReader.h" 27 | #include "NativeSensorManager.h" 28 | 29 | /*****************************************************************************/ 30 | 31 | struct input_event; 32 | 33 | class ProximitySensor : public SensorBase { 34 | InputEventCircularReader mInputReader; 35 | sensors_event_t mPendingEvent; 36 | bool mHasPendingEvent; 37 | int sensor_index; 38 | 39 | int setInitialState(); 40 | float indexToValue(size_t index) const; 41 | 42 | public: 43 | ProximitySensor(struct SensorContext *context); 44 | virtual ~ProximitySensor(); 45 | virtual int readEvents(sensors_event_t* data, int count); 46 | virtual bool hasPendingEvents() const; 47 | virtual int enable(int32_t handle, int enabled); 48 | virtual int setDelay(int32_t handle, int64_t ns); 49 | }; 50 | 51 | /*****************************************************************************/ 52 | 53 | #endif // ANDROID_PROXIMITY_SENSOR_H 54 | -------------------------------------------------------------------------------- /sepolicy/servicemanager.te: -------------------------------------------------------------------------------- 1 | allow servicemanager init:dir search; 2 | allow servicemanager init:file { open read }; 3 | allow servicemanager init:process getattr; 4 | allow servicemanager qseeproxy:dir search; 5 | allow servicemanager qseeproxy:file { open read }; 6 | allow servicemanager rild:dir search; 7 | allow servicemanager rild:file { open read }; 8 | allow servicemanager rild:process getattr; 9 | 10 | allow servicemanager hal_fingerprint_default:dir search; 11 | allow servicemanager hal_fingerprint_default:file read; 12 | allow servicemanager qseeproxy:process getattr; 13 | 14 | 15 | allow servicemanager hal_camera_default:dir search; 16 | allow servicemanager hal_camera_default:file r_file_perms; 17 | allow servicemanager hal_camera_default:process getattr; 18 | 19 | allow servicemanager hal_fingerprint_default:file open; 20 | allow servicemanager hal_fingerprint_default:process getattr; 21 | 22 | allow servicemanager wcnss_service:dir search; 23 | allow servicemanager wcnss_service:file { open read }; 24 | 25 | allow servicemanager esepmdaemon:dir search; 26 | allow servicemanager esepmdaemon:file { open read }; 27 | allow servicemanager esepmdaemon:process getattr; 28 | 29 | allow servicemanager vendor_per_mgr:dir search; 30 | allow servicemanager vendor_per_mgr:file { open read }; 31 | allow servicemanager vendor_per_mgr:process getattr; 32 | allow servicemanager wcnss_service:process getattr; 33 | 34 | allow servicemanager hal_gnss_qti:dir search; 35 | allow servicemanager hal_gnss_qti:file { open read }; 36 | allow servicemanager hal_gnss_qti:process getattr; 37 | 38 | allow servicemanager hal_sensors_default:dir search; 39 | allow servicemanager hal_sensors_default:file { open read }; 40 | allow servicemanager hal_sensors_default:process getattr; 41 | 42 | allow servicemanager sensors:dir search; 43 | allow servicemanager sensors:file { open read }; 44 | allow servicemanager sensors:process getattr; 45 | 46 | -------------------------------------------------------------------------------- /sepolicy/mm-qcamerad.te: -------------------------------------------------------------------------------- 1 | #type_transition mm-qcamerad camera_data_file:sock_file camera_socket "cam_socket1"; 2 | #type_transition mm-qcamerad camera_data_file:sock_file camera_socket "cam_socket2"; 3 | #allow mm-qcamerad camera_socket:sock_file { create unlink write }; 4 | 5 | binder_call(mm-qcamerad, servicemanager); 6 | binder_use(mm-qcamerad); 7 | binder_call(mm-qcamerad, binderservicedomain); 8 | binder_call(mm-qcamerad, appdomain); 9 | binder_call(mm-qcamerad, hal_sensors_default); 10 | set_prop(mm-qcamerad, camera_prop); 11 | 12 | allow servicemanager mm-qcamerad:dir { search }; 13 | allow servicemanager mm-qcamerad:file { read open }; 14 | allow servicemanager mm-qcamerad:process { getattr }; 15 | 16 | allow mm-qcamerad camera_data_file:sock_file { create unlink write }; 17 | allow mm-qcamerad system_server:unix_stream_socket rw_socket_perms; 18 | allow mm-qcamerad sensorservice_service:service_manager find; 19 | allow mm-qcamerad vendor_camera_data_file:file rw_file_perms; 20 | allow mm-qcamerad permission_service:service_manager find; 21 | allow mm-qcamerad debug_prop:property_service set; 22 | allow mm-qcamerad laser_device:chr_file { read write ioctl open }; 23 | allow mm-qcamerad persist_file:dir search; 24 | allow mm-qcamerad persist_file:file { read getattr open }; 25 | allow mm-qcamerad system_data_file:dir read; 26 | 27 | allow mm-qcamerad init:unix_stream_socket { read write }; 28 | allow mm-qcamerad sysfs_graphics:file r_file_perms; 29 | 30 | allow mm-qcamerad hal_sensors_default:unix_stream_socket { read write }; 31 | 32 | allow mm-qcamerad hal_configstore_ISurfaceFlingerConfigs:hwservice_manager find; 33 | allow mm-qcamerad hal_configstore_default:binder call; 34 | 35 | #allow camera to access Isensormanager 36 | allow mm-qcamerad fwk_sensor_hwservice:hwservice_manager find; 37 | binder_call(mm-qcamerad, system_server) 38 | 39 | allow mm-qcamerad camera_data_file:dir search; 40 | allow mm-qcamerad sysfs:file { open read }; 41 | -------------------------------------------------------------------------------- /gps/android/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_HARDWARE_GNSS_V1_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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /include/sound_trigger_prop_intf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Extrapolated / reversed header for Sound Trigger 3 | */ 4 | 5 | #ifndef SOUND_TRIGGER_PROP_INTF_H 6 | #define SOUND_TRIGGER_PROP_INTF_H 7 | 8 | struct sound_trigger_session_info { 9 | int capture_handle; 10 | void* p_ses; 11 | struct pcm_config config; 12 | }; 13 | 14 | enum audio_event_type { 15 | AUDIO_EVENT_CAPTURE_DEVICE_INACTIVE, 16 | AUDIO_EVENT_CAPTURE_DEVICE_ACTIVE, 17 | AUDIO_EVENT_PLAYBACK_STREAM_INACTIVE, 18 | AUDIO_EVENT_PLAYBACK_STREAM_ACTIVE, 19 | AUDIO_EVENT_STOP_LAB, 20 | AUDIO_EVENT_SSR, 21 | AUDIO_EVENT_NUM_ST_SESSIONS, 22 | AUDIO_EVENT_READ_SAMPLES, 23 | AUDIO_EVENT_DEVICE_CONNECT, 24 | AUDIO_EVENT_DEVICE_DISCONNECT, 25 | AUDIO_EVENT_SVA_EXEC_MODE, 26 | AUDIO_EVENT_SVA_EXEC_MODE_STATUS, 27 | }; 28 | 29 | enum sound_trigger_event_type { 30 | ST_EVENT_SESSION_REGISTER, 31 | ST_EVENT_SESSION_DEREGISTER 32 | }; 33 | typedef enum sound_trigger_event_type sound_trigger_event_type_t; 34 | 35 | enum ssr_event_status { 36 | SND_CARD_STATUS_OFFLINE, 37 | SND_CARD_STATUS_ONLINE, 38 | CPE_STATUS_OFFLINE, 39 | CPE_STATUS_ONLINE 40 | }; 41 | 42 | struct sound_trigger_event_info { 43 | struct sound_trigger_session_info st_ses; 44 | }; 45 | typedef struct sound_trigger_event_info sound_trigger_event_info_t; 46 | 47 | struct audio_read_samples_info { 48 | struct sound_trigger_session_info *ses_info; 49 | void *buf; 50 | size_t num_bytes; 51 | }; 52 | 53 | struct audio_event_info { 54 | union { 55 | enum ssr_event_status status; 56 | int value; 57 | void *str_value; 58 | struct sound_trigger_session_info ses_info; 59 | struct audio_read_samples_info aud_info; 60 | }u; 61 | }; 62 | typedef struct audio_event_info audio_event_info_t; 63 | 64 | typedef int (*sound_trigger_hw_call_back_t)(enum audio_event_type, 65 | struct audio_event_info*); 66 | #endif 67 | -------------------------------------------------------------------------------- /setup-makefiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017 The LineageOS Project 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | set -e 20 | 21 | # Required! 22 | DEVICE=potter 23 | VENDOR=motorola 24 | 25 | INITIAL_COPYRIGHT_YEAR=2017 26 | 27 | # Load extract_utils and do some sanity checks 28 | MY_DIR="${BASH_SOURCE%/*}" 29 | if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi 30 | 31 | LINEAGE_ROOT="$MY_DIR"/../../.. 32 | 33 | HELPER="$LINEAGE_ROOT"/vendor/lineage/build/tools/extract_utils.sh 34 | if [ ! -f "$HELPER" ]; then 35 | echo "Unable to find helper script at $HELPER" 36 | exit 1 37 | fi 38 | . "$HELPER" 39 | 40 | # Initialize the helper for device 41 | setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" true 42 | 43 | # Copyright headers and guards 44 | write_headers "potter" 45 | 46 | # The standard blobs 47 | write_makefiles "$MY_DIR"/proprietary-files.txt 48 | 49 | # We are done! 50 | write_footers 51 | 52 | if [ -s "$MY_DIR"/../$DEVICE/proprietary-files.txt ]; then 53 | # Reinitialize the helper for device 54 | INITIAL_COPYRIGHT_YEAR="$DEVICE_BRINGUP_YEAR" 55 | setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" false 56 | 57 | # Copyright headers and guards 58 | write_headers 59 | 60 | # The standard device blobs 61 | write_makefiles "$MY_DIR"/../$DEVICE/proprietary-files.txt 62 | 63 | # We are done! 64 | write_footers 65 | fi -------------------------------------------------------------------------------- /hardware-moto-sensors/stml0xx_hal/CapSense.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-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_CAPSENSE_H 18 | #define ANDROID_CAPSENSE_H 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "Sensors.h" 26 | #include "SensorBase.h" 27 | #include "InputEventReader.h" 28 | 29 | /*****************************************************************************/ 30 | 31 | struct input_event; 32 | 33 | class CapSense : public SensorBase { 34 | public: 35 | CapSense(); 36 | virtual ~CapSense(); 37 | 38 | virtual int setEnable(int32_t handle, int enabled) override; 39 | virtual int setDelay(int32_t handle, int64_t ns) override; 40 | virtual int readEvents(sensors_event_t* data, int count) override; 41 | virtual int flush(int32_t handle) override; 42 | 43 | virtual int getEnable(int32_t handle); 44 | void processEvent(int code, int value); 45 | static CapSense* getInstance(); 46 | private: 47 | uint32_t mEnabled; 48 | uint32_t mPendingMask; 49 | InputEventCircularReader mInputReader; 50 | sensors_event_t mPendingEvents; 51 | sensors_event_t mFlushEvents; 52 | uint64_t mDelays; 53 | uint32_t mFlushEnabled; 54 | static CapSense self; 55 | }; 56 | 57 | /*****************************************************************************/ 58 | 59 | #endif // ANDROID_CAPSENSE_H 60 | -------------------------------------------------------------------------------- /hardware-moto-sensors/vl53l0_hal/Android.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2017 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.tof.vl53l0 21 | LOCAL_MODULE_TAGS := optional 22 | LOCAL_CFLAGS += -Wno-gnu-designator -Wno-writable-strings 23 | 24 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) 25 | LOCAL_CFLAGS += -DDEBUG 26 | endif 27 | 28 | LOCAL_CFLAGS += -DLOG_TAG=\"ToFSensors\" 29 | 30 | LOCAL_SRC_FILES := \ 31 | TofModule.cpp \ 32 | RearProxSensor.cpp \ 33 | SensorsPollContext.cpp \ 34 | SensorBase.cpp \ 35 | ../InputEventReader.cpp 36 | 37 | LOCAL_C_INCLUDES += \ 38 | $(LOCAL_PATH)/.. \ 39 | system/core/base/include \ 40 | $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 41 | 42 | LOCAL_C_INCLUDES += external/zlib 43 | 44 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 45 | 46 | # Needs to be added after KERNEL_OBJ/usr/include 47 | LOCAL_C_INCLUDES += kernel/include 48 | 49 | LOCAL_SHARED_LIBRARIES += liblog libcutils libutils libc libbase 50 | LOCAL_CFLAGS += -Wall -Wextra 51 | LOCAL_CFLAGS += -Wno-gnu-designator -Wno-writable-strings 52 | LOCAL_CXXFLAGS += -Weffc++ -std=c++14 53 | 54 | #LOCAL_PRELINK_MODULE := false 55 | 56 | LOCAL_PROPRIETARY_MODULE := true 57 | 58 | include $(BUILD_SHARED_LIBRARY) 59 | 60 | -------------------------------------------------------------------------------- /overlay-lineage/frameworks/base/core/res/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 34 | 35 | 36 | 37 | true 38 | 39 | 40 | 41 | 42 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /gps/utils/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = -Wundef \ 4 | -MD \ 5 | -Wno-trigraphs \ 6 | -g -O0 \ 7 | -fno-inline \ 8 | -fno-short-enums \ 9 | -fpic \ 10 | -I./ \ 11 | -std=c++11 \ 12 | $(LOCPLA_CFLAGS) 13 | 14 | libgps_utils_la_h_sources = \ 15 | msg_q.h \ 16 | linked_list.h \ 17 | loc_cfg.h \ 18 | loc_log.h \ 19 | loc_target.h \ 20 | loc_timer.h \ 21 | MsgTask.h \ 22 | LocHeap.h \ 23 | LocThread.h \ 24 | LocTimer.h \ 25 | LocIpc.h \ 26 | loc_misc_utils.h \ 27 | loc_nmea.h \ 28 | gps_extended_c.h \ 29 | gps_extended.h \ 30 | loc_gps.h \ 31 | log_util.h 32 | 33 | libgps_utils_la_c_sources = \ 34 | linked_list.c \ 35 | msg_q.c \ 36 | loc_cfg.cpp \ 37 | loc_log.cpp \ 38 | loc_target.cpp \ 39 | LocHeap.cpp \ 40 | LocTimer.cpp \ 41 | LocThread.cpp \ 42 | LocIpc.cpp \ 43 | MsgTask.cpp \ 44 | loc_misc_utils.cpp \ 45 | loc_nmea.cpp 46 | 47 | library_includedir = $(pkgincludedir) 48 | 49 | library_include_HEADERS = $(libgps_utils_la_h_sources) 50 | 51 | libgps_utils_la_SOURCES = $(libgps_utils_la_c_sources) 52 | 53 | if USE_GLIB 54 | libgps_utils_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 55 | libgps_utils_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 56 | libgps_utils_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 57 | else 58 | libgps_utils_la_CFLAGS = $(AM_CFLAGS) 59 | libgps_utils_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 60 | libgps_utils_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 61 | endif 62 | 63 | libgps_utils_la_LIBADD = $(CUTILS_LIBS) 64 | 65 | #Create and Install libraries 66 | lib_LTLIBRARIES = libgps_utils.la 67 | 68 | pkgconfigdir = $(libdir)/pkgconfig 69 | pkgconfig_DATA = gps-utils.pc 70 | EXTRA_DIST = $(pkgconfig_DATA) 71 | -------------------------------------------------------------------------------- /hardware-moto-sensors/stml0xx_hal/GyroIntegration.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 | /* 18 | * Copyright (C) 2016 Motorola Mobility LLC 19 | */ 20 | 21 | #ifndef GYRO_INTEGRATION_H 22 | #define GYRO_INTEGRATION_H 23 | 24 | #include 25 | 26 | #include "FusionSensorBase.h" 27 | 28 | /* 29 | * \brief State to be passed into \c gyroIntegration() 30 | * 31 | * \see \c gyroIntegration() 32 | */ 33 | struct GyroIntegrationState 34 | { 35 | int initialized; 36 | QuatData quatGyro; 37 | }; 38 | 39 | class GyroIntegration { 40 | public: 41 | /* 42 | * \brief Use gyro to integrate a rotation vector forward 43 | * 44 | * Memoryless (stateless, amnesiatic...) function to integrate rvIn with 45 | * gyro to produce rvOut. 46 | * 47 | * \see \c GyroIntegrationState 48 | * 49 | * \param[inout] gis state of the function 50 | * \param[out] rvOut output integrated rotation vector 51 | * \param[in] rvIn input rotation vector to integrate 52 | * \param[in] rvGyroDelta if not null, stores the incremental gyro rotation 53 | * \param[in] timeStamp gyro data timestamp 54 | * vector 55 | */ 56 | 57 | static void integrate( 58 | struct GyroIntegrationState* gis, 59 | QuatData& rvOut, 60 | const QuatData& rvIn, 61 | FusionData& fusionData 62 | ); 63 | }; 64 | 65 | #endif // GYRO_INTEGRATION_H 66 | -------------------------------------------------------------------------------- /hardware-moto-sensors/tof_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.tof 21 | LOCAL_MODULE_TAGS := optional 22 | 23 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) 24 | LOCAL_CFLAGS += -DDEBUG 25 | endif 26 | 27 | LOCAL_CFLAGS += -DLOG_TAG=\"ToFSensors\" 28 | LOCAL_CFLAGS += -Wno-gnu-designator -Wno-writable-strings 29 | 30 | LOCAL_SRC_FILES := \ 31 | TofModule.cpp \ 32 | RearProxSensor.cpp \ 33 | SensorsPollContext.cpp \ 34 | ../motosh_hal/SensorBase.cpp \ 35 | ../InputEventReader.cpp 36 | 37 | LOCAL_C_INCLUDES += \ 38 | $(LOCAL_PATH)/.. \ 39 | $(LOCAL_PATH)/../motosh_hal \ 40 | system/core/base/include \ 41 | $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include 42 | 43 | LOCAL_C_INCLUDES += external/zlib 44 | 45 | LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr 46 | 47 | # Needs to be added after KERNEL_OBJ/usr/include 48 | LOCAL_C_INCLUDES += kernel/include 49 | 50 | LOCAL_SHARED_LIBRARIES += liblog libcutils libutils libc libbase 51 | LOCAL_CFLAGS += -Wall -Wextra 52 | LOCAL_CFLAGS += -Wno-gnu-designator -Wno-writable-strings 53 | LOCAL_CXXFLAGS += -Weffc++ -std=c++14 54 | 55 | #LOCAL_PRELINK_MODULE := false 56 | 57 | LOCAL_PROPRIETARY_MODULE := true 58 | 59 | include $(BUILD_SHARED_LIBRARY) 60 | 61 | -------------------------------------------------------------------------------- /hardware-moto-sensors/stml0xx_hal/RearProxSensor.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_LASERPROX_SENSOR_H 18 | #define ANDROID_LASERPROX_SENSOR_H 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include "Sensors.h" 26 | #include "SensorBase.h" 27 | #include "InputEventReader.h" 28 | 29 | /*****************************************************************************/ 30 | 31 | struct input_event; 32 | 33 | class RearProxSensor : public SensorBase { 34 | public: 35 | RearProxSensor(int n); 36 | virtual ~RearProxSensor(); 37 | 38 | virtual int setEnable(int32_t handle, int enabled) override; 39 | virtual int setDelay(int32_t handle, int64_t ns) override; 40 | virtual int readEvents(sensors_event_t* data, int count) override; 41 | virtual int flush(int32_t handle) override; 42 | 43 | virtual int getEnable(int32_t handle); 44 | void processEvent(int code, int value); 45 | private: 46 | uint32_t mEnabled; 47 | uint32_t mPendingMask; 48 | #ifdef _ENABLE_REARPROX_2 49 | uint32_t numrp; 50 | #endif 51 | InputEventCircularReader mInputReader; 52 | sensors_event_t mPendingEvents; 53 | sensors_event_t mFlushEvents; 54 | uint64_t mDelays; 55 | uint32_t mFlushEnabled; 56 | static RearProxSensor self; 57 | }; 58 | 59 | /*****************************************************************************/ 60 | 61 | #endif // ANDROID_LASERPROX_SENSOR_H 62 | --------------------------------------------------------------------------------