├── sepolicy ├── property.te ├── bootanim.te ├── adsprpcd.te ├── service.te ├── platform_app.te ├── thermal-engine.te ├── hal_wifi_default.te ├── device.te ├── hal_bluetooth_qti.te ├── hal_vr.te ├── uncrypt.te ├── domain.te ├── service_contexts ├── vold.te ├── system_server.te ├── hwservice.te ├── radio.te ├── hal_perf_default.te ├── seapp_contexts ├── hal_camera_default.te ├── hal_power_default.te ├── file.te ├── hal_lineage_touch_default.te ├── rild.te ├── tee.te ├── hal_nfc_default.te ├── dataservice_app.te ├── mm-qcamerad.te ├── public │ └── attributes ├── system_app.te ├── hwservice_contexts ├── vendor_init.te ├── property_contexts ├── remosaic_daemon.te ├── hal_param.te ├── dashd.te ├── hal_fingerprint_default.te ├── hal_ifaa.te ├── genfs_contexts └── file_contexts ├── .clang-format ├── board-info.txt ├── doze ├── proguard.flags ├── Android.mk ├── res │ ├── drawable │ │ ├── ic_pickup.xml │ │ ├── switchbar_background.xml │ │ ├── ic_hand.xml │ │ └── ic_pocket.xml │ ├── values-night │ │ └── colors.xml │ ├── values │ │ └── colors.xml │ ├── color │ │ └── switch_bar_bg.xml │ ├── layout │ │ ├── doze.xml │ │ └── switch_bar.xml │ └── xml │ │ └── doze_settings.xml ├── src │ └── org │ │ └── lineageos │ │ └── settings │ │ └── doze │ │ ├── DozeSettingsActivity.java │ │ └── BootCompletedReceiver.java └── AndroidManifest.xml ├── Android.bp ├── wifi ├── p2p_supplicant_overlay.conf └── wpa_supplicant_overlay.conf ├── DeviceSettings ├── 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 │ ├── mipmap-anydpi │ │ └── ic_launcher.xml │ ├── drawable │ │ └── ic_settings_device.xml │ ├── values │ │ └── arrays.xml │ └── xml │ │ └── main.xml ├── proguard.flags ├── Android.mk └── src │ └── com │ └── aosip │ └── device │ └── DeviceSettings │ ├── Startup.java │ ├── SystemSettingSwitchPreference.java │ ├── DeviceSettingsActivity.java │ └── SystemSettingsStore.java ├── gps ├── android │ ├── android.hardware.gnss@1.1-service-qti.rc │ ├── service.cpp │ ├── GnssDebug.h │ ├── Android.mk │ ├── GnssConfiguration.h │ ├── GnssNi.h │ └── AGnss.h ├── Android.mk ├── Makefile.am ├── core │ ├── loc-core.pc.in │ ├── Android.mk │ ├── Makefile.am │ ├── data-items │ │ └── DataItemsFactoryProxy.h │ └── configure.ac ├── gnsspps │ ├── gnsspps.pc.in │ ├── Android.mk │ ├── Makefile.am │ ├── gnsspps.h │ └── configure.ac ├── utils │ ├── gps-utils.pc.in │ ├── Android.mk │ ├── Makefile.am │ └── configure.ac ├── location │ ├── location-api.pc.in │ ├── Android.mk │ └── Makefile.am ├── loc-hal.pc.in ├── build │ └── target_specific_features.mk ├── etc │ └── lowi.conf ├── pla │ ├── Android.mk │ └── android │ │ └── loc_pla.h ├── gnss │ ├── Makefile.am │ └── Android.mk └── CleanSpec.mk ├── seccomp ├── mediaextractor-seccomp.policy └── mediacodec-seccomp.policy ├── configs ├── public.libraries.txt ├── thermal-engine-vr.conf ├── thermal-engine.conf ├── framework_manifest.xml └── component-overrides.xml ├── rro_overlays └── TetheringOverlay │ ├── Android.bp │ └── AndroidManifest.xml ├── org.ifaa.android.manager ├── src │ ├── org │ │ └── ifaa │ │ │ └── android │ │ │ └── manager │ │ │ ├── IFAAManagerV2.java │ │ │ ├── IFAAManagerV3.java │ │ │ └── IFAAManager.java │ └── com │ │ └── android │ │ └── internal │ │ └── app │ │ └── IIFAAService.aidl └── Android.bp ├── libshims ├── GraphicBuffer.cpp ├── Android.bp └── jstring.h ├── recovery └── Android.mk ├── aosp.dependencies ├── lineagehw └── touch │ ├── vendor.lineage.touch@1.0-service.oneplus3.xml │ ├── Android.bp │ ├── KeyDisabler.h │ ├── KeySwapper.h │ ├── TouchscreenGesture.h │ ├── vendor.lineage.touch@1.0-service.oneplus3.rc │ ├── KeySwapper.cpp │ ├── KeyDisabler.cpp │ └── service.cpp ├── AndroidProducts.mk ├── libhidl └── Android.bp ├── setup-makefiles.sh ├── init └── Android.bp ├── overlay-pe ├── packages │ └── apps │ │ ├── Settings │ │ └── res │ │ │ └── values │ │ │ ├── dimens.xml │ │ │ ├── config.xml │ │ │ └── arrays.xml │ │ └── Snap │ │ └── res │ │ └── values │ │ ├── cm_strings.xml │ │ ├── qcomstrings.xml │ │ └── config.xml └── frameworks │ └── base │ ├── packages │ └── SystemUI │ │ └── res │ │ └── values │ │ └── config.xml │ └── core │ └── res │ └── res │ └── values │ └── custom_config.xml ├── vr ├── Android.bp └── vr.c ├── thermal └── Android.bp ├── overlay ├── frameworks │ └── base │ │ ├── packages │ │ ├── SettingsProvider │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── defaults.xml │ │ └── SystemUI │ │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ │ └── core │ │ └── res │ │ └── res │ │ ├── values-mcc310-mnc004 │ │ └── config.xml │ │ ├── values-mcc310-mnc260 │ │ └── config.xml │ │ ├── values-mcc310-mnc410 │ │ └── config.xml │ │ ├── values-mcc310-mnc120 │ │ └── config.xml │ │ ├── values-mcc460-mnc03 │ │ └── config.xml │ │ ├── values-mcc460-mnc11 │ │ └── config.xml │ │ ├── values-mcc312-mnc530 │ │ └── config.xml │ │ └── values-mcc311-mnc480 │ │ └── config.xml └── packages │ ├── apps │ ├── Settings │ │ └── res │ │ │ └── values │ │ │ └── arrays.xml │ ├── CellBroadcastReceiver │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ └── Mms │ │ └── res │ │ └── values │ │ └── config.xml │ └── services │ ├── Telecomm │ └── res │ │ └── values │ │ └── config.xml │ └── Telephony │ └── res │ └── values │ └── config.xml ├── liblight ├── Android.bp └── android.hardware.light@2.0-service.oneplus3.rc ├── display ├── FOSSConfig.xml └── Android.bp ├── aosp_oneplus3.mk ├── releasetools.py ├── keylayout ├── fpc1020.kl └── synaptics.kl ├── rootdir └── etc │ ├── init.recovery.qcom.rc │ ├── fstab.qcom │ ├── init.qcom.sensors.sh │ └── init.qti.ims.sh ├── bluetooth └── bdroid_buildcfg.h ├── README.md ├── extract-files.sh └── update-sha1sums.py /sepolicy/property.te: -------------------------------------------------------------------------------- 1 | type thermal_prop, property_type; 2 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | ../../../build/soong/scripts/system-clang-format -------------------------------------------------------------------------------- /sepolicy/bootanim.te: -------------------------------------------------------------------------------- 1 | allow bootanim sysfs_kgsl:dir search; 2 | -------------------------------------------------------------------------------- /sepolicy/adsprpcd.te: -------------------------------------------------------------------------------- 1 | allow adsprpcd vendor_file:dir r_dir_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/service.te: -------------------------------------------------------------------------------- 1 | type remosaic_service, service_manager_type; 2 | -------------------------------------------------------------------------------- /sepolicy/platform_app.te: -------------------------------------------------------------------------------- 1 | hal_client_domain(platform_app, hal_ifaa) 2 | -------------------------------------------------------------------------------- /board-info.txt: -------------------------------------------------------------------------------- 1 | require version-modem=2019-11-04 21:20:14|OxygenOS 9.0.6 2 | -------------------------------------------------------------------------------- /sepolicy/thermal-engine.te: -------------------------------------------------------------------------------- 1 | allow thermal-engine sysfs:dir r_dir_perms; 2 | -------------------------------------------------------------------------------- /doze/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class org.lineageos.settings.doze.* { 2 | *; 3 | } 4 | -------------------------------------------------------------------------------- /sepolicy/hal_wifi_default.te: -------------------------------------------------------------------------------- 1 | allow hal_wifi_default proc_net:file w_file_perms; 2 | -------------------------------------------------------------------------------- /Android.bp: -------------------------------------------------------------------------------- 1 | soong_namespace { 2 | } 3 | 4 | subdirs = [ 5 | "liblight", 6 | ] 7 | -------------------------------------------------------------------------------- /sepolicy/device.te: -------------------------------------------------------------------------------- 1 | type fpc1020_device, dev_type; 2 | type dash_device, dev_type; 3 | -------------------------------------------------------------------------------- /sepolicy/hal_bluetooth_qti.te: -------------------------------------------------------------------------------- 1 | r_dir_file(hal_bluetooth_qti, vendor_radio_data_file) 2 | -------------------------------------------------------------------------------- /sepolicy/hal_vr.te: -------------------------------------------------------------------------------- 1 | # interact with thermal_config 2 | set_prop(hal_vr, thermal_prop) 3 | -------------------------------------------------------------------------------- /sepolicy/uncrypt.te: -------------------------------------------------------------------------------- 1 | # OTA with encrypted f2fs 2 | allow uncrypt self:capability fowner; 3 | -------------------------------------------------------------------------------- /sepolicy/domain.te: -------------------------------------------------------------------------------- 1 | # Silence /dev/stune logspam 2 | dontaudit domain device:file w_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/service_contexts: -------------------------------------------------------------------------------- 1 | android.samsung.IRemosaicDaemon u:object_r:remosaic_service:s0 2 | -------------------------------------------------------------------------------- /sepolicy/vold.te: -------------------------------------------------------------------------------- 1 | # For setting read_ahead_kb 2 | allow vold sysfs_mmc_host:file w_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/system_server.te: -------------------------------------------------------------------------------- 1 | # OTA with encrypted f2fs 2 | allow system_server ota_package_file:dir getattr; 3 | -------------------------------------------------------------------------------- /sepolicy/hwservice.te: -------------------------------------------------------------------------------- 1 | type hal_ifaa_hwservice, hwservice_manager_type; 2 | type hal_param_hwservice, hwservice_manager_type; 3 | -------------------------------------------------------------------------------- /sepolicy/radio.te: -------------------------------------------------------------------------------- 1 | allow radio hal_datafactory_hwservice:hwservice_manager find; 2 | 3 | get_prop(radio, vendor_qcom_ims_prop) 4 | -------------------------------------------------------------------------------- /wifi/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_search_delay=100 3 | p2p_no_group_iface=1 4 | persistent_reconnect=1 5 | -------------------------------------------------------------------------------- /sepolicy/hal_perf_default.te: -------------------------------------------------------------------------------- 1 | dontaudit hal_perf_default self:capability dac_override; 2 | set_prop(hal_perf_default, vendor_mpctl_prop) 3 | -------------------------------------------------------------------------------- /sepolicy/seapp_contexts: -------------------------------------------------------------------------------- 1 | # uceShimService 2 | user=system seinfo=platform name=.dataservices domain=vendor_dataservice_app type=radio_data_file 3 | -------------------------------------------------------------------------------- /sepolicy/hal_camera_default.te: -------------------------------------------------------------------------------- 1 | allow hal_camera_default camera_data_file:dir search; 2 | allow hal_camera_default camera_data_file:sock_file write; 3 | -------------------------------------------------------------------------------- /sepolicy/hal_power_default.te: -------------------------------------------------------------------------------- 1 | allow hal_power_default proc_touchpanel:file rw_file_perms; 2 | allow hal_power_default proc_touchpanel:dir search; 3 | -------------------------------------------------------------------------------- /sepolicy/file.te: -------------------------------------------------------------------------------- 1 | type debugfs_rmt_storage, debugfs_type, fs_type; 2 | type proc_touchpanel, fs_type, proc_type; 3 | type sysfs_fpc, sysfs_type, fs_type; 4 | -------------------------------------------------------------------------------- /sepolicy/hal_lineage_touch_default.te: -------------------------------------------------------------------------------- 1 | allow hal_lineage_touch_default proc_touchpanel:dir search; 2 | allow hal_lineage_touch_default proc_touchpanel:file rw_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/rild.te: -------------------------------------------------------------------------------- 1 | # qcril.so needs access to /vendor/radio/qcril_database/qcril.db 2 | allow rild vendor_file:file ioctl; 3 | 4 | set_prop(rild, vendor_default_prop) 5 | -------------------------------------------------------------------------------- /DeviceSettings/res/mipmap-hdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PixelExperience-Devices/device_oneplus_oneplus3/HEAD/DeviceSettings/res/mipmap-hdpi/ic_background.png -------------------------------------------------------------------------------- /DeviceSettings/res/mipmap-hdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PixelExperience-Devices/device_oneplus_oneplus3/HEAD/DeviceSettings/res/mipmap-hdpi/ic_foreground.png -------------------------------------------------------------------------------- /DeviceSettings/res/mipmap-mdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PixelExperience-Devices/device_oneplus_oneplus3/HEAD/DeviceSettings/res/mipmap-mdpi/ic_background.png -------------------------------------------------------------------------------- /DeviceSettings/res/mipmap-mdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PixelExperience-Devices/device_oneplus_oneplus3/HEAD/DeviceSettings/res/mipmap-mdpi/ic_foreground.png -------------------------------------------------------------------------------- /DeviceSettings/res/mipmap-xhdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PixelExperience-Devices/device_oneplus_oneplus3/HEAD/DeviceSettings/res/mipmap-xhdpi/ic_background.png -------------------------------------------------------------------------------- /DeviceSettings/res/mipmap-xhdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PixelExperience-Devices/device_oneplus_oneplus3/HEAD/DeviceSettings/res/mipmap-xhdpi/ic_foreground.png -------------------------------------------------------------------------------- /DeviceSettings/res/mipmap-xxhdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PixelExperience-Devices/device_oneplus_oneplus3/HEAD/DeviceSettings/res/mipmap-xxhdpi/ic_background.png -------------------------------------------------------------------------------- /DeviceSettings/res/mipmap-xxhdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PixelExperience-Devices/device_oneplus_oneplus3/HEAD/DeviceSettings/res/mipmap-xxhdpi/ic_foreground.png -------------------------------------------------------------------------------- /sepolicy/tee.te: -------------------------------------------------------------------------------- 1 | allow tee system_data_file:dir r_dir_perms; 2 | allow tee fingerprintd_data_file:dir rw_dir_perms; 3 | allow tee fingerprintd_data_file:file create_file_perms; 4 | -------------------------------------------------------------------------------- /DeviceSettings/res/mipmap-xxxhdpi/ic_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PixelExperience-Devices/device_oneplus_oneplus3/HEAD/DeviceSettings/res/mipmap-xxxhdpi/ic_background.png -------------------------------------------------------------------------------- /DeviceSettings/res/mipmap-xxxhdpi/ic_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PixelExperience-Devices/device_oneplus_oneplus3/HEAD/DeviceSettings/res/mipmap-xxxhdpi/ic_foreground.png -------------------------------------------------------------------------------- /sepolicy/hal_nfc_default.te: -------------------------------------------------------------------------------- 1 | # Data file accesses. 2 | allow hal_nfc_default nfc_vendor_data_file:dir create_dir_perms; 3 | allow hal_nfc_default nfc_vendor_data_file:file create_file_perms; 4 | -------------------------------------------------------------------------------- /gps/android/android.hardware.gnss@1.1-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@1.0-service-qti 2 | class hal 3 | user gps 4 | group system gps radio 5 | -------------------------------------------------------------------------------- /sepolicy/dataservice_app.te: -------------------------------------------------------------------------------- 1 | allow vendor_dataservice_app system_app_data_file:dir create_dir_perms; 2 | allow vendor_dataservice_app system_app_data_file:{ file lnk_file } create_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/mm-qcamerad.te: -------------------------------------------------------------------------------- 1 | allow mm-qcamerad camera_data_file:sock_file { create unlink }; 2 | allow mm-qcamerad camera_data_file:dir rw_dir_perms; 3 | set_prop(mm-qcamerad, vendor_default_prop) 4 | -------------------------------------------------------------------------------- /seccomp/mediaextractor-seccomp.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/public/attributes: -------------------------------------------------------------------------------- 1 | # HALs 2 | attribute hal_ifaa; 3 | attribute hal_ifaa_client; 4 | attribute hal_ifaa_server; 5 | 6 | attribute hal_param; 7 | attribute hal_param_client; 8 | attribute hal_param_server; 9 | -------------------------------------------------------------------------------- /configs/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libqti-perfd-client.so 2 | libadsprpc.so 3 | libcdsprpc.so 4 | libsdsprpc.so 5 | libfastcvopt.so 6 | #liblistenjni.so 7 | #liblistensoundmodel2.so 8 | libOpenCL.so 9 | #libnpu.so 10 | -------------------------------------------------------------------------------- /rro_overlays/TetheringOverlay/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "TetheringConfigOverlay", 3 | theme: "TetheringConfigOverlay", 4 | sdk_version: "current", 5 | product_specific: true 6 | } 7 | -------------------------------------------------------------------------------- /sepolicy/system_app.te: -------------------------------------------------------------------------------- 1 | allow system_app proc_touchpanel:dir search; 2 | allow system_app proc_touchpanel:file rw_file_perms; 3 | 4 | allow system_app sysfs_fpc:dir search; 5 | allow system_app sysfs_fpc:file rw_file_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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /DeviceSettings/proguard.flags: -------------------------------------------------------------------------------- 1 | # Keep keyhandler constructor 2 | -keep public class * implements com.android.internal.os.DeviceKeyHandler { 3 | public (android.content.Context); 4 | } 5 | 6 | -keep class com.aosip.device.DeviceSettings.* { 7 | *; 8 | } 9 | -------------------------------------------------------------------------------- /wifi/wpa_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_disabled=1 3 | tdls_external_control=1 4 | bss_max_count=512 5 | interworking=1 6 | hs20=1 7 | auto_interworking=0 8 | bss_no_flush_when_down=1 9 | driver_param=use_p2p_group_interface=1 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /gps/utils/gps-utils.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: gps-utils 7 | Description: QTI GPS Location utils 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgps_utils 10 | Cflags: -I${includedir}/gps-utils 11 | -------------------------------------------------------------------------------- /gps/location/location-api.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-api 7 | Description: Location API 8 | Version: @VERSION 9 | Libs: -L${libdir} -llocation_api 10 | Cflags: -I${includedir}/location-api 11 | -------------------------------------------------------------------------------- /gps/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/mediacodec-seccomp.policy: -------------------------------------------------------------------------------- 1 | # device specific syscalls 2 | # extension of services/mediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy 3 | pselect6: 1 4 | eventfd2: 1 5 | sendto: 1 6 | recvfrom: 1 7 | _llseek: 1 8 | sysinfo: 1 9 | getcwd: 1 10 | getdents64: 1 11 | inotify_init1: 1 12 | inotify_add_watch: 1 13 | -------------------------------------------------------------------------------- /sepolicy/hwservice_contexts: -------------------------------------------------------------------------------- 1 | vendor.oneplus.fingerprint.extension::IVendorFingerprintExtensions u:object_r:hal_fingerprint_hwservice:s0 2 | vendor.oneplus.hardware.ifaa::IOneplusIfaa u:object_r:hal_ifaa_hwservice:s0 3 | vendor.oneplus.hardware.param::IOneplusParam u:object_r:hal_param_hwservice:s0 4 | -------------------------------------------------------------------------------- /sepolicy/vendor_init.te: -------------------------------------------------------------------------------- 1 | allow vendor_init { 2 | camera_data_file 3 | fingerprintd_data_file 4 | system_data_file 5 | tombstone_data_file 6 | }:dir { create search getattr open read setattr ioctl write add_name remove_name rmdir relabelfrom }; 7 | 8 | allow vendor_init proc_touchpanel:file write; 9 | 10 | set_prop(vendor_init, thermal_prop) 11 | -------------------------------------------------------------------------------- /org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV2.java: -------------------------------------------------------------------------------- 1 | package org.ifaa.android.manager; 2 | 3 | import android.compat.annotation.UnsupportedAppUsage; 4 | import android.content.Context; 5 | 6 | public abstract class IFAAManagerV2 extends IFAAManager{ 7 | @UnsupportedAppUsage 8 | public abstract byte[] processCmdV2(Context paramContext, byte[] paramArrayOfByte); 9 | } 10 | -------------------------------------------------------------------------------- /sepolicy/property_contexts: -------------------------------------------------------------------------------- 1 | sys.qcom.thermalcfg u:object_r:thermal_prop:s0 2 | ctl.thermal-engine u:object_r:thermal_prop:s0 3 | vendor.min_freq_0 u:object_r:vendor_mpctl_prop:s0 4 | vendor.min_freq_4 u:object_r:vendor_mpctl_prop:s0 5 | wifi.active.interface u:object_r:wifi_prop:s0 6 | persist.vendor.wigig.npt.enable u:object_r:vendor_default_prop:s0 7 | -------------------------------------------------------------------------------- /libshims/GraphicBuffer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace android { 4 | extern "C" void _ZN7android13GraphicBuffer4lockEjPPvPiS3_(uint32_t inUsage, void** vaddr, int32_t* outBytesPerPixel, int32_t* outBytesPerStride); 5 | 6 | extern "C" void _ZN7android13GraphicBuffer4lockEjPPv(uint32_t inUsage, void** vaddr) { 7 | _ZN7android13GraphicBuffer4lockEjPPvPiS3_(inUsage, vaddr, nullptr, nullptr); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /recovery/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | ifneq ($(TARGET_PLATFORM_DEVICE_BASE),) 6 | LOCAL_CFLAGS += -DUSES_BOOTDEVICE_PATH 7 | endif 8 | 9 | LOCAL_C_INCLUDES := \ 10 | bootable/recovery \ 11 | bootable/recovery/edify/include \ 12 | bootable/recovery/otautil/include 13 | LOCAL_SRC_FILES := recovery_updater.cpp 14 | LOCAL_MODULE := librecovery_updater_op3 15 | include $(BUILD_STATIC_LIBRARY) 16 | -------------------------------------------------------------------------------- /sepolicy/remosaic_daemon.te: -------------------------------------------------------------------------------- 1 | type remosaic_daemon, domain; 2 | type remosaic_daemon_exec, exec_type, vendor_file_type, file_type; 3 | 4 | #Allow for transition from init domain to remosaic_daemon 5 | init_daemon_domain(remosaic_daemon) 6 | 7 | #Allow remosaic_daemon to use Binder IPC 8 | binder_use(remosaic_daemon) 9 | 10 | #Allow remosaic_daemon to be registered with service manager 11 | allow remosaic_daemon remosaic_service:service_manager add; 12 | -------------------------------------------------------------------------------- /configs/thermal-engine-vr.conf: -------------------------------------------------------------------------------- 1 | [SKIN_SHUTDOWN] 2 | algo_type monitor 3 | sampling 1000 4 | sensor emmc_therm 5 | thresholds 60000 6 | thresholds_clr 59000 7 | actions shutdown 8 | action_info 1 9 | 10 | [VR-EMMC] 11 | algo_type monitor 12 | sensor emmc_therm 13 | sampling 1000 14 | thresholds 58000 15 | thresholds_clr 52000 16 | actions cluster0+cluster1+gpu 17 | action_info 691200+691200+214000000 18 | -------------------------------------------------------------------------------- /sepolicy/hal_param.te: -------------------------------------------------------------------------------- 1 | type hal_param_default, domain; 2 | hal_server_domain(hal_param_default, hal_param) 3 | 4 | type hal_param_default_exec, exec_type, vendor_file_type, file_type; 5 | init_daemon_domain(hal_param_default) 6 | 7 | # Allow hwbinder call from hal client to server 8 | binder_call(hal_param_client, hal_param_server) 9 | 10 | # Add hwservice related rules 11 | add_hwservice(hal_param_server, hal_param_hwservice) 12 | allow hal_param_client hal_param_hwservice:hwservice_manager find; 13 | -------------------------------------------------------------------------------- /sepolicy/dashd.te: -------------------------------------------------------------------------------- 1 | # dash daemon 2 | 3 | type dashd, domain; 4 | type dashd_exec, exec_type, vendor_file_type, file_type; 5 | 6 | init_daemon_domain(dashd) 7 | 8 | # Write to /dev/kmsg 9 | allow dashd kmsg_device:chr_file rw_file_perms; 10 | 11 | r_dir_file(dashd, sysfs_battery_supply) 12 | r_dir_file(dashd, sysfs_usb_supply) 13 | 14 | allow dashd { 15 | sysfs_battery_supply 16 | sysfs_usb_supply 17 | }:file rw_file_perms; 18 | 19 | allow dashd dash_device:chr_file { open read write ioctl }; 20 | -------------------------------------------------------------------------------- /rro_overlays/TetheringOverlay/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /aosp.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository" : "kernel_oneplus_msm8996", 4 | "target_path" : "kernel/oneplus/msm8996", 5 | "branch" : "eleven" 6 | }, 7 | { 8 | "repository": "Gaurav241/packages_apps_GoogleCamera", 9 | "target_path": "packages/apps/GoogleCam", 10 | "branch": "eleven", 11 | "remote": "github" 12 | }, 13 | { 14 | "repository" : "vendor_oneplus_oneplus3", 15 | "target_path" : "vendor/oneplus/oneplus3", 16 | "branch" : "eleven", 17 | "remote" : "pixel-devices-blobs" 18 | } 19 | ] 20 | -------------------------------------------------------------------------------- /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/hal_fingerprint_default.te: -------------------------------------------------------------------------------- 1 | allow hal_fingerprint_default firmware_file:dir search; 2 | allow hal_fingerprint_default firmware_file:file r_file_perms; 3 | 4 | allow hal_fingerprint_default sysfs_fpc:dir r_dir_perms; 5 | allow hal_fingerprint_default sysfs_fpc:file rw_file_perms; 6 | 7 | # access to /data/system/users/[0-9]+/fpdata 8 | allow hal_fingerprint_default fingerprintd_data_file:file create_file_perms; 9 | allow hal_fingerprint_default fingerprintd_data_file:dir rw_dir_perms; 10 | allow hal_fingerprint_default fingerprintd_data_file:sock_file { create unlink }; 11 | 12 | allow hal_fingerprint_default tee_device:chr_file rw_file_perms; 13 | -------------------------------------------------------------------------------- /lineagehw/touch/vendor.lineage.touch@1.0-service.oneplus3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | vendor.lineage.touch 4 | hwbinder 5 | 1.0 6 | 7 | IKeyDisabler 8 | default 9 | 10 | 11 | ITouchscreenGesture 12 | default 13 | 14 | 15 | IKeySwapper 16 | default 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /AndroidProducts.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2018 The LineageOS Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | PRODUCT_MAKEFILES := \ 17 | $(LOCAL_DIR)/aosp_oneplus3.mk 18 | -------------------------------------------------------------------------------- /doze/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE_TAGS := optional 5 | 6 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 7 | 8 | LOCAL_PACKAGE_NAME := OneplusDoze 9 | LOCAL_CERTIFICATE := platform 10 | LOCAL_PRIVATE_PLATFORM_APIS := true 11 | LOCAL_PRIVILEGED_MODULE := true 12 | 13 | LOCAL_USE_AAPT2 := true 14 | 15 | LOCAL_STATIC_ANDROID_LIBRARIES := \ 16 | androidx.core_core \ 17 | androidx.preference_preference 18 | 19 | LOCAL_RESOURCE_DIR := \ 20 | $(LOCAL_PATH)/res \ 21 | $(TOP)/packages/resources/devicesettings/res 22 | 23 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags 24 | 25 | include frameworks/base/packages/SettingsLib/common.mk 26 | 27 | include $(BUILD_PACKAGE) 28 | -------------------------------------------------------------------------------- /libhidl/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2020 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_library_shared { 17 | name: "android.hidl.base@1.0", 18 | vendor: true, 19 | } 20 | -------------------------------------------------------------------------------- /gps/etc/lowi.conf: -------------------------------------------------------------------------------- 1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | # 3 | # LOWI Config file 4 | # 5 | # GENERAL DESCRIPTION 6 | # This file contains the config params for LOWI 7 | # 8 | # Copyright (c) 2012-2013 Qualcomm Atheros, Inc. 9 | # All Rights Reserved. 10 | # Qualcomm Atheros Confidential and Proprietary. 11 | # 12 | # Export of this technology or software is regulated by the U.S. Government. 13 | # Diversion contrary to U.S. law prohibited. 14 | #=============================================================================*/ 15 | 16 | # X86 ONLY - UBUNTU: 17 | # Copy this file in the same directory where the executable is 18 | 19 | # Log level 20 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 21 | LOWI_LOG_LEVEL = 3 22 | -------------------------------------------------------------------------------- /doze/res/drawable/ic_pickup.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /org.ifaa.android.manager/src/com/android/internal/app/IIFAAService.aidl: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Copyright (C), 2014-2017, OnePlus Mobile Comm Corp., Ltd 3 | ** VENDOR_EDIT, All rights reserved. 4 | ** 5 | ** File: - IIFAAService.aidl 6 | ** Description: 7 | ** IFAAService service interface 8 | ** 9 | ** ------------------------------- Revision History: ---------------------------- 10 | ** 11 | ** ------------------------------------------------------------------------------ 12 | ** KenShen@Framework 2017-03-30 v1 add init version. 13 | 14 | ********************************************************************************/ 15 | 16 | package com.android.internal.app; 17 | 18 | interface IIFAAService { 19 | byte[] processCmdV2(in byte[] dataIn); 20 | } 21 | -------------------------------------------------------------------------------- /setup-makefiles.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017-2020 The LineageOS Project 5 | # 6 | # SPDX-License-Identifier: Apache-2.0 7 | # 8 | 9 | set -e 10 | 11 | DEVICE=oneplus3 12 | VENDOR=oneplus 13 | 14 | # Load extract_utils and do some sanity checks 15 | MY_DIR="${BASH_SOURCE%/*}" 16 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi 17 | 18 | ANDROID_ROOT="${MY_DIR}/../../.." 19 | 20 | HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh" 21 | if [ ! -f "${HELPER}" ]; then 22 | echo "Unable to find helper script at ${HELPER}" 23 | exit 1 24 | fi 25 | source "${HELPER}" 26 | 27 | # Initialize the helper 28 | setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" 29 | 30 | # Warning headers and guards 31 | write_headers 32 | 33 | write_makefiles "${MY_DIR}/proprietary-files.txt" true 34 | 35 | # Finish 36 | write_footers 37 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /init/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | cc_library_static { 18 | name: "libinit_oneplus3", 19 | recovery_available: true, 20 | srcs: ["init_oneplus3.cpp"], 21 | include_dirs: [ 22 | "system/core/init" 23 | ], 24 | shared_libs: ["libbase"], 25 | } 26 | -------------------------------------------------------------------------------- /sepolicy/hal_ifaa.te: -------------------------------------------------------------------------------- 1 | type hal_ifaa_default, domain; 2 | hal_server_domain(hal_ifaa_default, hal_ifaa) 3 | 4 | type hal_ifaa_default_exec, exec_type, vendor_file_type, file_type; 5 | init_daemon_domain(hal_ifaa_default) 6 | 7 | # Allow hwbinder call from hal client to server 8 | binder_call(hal_ifaa_client, hal_ifaa_server) 9 | 10 | # Add hwservice related rules 11 | add_hwservice(hal_ifaa_server, hal_ifaa_hwservice) 12 | allow hal_ifaa_client hal_ifaa_hwservice:hwservice_manager find; 13 | 14 | #Allow access to tee device 15 | allow hal_ifaa_server tee_device:chr_file rw_file_perms; 16 | 17 | #Allow access to ion device 18 | allow hal_ifaa_server ion_device:chr_file r_file_perms; 19 | 20 | #Allow IPerf access 21 | allow hal_ifaa_server hal_perf_hwservice:hwservice_manager find; 22 | binder_call(hal_ifaa_server, hal_perf_server) 23 | 24 | #Allow access to firmware 25 | r_dir_file(hal_ifaa_server, firmware_file) 26 | -------------------------------------------------------------------------------- /doze/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | #82000000 19 | @android:color/black 20 | 21 | -------------------------------------------------------------------------------- /doze/res/drawable/switchbar_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV3.java: -------------------------------------------------------------------------------- 1 | package org.ifaa.android.manager; 2 | 3 | import android.compat.annotation.UnsupportedAppUsage; 4 | 5 | public abstract class IFAAManagerV3 extends IFAAManagerV2 { 6 | @UnsupportedAppUsage 7 | public static final String KEY_FINGERPRINT_FULLVIEW = "org.ifaa.ext.key.CUSTOM_VIEW"; 8 | @UnsupportedAppUsage 9 | public static final String KEY_GET_SENSOR_LOCATION = "org.ifaa.ext.key.GET_SENSOR_LOCATION"; 10 | @UnsupportedAppUsage 11 | public static final String VALUE_FINGERPRINT_DISABLE = "disable"; 12 | @UnsupportedAppUsage 13 | public static final String VLAUE_FINGERPRINT_ENABLE = "enable"; 14 | 15 | @UnsupportedAppUsage 16 | public abstract String getExtInfo(int authType, String keyExtInfo); 17 | 18 | @UnsupportedAppUsage 19 | public abstract void setExtInfo(int authType, String keyExtInfo, String valExtInfo); 20 | } 21 | -------------------------------------------------------------------------------- /doze/res/drawable/ic_hand.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /overlay-pe/packages/apps/Settings/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 5dp 19 | 94.6% 20 | 21 | -------------------------------------------------------------------------------- /vr/Android.bp: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The LineageOS Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | cc_library_shared { 16 | name: "vr.msm8996", 17 | 18 | srcs: ["vr.c"], 19 | relative_install_path: "hw", 20 | shared_libs: [ 21 | "liblog", 22 | "libcutils", 23 | ], 24 | cflags: ["-Wno-unused-parameter"], 25 | 26 | owner: "qcom", 27 | vendor: true, 28 | } 29 | -------------------------------------------------------------------------------- /thermal/Android.bp: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The PixelExperience Project 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | cc_library_shared { 16 | name: "thermal.msm8996", 17 | cflags: ["-Wno-unused-parameter"], 18 | relative_install_path: "hw", 19 | srcs: ["thermal.c"], 20 | shared_libs: [ 21 | "liblog", 22 | "libcutils", 23 | ], 24 | 25 | owner: "qcom", 26 | vendor: true, 27 | } 28 | -------------------------------------------------------------------------------- /org.ifaa.android.manager/Android.bp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-2020 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | java_library { 18 | name: "org.ifaa.android.manager", 19 | installable: true, 20 | libs: [ 21 | "unsupportedappusage", // for android.compat.annotation.UnsupportedAppUsage 22 | ], 23 | srcs: [ 24 | "src/**/*.java", 25 | "src/**/I*.aidl", 26 | ], 27 | } 28 | -------------------------------------------------------------------------------- /overlay-pe/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | true 24 | 25 | 26 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | true 23 | 24 | 25 | -------------------------------------------------------------------------------- /DeviceSettings/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 | -------------------------------------------------------------------------------- /libshims/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2020 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | cc_library_shared { 18 | name: "libui_shim", 19 | srcs: ["GraphicBuffer.cpp"], 20 | shared_libs: ["libui"], 21 | } 22 | 23 | cc_library { 24 | name: "libcutils_shim", 25 | srcs: [ 26 | "strdup16to8.cpp", 27 | "strdup8to16.cpp", 28 | ], 29 | shared_libs: ["libcutils"], 30 | } 31 | -------------------------------------------------------------------------------- /doze/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | @*android:color/material_grey_600 19 | #BFFFFFFF 20 | @android:color/white 21 | 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /doze/res/color/switch_bar_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /overlay-pe/packages/apps/Snap/res/values/cm_strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | Burst 20 | ClearShot 21 | 22 | 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManager.java: -------------------------------------------------------------------------------- 1 | package org.ifaa.android.manager; 2 | 3 | import android.compat.annotation.UnsupportedAppUsage; 4 | import android.content.Context; 5 | 6 | public abstract class IFAAManager { 7 | 8 | /** 9 | * 返回手机系统上支持的校验方式,目前IFAF协议1.0版本指纹为0x01、虹膜为0x02 10 | */ 11 | @UnsupportedAppUsage 12 | public abstract int getSupportBIOTypes(Context context); 13 | 14 | /** 15 | * 启动系统的指纹/虹膜管理应用界面,让用户进行指纹录入。指纹录入是在系统的指纹管理应用中实现的, 16 | * 本函数的作用只是将指纹管理应用运行起来,直接进行页面跳转,方便用户录入。 17 | * @param context 18 | * @param authType 生物特征识别类型,指纹为1,虹膜为2 19 | * @return 0,成功启动指纹管理应用;-1,启动指纹管理应用失败。 20 | */ 21 | @UnsupportedAppUsage 22 | public abstract int startBIOManager(Context context, int authType); 23 | 24 | /** 25 | * 获取设备型号,同一款机型型号需要保持一致 26 | */ 27 | @UnsupportedAppUsage 28 | public abstract String getDeviceModel(); 29 | 30 | /** 31 | * 获取IFAAManager接口定义版本,目前为1 32 | */ 33 | @UnsupportedAppUsage 34 | public abstract int getVersion(); 35 | } 36 | -------------------------------------------------------------------------------- /doze/res/layout/doze.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /gps/gnss/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libgnss 9 | LOCAL_VENDOR_MODULE := true 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | LOCAL_SHARED_LIBRARIES := \ 13 | libutils \ 14 | libcutils \ 15 | libdl \ 16 | liblog \ 17 | libloc_core \ 18 | libgps.utils 19 | 20 | LOCAL_SRC_FILES += \ 21 | location_gnss.cpp \ 22 | GnssAdapter.cpp \ 23 | Agps.cpp \ 24 | XtraSystemStatusObserver.cpp 25 | 26 | LOCAL_CFLAGS += \ 27 | -fno-short-enums \ 28 | 29 | ifeq ($(TARGET_BUILD_VARIANT),user) 30 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 31 | endif 32 | 33 | LOCAL_HEADER_LIBRARIES := \ 34 | libgps.utils_headers \ 35 | libloc_core_headers \ 36 | libloc_pla_headers \ 37 | liblocation_api_headers 38 | 39 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 40 | 41 | LOCAL_PRELINK_MODULE := false 42 | 43 | include $(BUILD_SHARED_LIBRARY) 44 | 45 | endif # not BUILD_TINY_ANDROID 46 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 47 | -------------------------------------------------------------------------------- /overlay-pe/packages/apps/Settings/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | true 19 | 20 | 26 | 1 27 | 28 | -------------------------------------------------------------------------------- /doze/res/drawable/ic_pocket.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /liblight/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2018 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_binary { 17 | name: "android.hardware.light@2.0-service.oneplus3", 18 | relative_install_path: "hw", 19 | init_rc: ["android.hardware.light@2.0-service.oneplus3.rc"], 20 | srcs: ["service.cpp", "Light.cpp"], 21 | shared_libs: [ 22 | "libbase", 23 | "libcutils", 24 | "libhardware", 25 | "libhidlbase", 26 | "libutils", 27 | "android.hardware.light@2.0", 28 | ], 29 | proprietary: true, 30 | } 31 | -------------------------------------------------------------------------------- /display/FOSSConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 4 | 0 5 | 128 6 | 1 7 | 60 8 | 8 9 | 4 10 | 4 11 | 0 36 72 109 145 182 218 255 12 | 0 45 73 143 253 438 717 1023 13 | 32 48 700 788 14 | 255 204 204 192 15 | 55 128 175 204 16 | 80 64 16 1 17 | 18 | -------------------------------------------------------------------------------- /overlay-pe/packages/apps/Settings/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 24 | 25 | 0 26 | -1 27 | -1 28 | 29 | 30 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 24 | 25 | 0 26 | -1 27 | -1 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /gps/android/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #define LOG_TAG "android.hardware.gnss@1.1-service-qti" 22 | 23 | #include 24 | #include 25 | 26 | using android::hardware::gnss::V1_0::IGnss; 27 | using android::hardware::defaultPassthroughServiceImplementation; 28 | 29 | int main() { 30 | return defaultPassthroughServiceImplementation(); 31 | } 32 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/ic_settings_device.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | 23 | 27 | 28 | -------------------------------------------------------------------------------- /display/Android.bp: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The PixelExperience 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 | prebuilt_etc { 16 | name: "qdcm_calib_data_samsung_s6e3fa3_1080p_cmd_mode_dsi_panel.xml", 17 | 18 | src: "qdcm_calib_data_samsung_s6e3fa3_1080p_cmd_mode_dsi_panel.xml", 19 | vendor: true, 20 | } 21 | 22 | prebuilt_etc { 23 | name: "qdcm_calib_data_samsung_s6e3fa5_1080p_cmd_mode_dsi_panel.xml", 24 | 25 | src: "qdcm_calib_data_samsung_s6e3fa5_1080p_cmd_mode_dsi_panel.xml", 26 | vendor: true, 27 | } 28 | 29 | prebuilt_etc { 30 | name: "FOSSConfig.xml", 31 | 32 | src: "FOSSConfig.xml", 33 | vendor: true, 34 | } 35 | -------------------------------------------------------------------------------- /gps/location/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = \ 4 | -I./ \ 5 | -I../utils \ 6 | $(LOCPLA_CFLAGS) \ 7 | $(GPSUTILS_CFLAGS) \ 8 | -std=c++11 9 | 10 | liblocation_api_la_SOURCES = \ 11 | LocationAPI.cpp \ 12 | LocationAPIClientBase.cpp 13 | 14 | if USE_GLIB 15 | liblocation_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 16 | liblocation_api_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 17 | liblocation_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 18 | else 19 | liblocation_api_la_CFLAGS = $(AM_CFLAGS) 20 | liblocation_api_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 21 | liblocation_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 22 | endif 23 | 24 | liblocation_api_la_LIBADD = -lstdc++ -ldl $(GPSUTILS_LIBS) 25 | 26 | library_include_HEADERS = \ 27 | LocationAPI.h \ 28 | LocationAPIClientBase.h \ 29 | location_interface.h 30 | 31 | #Create and Install libraries 32 | lib_LTLIBRARIES = liblocation_api.la 33 | 34 | library_includedir = $(pkgincludedir) 35 | 36 | pkgconfigdir = $(libdir)/pkgconfig 37 | pkgconfig_DATA = location-api.pc 38 | EXTRA_DIST = $(pkgconfig_DATA) 39 | -------------------------------------------------------------------------------- /lineagehw/touch/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019,2021 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_binary { 17 | name: "vendor.lineage.touch@1.0-service.oneplus3", 18 | init_rc: ["vendor.lineage.touch@1.0-service.oneplus3.rc"], 19 | defaults: ["hidl_defaults"], 20 | vintf_fragments: ["vendor.lineage.touch@1.0-service.oneplus3.xml"], 21 | relative_install_path: "hw", 22 | vendor: true, 23 | srcs: [ 24 | "KeyDisabler.cpp", 25 | "KeySwapper.cpp", 26 | "TouchscreenGesture.cpp", 27 | "service.cpp", 28 | ], 29 | shared_libs: [ 30 | "libbase", 31 | "libhidlbase", 32 | "libutils", 33 | "vendor.lineage.touch@1.0", 34 | ], 35 | } 36 | -------------------------------------------------------------------------------- /doze/src/org/lineageos/settings/doze/DozeSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2016 The CyanogenMod Project 3 | * 2017 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.doze; 19 | 20 | import android.os.Bundle; 21 | import android.preference.PreferenceActivity; 22 | 23 | public class DozeSettingsActivity extends PreferenceActivity { 24 | 25 | private static final String TAG_DOZE = "doze"; 26 | 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | 31 | getFragmentManager().beginTransaction().replace(android.R.id.content, 32 | new DozeSettingsFragment(), TAG_DOZE).commit(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /doze/src/org/lineageos/settings/doze/BootCompletedReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 The CyanogenMod Project 3 | * 2017-2019 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.settings.doze; 19 | 20 | import android.content.BroadcastReceiver; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.util.Log; 24 | 25 | public class BootCompletedReceiver extends BroadcastReceiver { 26 | 27 | private static final boolean DEBUG = false; 28 | private static final String TAG = "OneplusDoze"; 29 | 30 | @Override 31 | public void onReceive(final Context context, Intent intent) { 32 | if (DEBUG) Log.d(TAG, "Received boot completed intent"); 33 | Utils.checkDozeService(context); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /overlay-pe/packages/apps/Snap/res/values/qcomstrings.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | 25 | false 26 | on 27 | enable 28 | 1920x1080 29 | 30 | -------------------------------------------------------------------------------- /lineagehw/touch/KeyDisabler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 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 | #pragma once 18 | 19 | #include 20 | 21 | namespace vendor { 22 | namespace lineage { 23 | namespace touch { 24 | namespace V1_0 { 25 | namespace implementation { 26 | 27 | using ::android::hardware::Return; 28 | 29 | class KeyDisabler : public IKeyDisabler { 30 | public: 31 | KeyDisabler(); 32 | // Methods from ::vendor::lineage::touch::V1_0::IKeyDisabler follow. 33 | Return isEnabled() override; 34 | Return setEnabled(bool enabled) override; 35 | 36 | private: 37 | const bool has_key_disabler_; 38 | }; 39 | 40 | } // namespace implementation 41 | } // namespace V1_0 42 | } // namespace touch 43 | } // namespace lineage 44 | } // namespace vendor 45 | -------------------------------------------------------------------------------- /lineagehw/touch/KeySwapper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019,2021 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 | #pragma once 18 | 19 | #include 20 | 21 | namespace vendor { 22 | namespace lineage { 23 | namespace touch { 24 | namespace V1_0 { 25 | namespace implementation { 26 | 27 | using ::android::hardware::Return; 28 | 29 | class KeySwapper : public IKeySwapper { 30 | public: 31 | KeySwapper(); 32 | // Methods from ::vendor::lineage::touch::V1_0::IKeySwapper follow. 33 | Return isEnabled() override; 34 | Return setEnabled(bool enabled) override; 35 | 36 | private: 37 | const bool has_key_swapper_; 38 | }; 39 | 40 | } // namespace implementation 41 | } // namespace V1_0 42 | } // namespace touch 43 | } // namespace lineage 44 | } // namespace vendor 45 | -------------------------------------------------------------------------------- /overlay/packages/apps/CellBroadcastReceiver/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | true 23 | 24 | true 25 | 26 | true 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /DeviceSettings/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | @string/notification_slider_mode_total_silence 21 | @string/notification_slider_mode_silent 22 | @string/notification_slider_mode_priority_only 23 | @string/notification_slider_mode_vibrate 24 | @string/notification_slider_mode_none 25 | 26 | 27 | 28 | 0 29 | 1 30 | 2 31 | 3 32 | 4 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /lineagehw/touch/TouchscreenGesture.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019,2021 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 | #pragma once 18 | 19 | #include 20 | 21 | namespace vendor { 22 | namespace lineage { 23 | namespace touch { 24 | namespace V1_0 { 25 | namespace implementation { 26 | 27 | using ::android::hardware::Return; 28 | using ::android::hardware::Void; 29 | 30 | class TouchscreenGesture : public ITouchscreenGesture { 31 | public: 32 | // Methods from ::vendor::lineage::touch::V1_0::ITouchscreenGesture follow. 33 | Return getSupportedGestures(getSupportedGestures_cb resultCb) override; 34 | Return setGestureEnabled(const ::vendor::lineage::touch::V1_0::Gesture& gesture, 35 | bool enabled) override; 36 | }; 37 | 38 | } // namespace implementation 39 | } // namespace V1_0 40 | } // namespace touch 41 | } // namespace lineage 42 | } // namespace vendor 43 | -------------------------------------------------------------------------------- /lineagehw/touch/vendor.lineage.touch@1.0-service.oneplus3.rc: -------------------------------------------------------------------------------- 1 | on early-boot 2 | chown system system /proc/s1302/key_rep 3 | chmod 0660 /proc/s1302/key_rep 4 | chown system system /proc/s1302/virtual_key 5 | chmod 0660 /proc/s1302/virtual_key 6 | 7 | chown system system /proc/touchpanel/up_swipe_enable 8 | chmod 0660 /proc/touchpanel/up_swipe_enable 9 | chown system system /proc/touchpanel/down_swipe_enable 10 | chmod 0660 /proc/touchpanel/down_swipe_enable 11 | chown system system /proc/touchpanel/left_swipe_enable 12 | chmod 0660 /proc/touchpanel/left_swipe_enable 13 | chown system system /proc/touchpanel/right_swipe_enable 14 | chmod 0660 /proc/touchpanel/right_swipe_enable 15 | chown system system /proc/touchpanel/double_swipe_enable 16 | chmod 0660 /proc/touchpanel/double_swipe_enable 17 | chown system system /proc/touchpanel/up_arrow_enable 18 | chmod 0660 /proc/touchpanel/up_arrow_enable 19 | chown system system /proc/touchpanel/down_arrow_enable 20 | chmod 0660 /proc/touchpanel/down_arrow_enable 21 | chown system system /proc/touchpanel/left_arrow_enable 22 | chmod 0660 /proc/touchpanel/left_arrow_enable 23 | chown system system /proc/touchpanel/right_arrow_enable 24 | chmod 0660 /proc/touchpanel/right_arrow_enable 25 | chown system system /proc/touchpanel/letter_o_enable 26 | chmod 0660 /proc/touchpanel/letter_o_enable 27 | 28 | service touch-hal-1-0 /vendor/bin/hw/vendor.lineage.touch@1.0-service.oneplus3 29 | class hal 30 | user system 31 | group system 32 | -------------------------------------------------------------------------------- /aosp_oneplus3.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 The CyanogenMod Project 2 | # Copyright (C) 2017-2020 The LineageOS Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Inherit from those products. Most specific first. 17 | $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) 18 | $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) 19 | 20 | # Inherit from oneplus3 device 21 | $(call inherit-product, device/oneplus/oneplus3/device.mk) 22 | 23 | # Inherit some common PixelExperience stuff. 24 | $(call inherit-product, vendor/aosp/config/common_full_phone.mk) 25 | TARGET_GAPPS_ARCH := arm64 26 | IS_PHONE := true 27 | 28 | PRODUCT_NAME := aosp_oneplus3 29 | PRODUCT_DEVICE := oneplus3 30 | PRODUCT_MANUFACTURER := OnePlus 31 | PRODUCT_BRAND := OnePlus 32 | PRODUCT_MODEL := OnePlus 3/3T 33 | 34 | TARGET_BOOT_ANIMATION_RES := 1080 35 | 36 | PRODUCT_GMS_CLIENTID_BASE := android-oneplus 37 | 38 | BUILD_FINGERPRINT := "OnePlus/OnePlus3/OnePlus3:9/PKQ1.181203.001/1911042107:user/release-keys" 39 | 40 | TARGET_VENDOR := oneplus 41 | -------------------------------------------------------------------------------- /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 | libprocessgroup 16 | 17 | LOCAL_SRC_FILES += \ 18 | loc_log.cpp \ 19 | loc_cfg.cpp \ 20 | msg_q.c \ 21 | linked_list.c \ 22 | loc_target.cpp \ 23 | LocHeap.cpp \ 24 | LocTimer.cpp \ 25 | LocThread.cpp \ 26 | MsgTask.cpp \ 27 | loc_misc_utils.cpp \ 28 | loc_nmea.cpp \ 29 | LocIpc.cpp 30 | 31 | # Flag -std=c++11 is not accepted by compiler when LOCAL_CLANG is set to true 32 | LOCAL_CFLAGS += \ 33 | -fno-short-enums \ 34 | -D_ANDROID_ 35 | 36 | ifeq ($(TARGET_BUILD_VARIANT),user) 37 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 38 | endif 39 | 40 | LOCAL_LDFLAGS += -Wl,--export-dynamic 41 | 42 | ## Includes 43 | LOCAL_HEADER_LIBRARIES := \ 44 | libutils_headers \ 45 | libloc_pla_headers \ 46 | liblocation_api_headers 47 | 48 | LOCAL_MODULE := libgps.utils 49 | LOCAL_VENDOR_MODULE := true 50 | LOCAL_MODULE_TAGS := optional 51 | 52 | LOCAL_PRELINK_MODULE := false 53 | 54 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 55 | 56 | include $(BUILD_SHARED_LIBRARY) 57 | 58 | include $(CLEAR_VARS) 59 | LOCAL_MODULE := libgps.utils_headers 60 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 61 | include $(BUILD_HEADER_LIBRARY) 62 | 63 | endif # not BUILD_TINY_ANDROID 64 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 65 | -------------------------------------------------------------------------------- /DeviceSettings/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013 The CyanogenMod Project 3 | # Copyright (C) 2017 The LineageOS Project 4 | # Copyright (C) 2019 Android Open Source Illusion 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 | LOCAL_PATH := $(call my-dir) 20 | include $(CLEAR_VARS) 21 | 22 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 23 | LOCAL_CERTIFICATE := platform 24 | LOCAL_PRIVATE_PLATFORM_APIS := true 25 | LOCAL_PRIVILEGED_MODULE := true 26 | LOCAL_PACKAGE_NAME := DeviceSettings 27 | 28 | LOCAL_USE_AAPT2 := true 29 | 30 | LOCAL_STATIC_ANDROID_LIBRARIES := \ 31 | androidx.core_core \ 32 | androidx.preference_preference 33 | 34 | LOCAL_RESOURCE_DIR := \ 35 | $(LOCAL_PATH)/res \ 36 | $(LOCAL_PATH)/../../../../packages/resources/devicesettings/res \ 37 | $(LOCAL_PATH)/../../../../packages/resources/devicesettings-custom/res 38 | 39 | LOCAL_AAPT_FLAGS := --auto-add-overlay 40 | 41 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags 42 | LOCAL_MODULE_TAGS := optional 43 | include frameworks/base/packages/SettingsLib/common.mk 44 | include $(BUILD_PACKAGE) 45 | -------------------------------------------------------------------------------- /libshims/jstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 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 __CUTILS_STRING16_H 18 | #define __CUTILS_STRING16_H 19 | 20 | #include 21 | #include 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | #if __STDC_VERSION__ < 201112L && __cplusplus < 201103L 28 | typedef uint16_t char16_t; 29 | #endif 30 | // otherwise char16_t is a keyword with the right semantics 31 | 32 | extern char * strndup16to8 (const char16_t* s, size_t n); 33 | extern size_t strnlen16to8 (const char16_t* s, size_t n); 34 | extern char * strncpy16to8 (char *dest, const char16_t*s, size_t n); 35 | 36 | extern char16_t * strdup8to16 (const char* s, size_t *out_len); 37 | extern size_t strlen8to16 (const char* utf8Str); 38 | extern char16_t * strcpy8to16 (char16_t *dest, const char*s, size_t *out_len); 39 | extern char16_t * strcpylen8to16 (char16_t *dest, const char*s, int length, 40 | size_t *out_len); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif /* __CUTILS_STRING16_H */ 47 | -------------------------------------------------------------------------------- /releasetools.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 The Android Open Source Project 2 | # Copyright (c) 2011, The Linux Foundation. All rights reserved. 3 | # Copyright (C) 2017-2019 The LineageOS Project 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | import hashlib 18 | import common 19 | import re 20 | 21 | 22 | def FullOTA_Assertions(info): 23 | AddModemAssertion(info, info.input_zip) 24 | 25 | 26 | def IncrementalOTA_Assertions(info): 27 | AddModemAssertion(info, info.target_zip) 28 | 29 | 30 | def AddModemAssertion(info, input_zip): 31 | android_info = input_zip.read("OTA/android-info.txt") 32 | m = re.search(r'require\s+version-modem\s*=\s*(.+)$', android_info) 33 | if m: 34 | modem_version, build_version = m.group(1).split('|') 35 | if modem_version and '*' not in modem_version: 36 | cmd = ('assert(op3.verify_modem("{}") == "1" || abort("Modem firmware ' 37 | 'from {} or newer stock ROMs is prerequisite to be compatible ' 38 | 'with this build."););'.format(modem_version, build_version)) 39 | info.script.AppendExtra(cmd) 40 | -------------------------------------------------------------------------------- /sepolicy/genfs_contexts: -------------------------------------------------------------------------------- 1 | # Fingerprint 2 | genfscon sysfs /devices/soc/soc:fpc_fpc1020 u:object_r:sysfs_fpc:s0 3 | 4 | # Healthd 5 | genfscon sysfs /devices/soc/msm-bcl-14/power_supply/fg_adc/type u:object_r:sysfs_batteryinfo:s0 6 | genfscon sysfs /devices/soc/qpnp-fg-17/power_supply/bms u:object_r:sysfs_battery_supply:s0 7 | genfscon sysfs /devices/soc/qpnp-smbcharger-16/power_supply/battery u:object_r:sysfs_battery_supply:s0 8 | genfscon sysfs /devices/soc/qpnp-smbcharger-16/power_supply/dc u:object_r:sysfs_battery_supply:s0 9 | genfscon sysfs /devices/soc/soc:qcom,bcl/power_supply/bcl/type u:object_r:sysfs_batteryinfo:s0 10 | 11 | # LEDs 12 | genfscon sysfs /devices/soc/leds-qpnp-18/leds u:object_r:sysfs_leds:s0 13 | genfscon sysfs /devices/soc/leds-qpnp-24/leds u:object_r:sysfs_leds:s0 14 | genfscon sysfs /devices/soc/leds-qpnp-25/leds u:object_r:sysfs_leds:s0 15 | 16 | # Ril 17 | genfscon debugfs /rmt_storage u:object_r:debugfs_rmt_storage:s0 18 | 19 | # Thermal engine 20 | genfscon sysfs /devices/soc/70000.qcom,msm-core/uio/uio1 u:object_r:sysfs_uio_file:s0 21 | genfscon sysfs /devices/soc/70000.qcom,msm-thermal/uio/uio2 u:object_r:sysfs_uio_file:s0 22 | 23 | # Touchscreen 24 | genfscon proc /touchpanel u:object_r:proc_touchpanel:s0 25 | genfscon proc /s1302 u:object_r:proc_touchpanel:s0 26 | 27 | # Tri-state key 28 | genfscon proc /tri-state-key u:object_r:proc_touchpanel:s0 29 | 30 | # USB 31 | genfscon sysfs /devices/soc/6a00000.ssusb/6a00000.dwc3/gadget/lun0/ u:object_r:sysfs_android_usb:s0 32 | -------------------------------------------------------------------------------- /keylayout/fpc1020.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012, 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 102 HOME VIRTUAL 29 | -------------------------------------------------------------------------------- /gps/core/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libloc_core 9 | LOCAL_VENDOR_MODULE := true 10 | LOCAL_MODULE_TAGS := optional 11 | 12 | ifeq ($(TARGET_DEVICE),apq8026_lw) 13 | LOCAL_CFLAGS += -DPDK_FEATURE_SET 14 | else ifeq ($(BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET),true) 15 | LOCAL_CFLAGS += -DPDK_FEATURE_SET 16 | endif 17 | 18 | LOCAL_SHARED_LIBRARIES := \ 19 | liblog \ 20 | libutils \ 21 | libcutils \ 22 | libgps.utils \ 23 | libdl \ 24 | liblog 25 | 26 | LOCAL_SRC_FILES += \ 27 | LocApiBase.cpp \ 28 | LocAdapterBase.cpp \ 29 | ContextBase.cpp \ 30 | LocDualContext.cpp \ 31 | loc_core_log.cpp \ 32 | data-items/DataItemsFactoryProxy.cpp \ 33 | SystemStatusOsObserver.cpp \ 34 | SystemStatus.cpp 35 | 36 | LOCAL_CFLAGS += \ 37 | -fno-short-enums \ 38 | -D_ANDROID_ 39 | 40 | LOCAL_C_INCLUDES:= \ 41 | $(LOCAL_PATH)/data-items \ 42 | $(LOCAL_PATH)/data-items/common \ 43 | $(LOCAL_PATH)/observer \ 44 | 45 | LOCAL_HEADER_LIBRARIES := \ 46 | libutils_headers \ 47 | libgps.utils_headers \ 48 | libloc_pla_headers \ 49 | liblocation_api_headers 50 | 51 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 52 | 53 | include $(BUILD_SHARED_LIBRARY) 54 | 55 | include $(CLEAR_VARS) 56 | LOCAL_MODULE := libloc_core_headers 57 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ 58 | $(LOCAL_PATH) \ 59 | $(LOCAL_PATH)/data-items \ 60 | $(LOCAL_PATH)/data-items/common \ 61 | $(LOCAL_PATH)/observer 62 | include $(BUILD_HEADER_LIBRARY) 63 | 64 | endif # not BUILD_TINY_ANDROID 65 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 66 | -------------------------------------------------------------------------------- /keylayout/synaptics.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012, 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 580 APP_SWITCH VIRTUAL 29 | key 158 BACK VIRTUAL 30 | key 143 WAKEUP 31 | -------------------------------------------------------------------------------- /configs/thermal-engine.conf: -------------------------------------------------------------------------------- 1 | [SKIN_SHUTDOWN] 2 | algo_type monitor 3 | sampling 1000 4 | sensor emmc_therm 5 | thresholds 60000 6 | thresholds_clr 59000 7 | actions shutdown 8 | action_info 1 9 | 10 | [SKIN-HIGH-FLOOR] 11 | algo_type ss 12 | sampling 2000 13 | sensor emmc_therm 14 | device cpu_voltage 15 | set_point 47000 16 | set_point_clr 44000 17 | device_perf_floor 1670400 18 | time_constant 0 19 | 20 | [SKIN-MID-FLOOR] 21 | algo_type ss 22 | sampling 2000 23 | sensor emmc_therm 24 | device cpu_voltage 25 | set_point 49000 26 | set_point_clr 48000 27 | device_perf_floor 1440000 28 | time_constant 0 29 | 30 | [SKIN-LOW-FLOOR] 31 | algo_type ss 32 | sampling 2000 33 | sensor emmc_therm 34 | device cpu_voltage 35 | set_point 51000 36 | set_point_clr 50000 37 | device_perf_floor 1132800 38 | time_constant 0 39 | 40 | [SKIN-RESTRICT-FLOOR] 41 | algo_type ss 42 | sampling 2000 43 | sensor emmc_therm 44 | device cpu_voltage 45 | set_point 54000 46 | set_point_clr 52000 47 | device_perf_floor 768000 48 | time_constant 0 49 | 50 | [SKIN-CRITICAL] 51 | algo_type monitor 52 | sensor emmc_therm 53 | sampling 1000 54 | thresholds 56000 58000 55 | thresholds_clr 55000 57000 56 | actions cluster0+cluster1+gpu cluster0+cluster1+gpu 57 | action_info 691200+691200+133000000 307200+307200+133000000 58 | 59 | [HOT-SKIN-VIRTUAL] 60 | algo_type virtual 61 | trip_sensor emmc_therm 62 | sensors tsens_tz_sensor15 tsens_tz_sensor0 63 | list_cnt 2 64 | weights 1 -1 65 | set_point 47000 66 | set_point_clr 44000 67 | sampling 1000 68 | math 0 69 | 70 | [VIRTUAL-SS-GPU-SKIN] 71 | algo_type ss 72 | sensor HOT-SKIN-VIRTUAL 73 | device gpu 74 | sampling 2000 75 | set_point 7000 76 | set_point_clr 2000 77 | device_max_limit 400000000 78 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 32 | 33 | 34 | true 35 | 36 | -------------------------------------------------------------------------------- /DeviceSettings/src/com/aosip/device/DeviceSettings/Startup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 The OmniROM Project 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | */ 18 | package com.aosip.device.DeviceSettings; 19 | 20 | import android.content.BroadcastReceiver; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.content.SharedPreferences; 24 | import android.provider.Settings; 25 | import android.text.TextUtils; 26 | import androidx.preference.PreferenceManager; 27 | 28 | public class Startup extends BroadcastReceiver { 29 | 30 | @Override 31 | public void onReceive(final Context context, final Intent bootintent) { 32 | 33 | boolean enabled = false; 34 | SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); 35 | 36 | } 37 | 38 | private void restore(String file, boolean enabled) { 39 | if (file == null) { 40 | return; 41 | } 42 | if (enabled) { 43 | Utils.writeValue(file, "1"); 44 | } 45 | } 46 | 47 | private void restore(String file, String value) { 48 | if (file == null) { 49 | return; 50 | } 51 | Utils.writeValue(file, value); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /sepolicy/file_contexts: -------------------------------------------------------------------------------- 1 | # Alipay 2 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.hardware\.ifaa@2\.0-service u:object_r:hal_ifaa_default_exec:s0 3 | 4 | # Camera 5 | /(vendor|system/vendor)/bin/remosaic_daemon u:object_r:remosaic_daemon_exec:s0 6 | 7 | # Charger 8 | /dev/dash u:object_r:dash_device:s0 9 | /(vendor|system/vendor)/bin/dashd u:object_r:dashd_exec:s0 10 | 11 | # Fingerprint 12 | /dev/fpc1020 u:object_r:fpc1020_device:s0 13 | /data/fpc(/.*)? u:object_r:fingerprintd_data_file:s0 14 | /data/fpc_images(/.*)? u:object_r:fingerprintd_data_file:s0 15 | 16 | # FRP partition 17 | /dev/block/platform/soc/624000.ufshc/by-name/config u:object_r:frp_block_device:s0 18 | 19 | # Lineage hardware 20 | /(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.oneplus3 u:object_r:hal_lineage_touch_default_exec:s0 21 | 22 | # Lights 23 | /(vendor|system/vendor)/bin/hw/android\.hardware\.light@2\.0-service.oneplus3 u:object_r:hal_light_default_exec:s0 24 | 25 | # Ril 26 | /data/vendor/oemnvitems(/.*)? u:object_r:vendor_radio_data_file:s0 27 | /dev/block/platform/soc/624000.ufshc/by-name/oem_dycnvbk u:object_r:modem_efs_partition_device:s0 28 | /dev/block/platform/soc/624000.ufshc/by-name/oem_stanvbk u:object_r:modem_efs_partition_device:s0 29 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.hardware\.param@1\.0-service u:object_r:hal_param_default_exec:s0 30 | 31 | # Widevine 32 | /(vendor|system/vendor)/bin/hw/android\.hardware\.drm@1\.1-service.widevine u:object_r:hal_drm_widevine_exec:s0 33 | -------------------------------------------------------------------------------- /gps/android/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 18 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 19 | 20 | 21 | #include 22 | #include 23 | 24 | namespace android { 25 | namespace hardware { 26 | namespace gnss { 27 | namespace V1_0 { 28 | namespace implementation { 29 | 30 | using ::android::hardware::gnss::V1_0::IGnssDebug; 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | using ::android::hardware::hidl_vec; 34 | using ::android::hardware::hidl_string; 35 | using ::android::sp; 36 | 37 | /* Interface for GNSS Debug support. */ 38 | struct Gnss; 39 | struct GnssDebug : public IGnssDebug { 40 | GnssDebug(Gnss* gnss); 41 | ~GnssDebug() {}; 42 | 43 | /* 44 | * Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow. 45 | * These declarations were generated from IGnssDebug.hal. 46 | */ 47 | Return getDebugData(getDebugData_cb _hidl_cb) override; 48 | 49 | private: 50 | Gnss* mGnss = nullptr; 51 | }; 52 | 53 | } // namespace implementation 54 | } // namespace V1_0 55 | } // namespace gnss 56 | } // namespace hardware 57 | } // namespace android 58 | 59 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 60 | -------------------------------------------------------------------------------- /overlay/packages/apps/Mms/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 30 | 31 | 32 | 33 | true 34 | 35 | -------------------------------------------------------------------------------- /rootdir/etc/init.recovery.qcom.rc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are met: 5 | # * Redistributions of source code must retain the above copyright 6 | # notice, this list of conditions and the following disclaimer. 7 | # * Redistributions in binary form must reproduce the above copyright 8 | # notice, this list of conditions and the following disclaimer in the 9 | # documentation and/or other materials provided with the distribution. 10 | # * Neither the name of The Linux Foundation nor 11 | # the names of its contributors may be used to endorse or promote 12 | # products derived from this software without specific prior written 13 | # permission. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 19 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | # 27 | 28 | on init 29 | write /sys/class/backlight/panel0-backlight/brightness 200 30 | 31 | on fs 32 | wait /dev/block/platform/soc/${ro.boot.bootdevice} 33 | symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice 34 | -------------------------------------------------------------------------------- /bluetooth/bdroid_buildcfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Copyright (c) 2013, The Linux Foundation. All rights reserved. 4 | * Not a Contribution, Apache license notifications and license are retained 5 | * for attribution purposes only. 6 | * 7 | * Copyright (C) 2012 The Android Open Source Project 8 | * Copyright (C) 2017 The LineageOS Project 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | #ifndef _BDROID_BUILDCFG_H 24 | #define _BDROID_BUILDCFG_H 25 | 26 | #include 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | int32_t property_get_int32(const char *key, int32_t default_value); 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | static inline const char* BtmGetDefaultName() 37 | { 38 | int32_t rf_version = property_get_int32("ro.boot.rf_version", 0); 39 | 40 | switch (rf_version) { 41 | case 11: 42 | case 21: 43 | case 31: 44 | return "OnePlus 3"; 45 | case 12: 46 | case 22: 47 | case 32: 48 | return "OnePlus 3T"; 49 | } 50 | 51 | return ""; 52 | } 53 | 54 | #define BTM_DEF_LOCAL_NAME BtmGetDefaultName() 55 | // Disables read remote device feature 56 | #define MAX_ACL_CONNECTIONS 16 57 | #define MAX_L2CAP_CHANNELS 32 58 | #define BLE_VND_INCLUDED TRUE 59 | #define GATT_MAX_PHY_CHANNEL 10 60 | // skips conn update at conn completion 61 | #define BT_CLEAN_TURN_ON_DISABLED 1 62 | 63 | #define AVDT_NUM_SEPS 35 64 | #endif 65 | -------------------------------------------------------------------------------- /rootdir/etc/fstab.qcom: -------------------------------------------------------------------------------- 1 | # Android fstab file. 2 | # The filesystem that contains the filesystem checker binary (typically /system) cannot 3 | # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK 4 | 5 | #TODO: Add 'check' as fs_mgr_flags with data partition. 6 | # Currently we dont have e2fsck compiled. So fs check would failed. 7 | 8 | # 9 | /dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,nodiratime wait,encryptable=footer,quota,reservedsize=128M 10 | /dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,encryptable=footer,quota,reservedsize=128M 11 | /dev/block/bootdevice/by-name/misc /misc emmc defaults defaults 12 | /dev/block/bootdevice/by-name/cache /cache f2fs noatime,nosuid,nodev,inline_xattr,flush_merge,data_flush wait 13 | /dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1 wait 14 | /dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait 15 | /dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait 16 | /dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait 17 | /dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait 18 | /devices/soc/6a00000.ssusb/6a00000.dwc3/xhci-hcd.0.auto/usb* auto auto defaults voldmanaged=usbotg:auto 19 | -------------------------------------------------------------------------------- /gps/utils/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = -Wundef \ 4 | -MD \ 5 | -Wno-trigraphs \ 6 | -g -O0 \ 7 | -fno-inline \ 8 | -fno-short-enums \ 9 | -fpic \ 10 | -I./ \ 11 | -std=c++11 \ 12 | $(LOCPLA_CFLAGS) 13 | 14 | libgps_utils_la_h_sources = \ 15 | msg_q.h \ 16 | linked_list.h \ 17 | loc_cfg.h \ 18 | loc_log.h \ 19 | loc_target.h \ 20 | loc_timer.h \ 21 | MsgTask.h \ 22 | LocHeap.h \ 23 | LocThread.h \ 24 | LocTimer.h \ 25 | LocIpc.h \ 26 | loc_misc_utils.h \ 27 | loc_nmea.h \ 28 | gps_extended_c.h \ 29 | gps_extended.h \ 30 | loc_gps.h \ 31 | log_util.h 32 | 33 | libgps_utils_la_c_sources = \ 34 | linked_list.c \ 35 | msg_q.c \ 36 | loc_cfg.cpp \ 37 | loc_log.cpp \ 38 | loc_target.cpp \ 39 | LocHeap.cpp \ 40 | LocTimer.cpp \ 41 | LocThread.cpp \ 42 | LocIpc.cpp \ 43 | MsgTask.cpp \ 44 | loc_misc_utils.cpp \ 45 | loc_nmea.cpp 46 | 47 | library_includedir = $(pkgincludedir) 48 | 49 | library_include_HEADERS = $(libgps_utils_la_h_sources) 50 | 51 | libgps_utils_la_SOURCES = $(libgps_utils_la_c_sources) 52 | 53 | if USE_GLIB 54 | libgps_utils_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 55 | libgps_utils_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 56 | libgps_utils_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 57 | else 58 | libgps_utils_la_CFLAGS = $(AM_CFLAGS) 59 | libgps_utils_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 60 | libgps_utils_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 61 | endif 62 | 63 | libgps_utils_la_LIBADD = $(CUTILS_LIBS) 64 | 65 | #Create and Install libraries 66 | lib_LTLIBRARIES = libgps_utils.la 67 | 68 | pkgconfigdir = $(libdir)/pkgconfig 69 | pkgconfig_DATA = gps-utils.pc 70 | EXTRA_DIST = $(pkgconfig_DATA) 71 | -------------------------------------------------------------------------------- /rootdir/etc/init.qcom.sensors.sh: -------------------------------------------------------------------------------- 1 | #!/vendor/bin/sh 2 | # Copyright (c) 2015,2018 The Linux Foundation. All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above copyright 9 | # notice, this list of conditions and the following disclaimer in the 10 | # documentation and/or other materials provided with the distribution. 11 | # * Neither the name of The Linux Foundation nor 12 | # the names of its contributors may be used to endorse or promote 13 | # products derived from this software without specific prior written 14 | # permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 20 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # 28 | 29 | # 30 | # Function to start sensors for SSC enabled platforms 31 | # 32 | start_sensors() 33 | { 34 | start vendor.sensors.qti 35 | 36 | # Only for SLPI 37 | if [ -c /dev/msm_dsps -o -c /dev/sensors ] ; then 38 | start vendor.sensors 39 | fi 40 | } 41 | 42 | start_sensors 43 | -------------------------------------------------------------------------------- /configs/framework_manifest.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 31 | vendor.qti.hardware.radio.atcmdfwd 32 | hwbinder 33 | 1.0 34 | 35 | IAtCmdFwd 36 | AtCmdFwdService 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /lineagehw/touch/KeySwapper.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019,2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | #include "KeySwapper.h" 22 | 23 | namespace { 24 | constexpr const char kControlPath[] = "/proc/s1302/key_rep"; 25 | }; // anonymous namespace 26 | 27 | namespace vendor { 28 | namespace lineage { 29 | namespace touch { 30 | namespace V1_0 { 31 | namespace implementation { 32 | 33 | KeySwapper::KeySwapper() : has_key_swapper_(!access(kControlPath, R_OK | W_OK)) {} 34 | 35 | // Methods from ::vendor::lineage::touch::V1_0::IKeySwapper follow. 36 | Return KeySwapper::isEnabled() { 37 | if (!has_key_swapper_) return false; 38 | 39 | std::string buf; 40 | if (!android::base::ReadFileToString(kControlPath, &buf)) { 41 | LOG(ERROR) << "Failed to read " << kControlPath; 42 | return false; 43 | } 44 | 45 | return std::stoi(android::base::Trim(buf)) == 1; 46 | } 47 | 48 | Return KeySwapper::setEnabled(bool enabled) { 49 | if (!has_key_swapper_) return false; 50 | 51 | if (!android::base::WriteStringToFile(std::to_string(enabled), kControlPath)) { 52 | LOG(ERROR) << "Failed to write " << kControlPath; 53 | return false; 54 | } 55 | 56 | return true; 57 | } 58 | 59 | } // namespace implementation 60 | } // namespace V1_0 61 | } // namespace touch 62 | } // namespace lineage 63 | } // namespace vendor 64 | -------------------------------------------------------------------------------- /lineagehw/touch/KeyDisabler.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019,2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | #include "KeyDisabler.h" 22 | 23 | namespace { 24 | constexpr const char kControlPath[] = "/proc/s1302/virtual_key"; 25 | }; // anonymous namespace 26 | 27 | namespace vendor { 28 | namespace lineage { 29 | namespace touch { 30 | namespace V1_0 { 31 | namespace implementation { 32 | 33 | KeyDisabler::KeyDisabler() : has_key_disabler_(!access(kControlPath, R_OK | W_OK)) {} 34 | 35 | // Methods from ::vendor::lineage::touch::V1_0::IKeyDisabler follow. 36 | Return KeyDisabler::isEnabled() { 37 | if (!has_key_disabler_) return false; 38 | 39 | std::string buf; 40 | if (!android::base::ReadFileToString(kControlPath, &buf)) { 41 | LOG(ERROR) << "Failed to read " << kControlPath; 42 | return false; 43 | } 44 | 45 | return std::stoi(android::base::Trim(buf)) == 1; 46 | } 47 | 48 | Return KeyDisabler::setEnabled(bool enabled) { 49 | if (!has_key_disabler_) return false; 50 | 51 | if (!android::base::WriteStringToFile(std::to_string(enabled), kControlPath)) { 52 | LOG(ERROR) << "Failed to write " << kControlPath; 53 | return false; 54 | } 55 | 56 | return true; 57 | } 58 | 59 | } // namespace implementation 60 | } // namespace V1_0 61 | } // namespace touch 62 | } // namespace lineage 63 | } // namespace vendor 64 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 3 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 3 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc120/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | 38 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc460-mnc03/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc460-mnc11/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /doze/res/layout/switch_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 27 | 28 | 40 | 41 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc312-mnc530/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 30 | 31 | 32 | 33 | "0" 34 | "00" 35 | "*2" 36 | 37 | 38 | -------------------------------------------------------------------------------- /gps/gnsspps/gnsspps.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundatoin, nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | #ifndef _GNSSPPS_H 29 | #define _GNSSPPS_H 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | /* opens the device and fetches from PPS source */ 36 | int initPPS(char *devname); 37 | /* updates the fine time stamp */ 38 | int getPPS(struct timespec *current_ts, struct timespec *current_boottime, struct timespec *last_boottime); 39 | /* stops fetching and closes the device */ 40 | void deInitPPS(); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | #endif 46 | -------------------------------------------------------------------------------- /overlay-pe/packages/apps/Snap/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 25 | 100 26 | 27 | 31 | 32 | placeholder 33 | 34 | 35 | 36 | true 37 | 38 | 39 | false 40 | 41 | 42 | false 43 | 44 | 45 | true 46 | 47 | 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Copyright (C) 2016 - The CyanogenMod Project 2 | 3 | Copyright (C) 2017 - The LineageOS Project 4 | 5 | Unified device configuration for OnePlus 3/3T 6 | ============== 7 | 8 | The OnePlus 3/3T (codenamed _"oneplus3"_) are high-end smartphones from OnePlus. 9 | 10 | OnePlus 3 was announced in February 2016. Release date was June 2016. 11 | 12 | OnePlus 3T was announced in November 2016. Release date was November 2016. 13 | 14 | ## Device specifications 15 | 16 | | Device | OnePlus 3 | OnePlus 3T | 17 | | -----------: | :---------------------------------------------- | :---------------------------------------------- | 18 | | SoC | Qualcomm MSM8996 Snapdragon 820 | Qualcomm MSM8996 Snapdragon 821 | 19 | | CPU | Dual-core 2.15GHz Kryo & dual-core 1.6GHz Kryo | Dual-core 2.35GHz Kryo & dual-core 1.6GHz Kryo | 20 | | GPU | 624MHz Adreno 530 | 652MHz Adreno 530 | 21 | | Memory | 6 GB RAM (LPDDR4 1866MHz dual-channel) | 6 GB RAM (LPDDR4 1866MHz dual-channel) | 22 | | Shipped Android version | 6.0 | 6.0 | 23 | | Storage | 64 GB (UFS 2.0 Flash) | 64 GB / 128GB (UFS 2.0 Flash) | 24 | | Battery | Non-removable Li-Po 3000 mAh | Non-removable Li-Po 3400 mAh | 25 | | Dimensions | 152.7 x 74.7 x 7.35 mm | 152.7 x 74.7 x 7.35 mm | 26 | | Display | 1920 x 1080 px, 5.5 inches (401 PPI) | 1920 x 1080 px, 5.5 inches (401 PPI) | 27 | | Rear camera | 16 MPx, f/2.0, PDAF autofocus, LED flash | 16 MPx, f/2.0, PDAF autofocus, LED flash | 28 | | Front camera | 8 MPx, f/2.0 | 16 MPx, f/2.0 | 29 | 30 | ## Device picture 31 | 32 | ![OnePlus 3](https://content.oneplus.net/skin/frontend/oneplus2015/default/images/oneplus3/oxygenos/parameter.png "OnePlus 3 in grey") 33 | -------------------------------------------------------------------------------- /DeviceSettings/src/com/aosip/device/DeviceSettings/SystemSettingSwitchPreference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 The CyanogenMod Project 3 | * Copyright (C) 2017 AICP 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 com.aosip.device.DeviceSettings; 19 | 20 | import android.content.Context; 21 | import androidx.preference.SwitchPreference; 22 | import android.util.AttributeSet; 23 | 24 | public class SystemSettingSwitchPreference extends SwitchPreference { 25 | 26 | public SystemSettingSwitchPreference(Context context, AttributeSet attrs, int defStyle) { 27 | super(context, attrs, defStyle); 28 | setPreferenceDataStore(new SystemSettingsStore(context.getContentResolver())); 29 | } 30 | 31 | public SystemSettingSwitchPreference(Context context, AttributeSet attrs) { 32 | super(context, attrs); 33 | setPreferenceDataStore(new SystemSettingsStore(context.getContentResolver())); 34 | } 35 | 36 | public SystemSettingSwitchPreference(Context context) { 37 | super(context); 38 | setPreferenceDataStore(new SystemSettingsStore(context.getContentResolver())); 39 | } 40 | 41 | @Override 42 | protected void onSetInitialValue(boolean restoreValue, Object defaultValue) { 43 | // This is what default TwoStatePreference implementation is doing without respecting 44 | // real default value: 45 | //setChecked(restoreValue ? getPersistedBoolean(mChecked) 46 | // : (Boolean) defaultValue); 47 | // Instead, we better do 48 | setChecked(restoreValue ? getPersistedBoolean((Boolean) defaultValue) 49 | : (Boolean) defaultValue); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /extract-files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017-2020 The LineageOS Project 5 | # 6 | # SPDX-License-Identifier: Apache-2.0 7 | # 8 | 9 | set -e 10 | 11 | DEVICE=oneplus3 12 | VENDOR=oneplus 13 | 14 | # Load extract_utils and do some sanity checks 15 | MY_DIR="${BASH_SOURCE%/*}" 16 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi 17 | 18 | ANDROID_ROOT="${MY_DIR}/../../.." 19 | 20 | HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh" 21 | if [ ! -f "${HELPER}" ]; then 22 | echo "Unable to find helper script at ${HELPER}" 23 | exit 1 24 | fi 25 | source "${HELPER}" 26 | 27 | # Default to sanitizing the vendor folder before extraction 28 | CLEAN_VENDOR=true 29 | 30 | KANG= 31 | SECTION= 32 | 33 | while [ "${#}" -gt 0 ]; do 34 | case "${1}" in 35 | -n | --no-cleanup ) 36 | CLEAN_VENDOR=false 37 | ;; 38 | -k | --kang ) 39 | KANG="--kang" 40 | ;; 41 | -s | --section ) 42 | SECTION="${2}"; shift 43 | CLEAN_VENDOR=false 44 | ;; 45 | * ) 46 | SRC="${1}" 47 | ;; 48 | esac 49 | shift 50 | done 51 | 52 | if [ -z "${SRC}" ]; then 53 | SRC="adb" 54 | fi 55 | 56 | function blob_fixup() { 57 | case "${1}" in 58 | vendor/lib/libwvhidl.so) 59 | "${PATCHELF}" --replace-needed "libprotobuf-cpp-lite.so" "libprotobuf-cpp-lite-v28.so" "${2}" 60 | ;; 61 | vendor/lib64/libsettings.so) 62 | "${PATCHELF}" --replace-needed "libprotobuf-cpp-full.so" "libprotobuf-cpp-full-v28.so" "${2}" 63 | ;; 64 | vendor/lib\(64\)?/hw/vulkan.msm8996.so) 65 | "${PATCHELF}" --set-soname "vulkan.msm8996.so" "${2}" 66 | ;; 67 | etc/permissions/qti_libpermissions.xml) 68 | sed -i "s/name=\"android.hidl.manager-V1.0-java/name=\"android.hidl.manager@1.0-java/g" "${2}" 69 | ;; 70 | esac 71 | } 72 | 73 | # Initialize the helper 74 | setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" 75 | 76 | extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" 77 | 78 | "${MY_DIR}/setup-makefiles.sh" 79 | -------------------------------------------------------------------------------- /configs/component-overrides.xml: -------------------------------------------------------------------------------- 1 | 2 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /DeviceSettings/res/xml/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 18 | 19 | 26 | 27 | 34 | 35 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /gps/core/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = -I./ \ 4 | $(LOCPLA_CFLAGS) \ 5 | $(GPSUTILS_CFLAGS) \ 6 | -I./data-items/ \ 7 | -I./data-items/common \ 8 | -I./observer \ 9 | -I$(WORKSPACE)/gps-noship/flp \ 10 | -D__func__=__PRETTY_FUNCTION__ \ 11 | -fno-short-enums \ 12 | -std=c++11 13 | 14 | libloc_core_la_h_sources = \ 15 | LocApiBase.h \ 16 | LocAdapterBase.h \ 17 | ContextBase.h \ 18 | LocDualContext.h \ 19 | LBSProxyBase.h \ 20 | UlpProxyBase.h \ 21 | loc_core_log.h \ 22 | LocAdapterProxyBase.h \ 23 | data-items/DataItemId.h \ 24 | data-items/IDataItemCore.h \ 25 | data-items/DataItemConcreteTypesBase.h \ 26 | observer/IDataItemObserver.h \ 27 | observer/IDataItemSubscription.h \ 28 | observer/IFrameworkActionReq.h \ 29 | observer/IOsObserver.h \ 30 | SystemStatusOsObserver.h \ 31 | SystemStatus.h 32 | 33 | libloc_core_la_c_sources = \ 34 | LocApiBase.cpp \ 35 | LocAdapterBase.cpp \ 36 | ContextBase.cpp \ 37 | LocDualContext.cpp \ 38 | loc_core_log.cpp \ 39 | data-items/DataItemsFactoryProxy.cpp \ 40 | SystemStatusOsObserver.cpp \ 41 | SystemStatus.cpp 42 | 43 | library_includedir = $(pkgincludedir) 44 | 45 | library_include_HEADERS = $(libloc_core_la_h_sources) 46 | 47 | libloc_core_la_SOURCES = $(libloc_core_la_c_sources) 48 | 49 | if USE_GLIB 50 | libloc_core_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 51 | libloc_core_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 52 | libloc_core_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 53 | else 54 | libloc_core_la_CFLAGS = $(AM_CFLAGS) 55 | libloc_core_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 56 | libloc_core_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 57 | endif 58 | 59 | libloc_core_la_LIBADD = -ldl $(GPSUTILS_LIBS) 60 | 61 | #Create and Install libraries 62 | lib_LTLIBRARIES = libloc_core.la 63 | 64 | pkgconfigdir = $(libdir)/pkgconfig 65 | pkgconfig_DATA = loc-core.pc 66 | EXTRA_DIST = $(pkgconfig_DATA) 67 | -------------------------------------------------------------------------------- /gps/gnsspps/configure.ac: -------------------------------------------------------------------------------- 1 | # configure.ac -- Autoconf script for gps lbs-core 2 | # 3 | # Process this file with autoconf to produce a configure script 4 | 5 | # Requires autoconf tool later than 2.61 6 | AC_PREREQ(2.61) 7 | # Initialize the gps lbs-core package version 1.0.0 8 | AC_INIT([gnsspps],1.0.0) 9 | # Does not strictly follow GNU Coding standards 10 | AM_INIT_AUTOMAKE([foreign]) 11 | # Disables auto rebuilding of configure, Makefile.ins 12 | AM_MAINTAINER_MODE 13 | # Verifies the --srcdir is correct by checking for the path 14 | AC_CONFIG_SRCDIR([Makefile.am]) 15 | # defines some macros variable to be included by source 16 | AC_CONFIG_HEADERS([config.h]) 17 | AC_CONFIG_MACRO_DIR([m4]) 18 | 19 | # Checks for programs. 20 | AC_PROG_LIBTOOL 21 | AC_PROG_CXX 22 | AC_PROG_CC 23 | AM_PROG_CC_C_O 24 | AC_PROG_AWK 25 | AC_PROG_CPP 26 | AC_PROG_INSTALL 27 | AC_PROG_LN_S 28 | AC_PROG_MAKE_SET 29 | PKG_PROG_PKG_CONFIG 30 | 31 | # Checks for libraries. 32 | PKG_CHECK_MODULES([GPSUTILS], [gps-utils]) 33 | AC_SUBST([GPSUTILS_CFLAGS]) 34 | AC_SUBST([GPSUTILS_LIBS]) 35 | 36 | AC_ARG_WITH([locpla_includes], 37 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 38 | [Specify the path to locpla-includes in loc-pla_git.bb]), 39 | [locpla_incdir=$withval], 40 | with_locpla_includes=no) 41 | 42 | if test "x${with_locpla_includes}" != "xno"; then 43 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 44 | fi 45 | 46 | AC_ARG_WITH([glib], 47 | AC_HELP_STRING([--with-glib], 48 | [enable glib, building HLOS systems which use glib])) 49 | 50 | if (test "x${with_glib}" = "xyes"); then 51 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 52 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 53 | AC_MSG_ERROR(GThread >= 2.16 is required)) 54 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 55 | AC_MSG_ERROR(GLib >= 2.16 is required)) 56 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 57 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 58 | 59 | AC_SUBST(GLIB_CFLAGS) 60 | AC_SUBST(GLIB_LIBS) 61 | fi 62 | 63 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 64 | 65 | AC_CONFIG_FILES([ \ 66 | Makefile \ 67 | gnsspps.pc 68 | ]) 69 | 70 | AC_OUTPUT 71 | -------------------------------------------------------------------------------- /overlay/packages/services/Telecomm/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 32 | 34 | 35 | 36 | true 37 | 39 | 40 | -------------------------------------------------------------------------------- /lineagehw/touch/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019,2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "vendor.lineage.touch@1.0-service.oneplus3" 18 | 19 | #include 20 | #include 21 | 22 | #include "KeyDisabler.h" 23 | #include "KeySwapper.h" 24 | #include "TouchscreenGesture.h" 25 | 26 | using ::android::OK; 27 | using ::android::sp; 28 | 29 | using ::vendor::lineage::touch::V1_0::IKeyDisabler; 30 | using ::vendor::lineage::touch::V1_0::IKeySwapper; 31 | using ::vendor::lineage::touch::V1_0::ITouchscreenGesture; 32 | using ::vendor::lineage::touch::V1_0::implementation::KeyDisabler; 33 | using ::vendor::lineage::touch::V1_0::implementation::KeySwapper; 34 | using ::vendor::lineage::touch::V1_0::implementation::TouchscreenGesture; 35 | 36 | int main() { 37 | sp gesture_service = new TouchscreenGesture(); 38 | sp key_disabler = new KeyDisabler(); 39 | sp key_swapper = new KeySwapper(); 40 | 41 | android::hardware::configureRpcThreadpool(1, true /*callerWillJoin*/); 42 | 43 | if (gesture_service->registerAsService() != OK) { 44 | LOG(ERROR) << "Cannot register touchscreen gesture HAL service."; 45 | return 1; 46 | } 47 | 48 | if (key_disabler->registerAsService() != OK) { 49 | LOG(ERROR) << "Cannot register keydisabler HAL service."; 50 | return 1; 51 | } 52 | 53 | if (key_swapper->registerAsService() != OK) { 54 | LOG(ERROR) << "Cannot register keyswapper HAL service."; 55 | return 1; 56 | } 57 | 58 | LOG(INFO) << "Touchscreen HAL service ready."; 59 | 60 | android::hardware::joinRpcThreadpool(); 61 | 62 | LOG(ERROR) << "Touchscreen HAL service failed to join thread pool."; 63 | return 1; 64 | } 65 | -------------------------------------------------------------------------------- /rootdir/etc/init.qti.ims.sh: -------------------------------------------------------------------------------- 1 | #! /vendor/bin/sh 2 | 3 | # Copyright (c) 2014, The Linux Foundation. All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are 7 | # met: 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # * Redistributions in binary form must reproduce the above 11 | # copyright notice, this list of conditions and the following 12 | # disclaimer in the documentation and/or other materials provided 13 | # with the distribution. 14 | # * Neither the name of The Linux Foundation nor the names of its 15 | # contributors may be used to endorse or promote products derived 16 | # from this software without specific prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 19 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 25 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 27 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 28 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | # 30 | # 31 | 32 | dir0=/data 33 | trigger_file=$dir0/ims_disabled 34 | ims_disabled=`getprop persist.vendor.ims.disabled` 35 | target=`getprop ro.build.product` 36 | 37 | #if [ ! -e $trigger_file ]; then 38 | # for future use in doing conditional debugging 39 | #else 40 | # 41 | #fi 42 | echo "$ims_disabled" 43 | echo "$target" 44 | 45 | if [ "$ims_disabled" = "0" ]; then 46 | echo "ims will be enabled" 47 | setprop vendor.service.qti.ims.enabled 1 48 | exit 49 | fi 50 | 51 | if [ "$ims_disabled" = "1" ] || [ "$target" = "msm8909_512" ]; then 52 | echo "ims is disabled" 53 | setprop vendor.service.qti.ims.enabled 0 54 | else 55 | echo "ims is enabled" 56 | setprop vendor.service.qti.ims.enabled 1 57 | fi 58 | -------------------------------------------------------------------------------- /gps/core/data-items/DataItemsFactoryProxy.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2017, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation, nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | */ 29 | 30 | #ifndef __DATAITEMFACTORYBASE__ 31 | #define __DATAITEMFACTORYBASE__ 32 | 33 | #include 34 | #include 35 | 36 | namespace loc_core 37 | { 38 | 39 | #define DATA_ITEMS_LIB_NAME "libdataitems.so" 40 | #define DATA_ITEMS_GET_CONCRETE_DI "getConcreteDataItem" 41 | 42 | typedef IDataItemCore * (get_concrete_data_item_fn)(DataItemId); 43 | 44 | class DataItemsFactoryProxy { 45 | public: 46 | static IDataItemCore* createNewDataItem(DataItemId id); 47 | static void closeDataItemLibraryHandle(); 48 | static void *dataItemLibHandle; 49 | static get_concrete_data_item_fn *getConcreteDIFunc; 50 | }; 51 | 52 | } // namespace loc_core 53 | 54 | #endif //__DATAITEMFACTORYBASE__ 55 | 56 | -------------------------------------------------------------------------------- /DeviceSettings/src/com/aosip/device/DeviceSettings/DeviceSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The OmniROM Project 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | */ 18 | package com.aosip.device.DeviceSettings; 19 | 20 | import android.app.Activity; 21 | import android.app.AlertDialog; 22 | import android.app.Dialog; 23 | import android.app.DialogFragment; 24 | import android.app.Fragment; 25 | import android.content.DialogInterface; 26 | import android.os.Bundle; 27 | import android.view.Menu; 28 | import android.view.MenuInflater; 29 | import android.view.MenuItem; 30 | import androidx.preference.PreferenceFragment; 31 | import androidx.preference.PreferenceManager; 32 | 33 | public class DeviceSettingsActivity extends Activity { 34 | 35 | private DeviceSettings mDeviceSettingsFragment; 36 | 37 | @Override 38 | protected void onCreate(Bundle savedInstanceState) { 39 | super.onCreate(savedInstanceState); 40 | 41 | getActionBar().setDisplayHomeAsUpEnabled(true); 42 | 43 | Fragment fragment = getFragmentManager().findFragmentById(android.R.id.content); 44 | if (fragment == null) { 45 | mDeviceSettingsFragment = new DeviceSettings(); 46 | getFragmentManager().beginTransaction() 47 | .add(android.R.id.content, mDeviceSettingsFragment) 48 | .commit(); 49 | } else { 50 | mDeviceSettingsFragment = (DeviceSettings) fragment; 51 | } 52 | } 53 | 54 | @Override 55 | public boolean onOptionsItemSelected(MenuItem item) { 56 | switch (item.getItemId()) { 57 | case android.R.id.home: 58 | finish(); 59 | return true; 60 | default: 61 | break; 62 | } 63 | return super.onOptionsItemSelected(item); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /doze/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | 47 | 48 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /update-sha1sums.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright (C) 2016 The CyanogenMod Project 4 | # Copyright (C) 2017-2020 The MSM-Xtended Project 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # http://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | from hashlib import sha1 20 | import sys 21 | 22 | device='oneplus3' 23 | vendor='oneplus' 24 | 25 | lines = [ line for line in open('proprietary-files.txt', 'r') ] 26 | vendorPath = '../../../vendor/' + vendor + '/' + device + '/proprietary' 27 | needSHA1 = False 28 | 29 | def cleanup(): 30 | for index, line in enumerate(lines): 31 | # Remove '\n' character 32 | line = line[:-1] 33 | 34 | # Skip empty or commented lines 35 | if len(line) == 0 or line[0] == '#': 36 | continue 37 | 38 | # Drop SHA1 hash, if existing 39 | if '|' in line: 40 | line = line.split('|')[0] 41 | lines[index] = '%s\n' % (line) 42 | 43 | def update(): 44 | for index, line in enumerate(lines): 45 | # Remove '\n' character 46 | line = line[:-1] 47 | 48 | # Skip empty lines 49 | if len(line) == 0: 50 | continue 51 | 52 | # Check if we need to set SHA1 hash for the next files 53 | if line[0] == '#': 54 | needSHA1 = (' - from' in line) 55 | continue 56 | 57 | if needSHA1: 58 | # Remove existing SHA1 hash 59 | line = line.split('|')[0] 60 | filePath = line.split(':')[1] if len(line.split(':')) == 2 else line 61 | 62 | if filePath[0] == '-': 63 | file = open('%s/%s' % (vendorPath, filePath[1:]), 'rb').read() 64 | else: 65 | file = open('%s/%s' % (vendorPath, filePath), 'rb').read() 66 | 67 | hash = sha1(file).hexdigest() 68 | lines[index] = '%s|%s\n' % (line, hash) 69 | 70 | if len(sys.argv) == 2 and sys.argv[1] == '-c': 71 | cleanup() 72 | else: 73 | update() 74 | 75 | with open('proprietary-files.txt', 'w') as file: 76 | for line in lines: 77 | file.write(line) 78 | 79 | file.close() 80 | -------------------------------------------------------------------------------- /doze/res/xml/doze_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 26 | 27 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /gps/CleanSpec.mk: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2007 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | # If you don't need to do a full clean build but would like to touch 17 | # a file or delete some intermediate files, add a clean step to the end 18 | # of the list. These steps will only be run once, if they haven't been 19 | # run before. 20 | # 21 | # E.g.: 22 | # $(call add-clean-step, touch -c external/sqlite/sqlite3.h) 23 | # $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates) 24 | # 25 | # Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with 26 | # files that are missing or have been moved. 27 | # 28 | # Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. 29 | # Use $(OUT_DIR) to refer to the "out" directory. 30 | # 31 | # If you need to re-do something that's already mentioned, just copy 32 | # the command and add it to the bottom of the list. E.g., if a change 33 | # that you made last week required touching a file and a change you 34 | # made today requires touching the same file, just copy the old 35 | # touch step and add it to the end of the list. 36 | # 37 | # ************************************************ 38 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 39 | # ************************************************ 40 | 41 | # For example: 42 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) 43 | #$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) 44 | #$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) 45 | #$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) 46 | 47 | # ************************************************ 48 | # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST 49 | # ************************************************ 50 | $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libloc_api*) 51 | -------------------------------------------------------------------------------- /vr/vr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "VrHALImpl" 18 | 19 | #include 20 | #include 21 | 22 | #include 23 | #include 24 | 25 | static void restart_thermal_engine() { 26 | if (property_set("ctl.restart", "thermal-engine")) { 27 | ALOGE("%s: couldn't set a system property, " 28 | "ctl.restart.", __FUNCTION__); 29 | } 30 | } 31 | 32 | static void vr_init(struct vr_module *module) { 33 | // NOOP 34 | } 35 | 36 | static void vr_set_vr_mode(struct vr_module *module, bool enabled) { 37 | if (enabled) { 38 | if (property_set("sys.qcom.thermalcfg", "/vendor/etc/thermal-engine-vr.conf")) { 39 | ALOGE("%s: couldn't set a system property, " 40 | "sys.qcom.thermalcfg.", __FUNCTION__); 41 | } 42 | } else { 43 | if (property_set("sys.qcom.thermalcfg", "/vendor/etc/thermal-engine.conf")) { 44 | ALOGE("%s: couldn't set a system property, " 45 | "sys.qcom.thermalcfg.", __FUNCTION__); 46 | } 47 | } 48 | restart_thermal_engine(); 49 | } 50 | 51 | static struct hw_module_methods_t vr_module_methods = { 52 | .open = NULL, // There are no devices for this HAL interface. 53 | }; 54 | 55 | 56 | vr_module_t HAL_MODULE_INFO_SYM = { 57 | .common = { 58 | .tag = HARDWARE_MODULE_TAG, 59 | .module_api_version = VR_MODULE_API_VERSION_1_0, 60 | .hal_api_version = HARDWARE_HAL_API_VERSION, 61 | .id = VR_HARDWARE_MODULE_ID, 62 | .name = "OnePlus 3 VR HAL", 63 | .author = "The Android Open Source Project", 64 | .methods = &vr_module_methods, 65 | }, 66 | 67 | .init = vr_init, 68 | .set_vr_mode = vr_set_vr_mode, 69 | }; 70 | -------------------------------------------------------------------------------- /gps/android/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := android.hardware.gnss@1.0-impl-qti 5 | LOCAL_VENDOR_MODULE := true 6 | LOCAL_MODULE_RELATIVE_PATH := hw 7 | LOCAL_SRC_FILES := \ 8 | AGnss.cpp \ 9 | Gnss.cpp \ 10 | GnssBatching.cpp \ 11 | GnssGeofencing.cpp \ 12 | GnssMeasurement.cpp \ 13 | GnssNi.cpp \ 14 | GnssConfiguration.cpp \ 15 | GnssDebug.cpp \ 16 | AGnssRil.cpp 17 | 18 | LOCAL_SRC_FILES += \ 19 | location_api/LocationUtil.cpp \ 20 | location_api/GnssAPIClient.cpp \ 21 | location_api/GeofenceAPIClient.cpp \ 22 | location_api/BatchingAPIClient.cpp \ 23 | location_api/MeasurementAPIClient.cpp \ 24 | 25 | LOCAL_C_INCLUDES:= \ 26 | $(LOCAL_PATH)/location_api 27 | LOCAL_HEADER_LIBRARIES := \ 28 | libgps.utils_headers \ 29 | libloc_core_headers \ 30 | libloc_pla_headers \ 31 | liblocation_api_headers 32 | 33 | LOCAL_SHARED_LIBRARIES := \ 34 | liblog \ 35 | libhidlbase \ 36 | libhidltransport \ 37 | libhwbinder \ 38 | libcutils \ 39 | libutils \ 40 | android.hardware.gnss@1.0 \ 41 | 42 | LOCAL_SHARED_LIBRARIES += \ 43 | libloc_core \ 44 | libgps.utils \ 45 | libdl \ 46 | liblocation_api \ 47 | 48 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 49 | include $(BUILD_SHARED_LIBRARY) 50 | 51 | BUILD_GNSS_HIDL_SERVICE := true 52 | ifneq ($(BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET), true) 53 | ifneq ($(LW_FEATURE_SET),true) 54 | BUILD_GNSS_HIDL_SERVICE := false 55 | endif # LW_FEATURE_SET 56 | endif # BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET 57 | 58 | ifeq ($(BUILD_GNSS_HIDL_SERVICE), true) 59 | include $(CLEAR_VARS) 60 | LOCAL_MODULE := android.hardware.gnss@1.0-service-qti 61 | LOCAL_VENDOR_MODULE := true 62 | LOCAL_MODULE_RELATIVE_PATH := hw 63 | LOCAL_INIT_RC := android.hardware.gnss@1.0-service-qti.rc 64 | LOCAL_SRC_FILES := \ 65 | service.cpp \ 66 | 67 | LOCAL_C_INCLUDES:= \ 68 | $(LOCAL_PATH)/location_api 69 | LOCAL_HEADER_LIBRARIES := \ 70 | libgps.utils_headers \ 71 | libloc_core_headers \ 72 | libloc_pla_headers \ 73 | liblocation_api_headers 74 | 75 | 76 | LOCAL_SHARED_LIBRARIES := \ 77 | liblog \ 78 | libcutils \ 79 | libdl \ 80 | libbase \ 81 | libutils \ 82 | 83 | LOCAL_SHARED_LIBRARIES += \ 84 | libhwbinder \ 85 | libhidlbase \ 86 | libhidltransport \ 87 | android.hardware.gnss@1.0 \ 88 | 89 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 90 | include $(BUILD_EXECUTABLE) 91 | endif # BUILD_GNSS_HIDL_SERVICE 92 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc311-mnc480/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 33 | 34 | 37 | true 38 | 39 | 42 | 6 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /gps/android/GnssConfiguration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | 6 | /* Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | 22 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H 23 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H 24 | 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V1_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V1_0::IGnssConfiguration; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | /* 42 | * Interface for passing GNSS configuration info from platform to HAL. 43 | */ 44 | struct Gnss; 45 | struct GnssConfiguration : public IGnssConfiguration { 46 | GnssConfiguration(Gnss* gnss); 47 | ~GnssConfiguration() = default; 48 | 49 | /* 50 | * Methods from ::android::hardware::gnss::V1_0::IGnssConfiguration follow. 51 | * These declarations were generated from IGnssConfiguration.hal. 52 | */ 53 | Return setSuplVersion(uint32_t version) override; 54 | Return setSuplMode(uint8_t mode) override; 55 | Return setSuplEs(bool enabled) override; 56 | Return setLppProfile(uint8_t lppProfile) override; 57 | Return setGlonassPositioningProtocol(uint8_t protocol) override; 58 | Return setEmergencySuplPdn(bool enable) override; 59 | Return setGpsLock(uint8_t lock) override; 60 | 61 | private: 62 | Gnss* mGnss = nullptr; 63 | }; 64 | 65 | } // namespace implementation 66 | } // namespace V1_0 67 | } // namespace gnss 68 | } // namespace hardware 69 | } // namespace android 70 | 71 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSCONFIGURATION_H 72 | -------------------------------------------------------------------------------- /overlay-pe/frameworks/base/core/res/res/values/custom_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 23 | 24 | /system/priv-app/DeviceSettings/DeviceSettings.apk 25 | /system/system_ext/priv-app/TouchGestures/TouchGestures.apk 26 | 27 | 28 | 29 | 30 | com.aosip.device.DeviceSettings.KeyHandler 31 | com.android.touch.gestures.KeyHandler 32 | 33 | 34 | 35 | true 36 | 37 | 40 | true 41 | 100 42 | true 43 | 44 | 45 | /sys/class/power_supply/battery/fastchg_status 46 | 47 | 52 | 2 53 | 54 | -------------------------------------------------------------------------------- /gps/android/GnssNi.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H 22 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H 23 | 24 | #include 25 | #include 26 | 27 | namespace android { 28 | namespace hardware { 29 | namespace gnss { 30 | namespace V1_0 { 31 | namespace implementation { 32 | 33 | using ::android::hardware::gnss::V1_0::IGnssNi; 34 | using ::android::hardware::gnss::V1_0::IGnssNiCallback; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | struct Gnss; 42 | struct GnssNi : public IGnssNi { 43 | GnssNi(Gnss* gnss); 44 | ~GnssNi() = default; 45 | 46 | /* 47 | * Methods from ::android::hardware::gnss::V1_0::IGnssNi follow. 48 | * These declarations were generated from IGnssNi.hal. 49 | */ 50 | Return setCallback(const sp& callback) override; 51 | Return respond(int32_t notifId, 52 | IGnssNiCallback::GnssUserResponseType userResponse) override; 53 | 54 | private: 55 | struct GnssNiDeathRecipient : hidl_death_recipient { 56 | GnssNiDeathRecipient(sp gnssNi) : mGnssNi(gnssNi) { 57 | } 58 | ~GnssNiDeathRecipient() = default; 59 | virtual void serviceDied(uint64_t cookie, const wp& who) override; 60 | sp mGnssNi; 61 | }; 62 | 63 | private: 64 | sp mGnssNiDeathRecipient = nullptr; 65 | sp mGnssNiCbIface = nullptr; 66 | Gnss* mGnss = nullptr; 67 | }; 68 | 69 | } // namespace implementation 70 | } // namespace V1_0 71 | } // namespace gnss 72 | } // namespace hardware 73 | } // namespace android 74 | 75 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSNI_H 76 | -------------------------------------------------------------------------------- /gps/pla/android/loc_pla.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014, The Linux Foundation. All rights reserved. 2 | * 3 | * Redistribution and use in source and binary forms, with or without 4 | * modification, are permitted provided that the following conditions are 5 | * met: 6 | * * Redistributions of source code must retain the above copyright 7 | * notice, this list of conditions and the following disclaimer. 8 | * * Redistributions in binary form must reproduce the above 9 | * copyright notice, this list of conditions and the following 10 | * disclaimer in the documentation and/or other materials provided 11 | * with the distribution. 12 | * * Neither the name of The Linux Foundation nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef __LOC_PLA__ 30 | #define __LOC_PLA__ 31 | 32 | #ifdef __cplusplus 33 | #include 34 | #define uptimeMillis android::uptimeMillis 35 | #endif 36 | 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | #include 42 | #include 43 | #include 44 | 45 | #define LOC_PATH_GPS_CONF_STR "/vendor/etc/gps.conf" 46 | #define LOC_PATH_IZAT_CONF_STR "/vendor/etc/izat.conf" 47 | #define LOC_PATH_FLP_CONF_STR "/vendor/etc/flp.conf" 48 | #define LOC_PATH_LOWI_CONF_STR "/vendor/etc/lowi.conf" 49 | #define LOC_PATH_SAP_CONF_STR "/vendor/etc/sap.conf" 50 | #define LOC_PATH_APDR_CONF_STR "/vendor/etc/apdr.conf" 51 | #define LOC_PATH_XTWIFI_CONF_STR "/vendor/etc/xtwifi.conf" 52 | #define LOC_PATH_QUIPC_CONF_STR "/vendor/etc/quipc.conf" 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif /*__cplusplus */ 57 | 58 | #endif /* __LOC_PLA__ */ 59 | -------------------------------------------------------------------------------- /liblight/android.hardware.light@2.0-service.oneplus3.rc: -------------------------------------------------------------------------------- 1 | on init 2 | # RGB lights 3 | chown system system /sys/class/leds/red/pause_lo 4 | chown system system /sys/class/leds/blue/pause_lo 5 | chown system system /sys/class/leds/green/pause_lo 6 | chmod 660 /sys/class/leds/red/pause_lo 7 | chmod 660 /sys/class/leds/blue/pause_lo 8 | chmod 660 /sys/class/leds/green/pause_lo 9 | 10 | chown system system /sys/class/leds/red/pause_hi 11 | chown system system /sys/class/leds/blue/pause_hi 12 | chown system system /sys/class/leds/green/pause_hi 13 | chmod 660 /sys/class/leds/red/pause_hi 14 | chmod 660 /sys/class/leds/blue/pause_hi 15 | chmod 660 /sys/class/leds/green/pause_hi 16 | 17 | chown system system /sys/class/leds/red/blink 18 | chown system system /sys/class/leds/blue/blink 19 | chown system system /sys/class/leds/green/blink 20 | chmod 660 /sys/class/leds/red/blink 21 | chmod 660 /sys/class/leds/blue/blink 22 | chmod 660 /sys/class/leds/green/blink 23 | 24 | chown system system /sys/class/leds/rgb/rgb_blink 25 | chmod 660 /sys/class/leds/rgb/rgb_blink 26 | 27 | chown system system /sys/class/leds/red/ramp_step_ms 28 | chown system system /sys/class/leds/blue/ramp_step_ms 29 | chown system system /sys/class/leds/green/ramp_step_ms 30 | chmod 660 /sys/class/leds/red/ramp_step_ms 31 | chmod 660 /sys/class/leds/green/ramp_step_ms 32 | chmod 660 /sys/class/leds/blue/ramp_step_ms 33 | 34 | chown system system /sys/class/leds/red/duty_pcts 35 | chown system system /sys/class/leds/blue/duty_pcts 36 | chown system system /sys/class/leds/green/duty_pcts 37 | chmod 660 /sys/class/leds/red/duty_pcts 38 | chmod 660 /sys/class/leds/green/duty_pcts 39 | chmod 660 /sys/class/leds/blue/duty_pcts 40 | 41 | chown system system /sys/class/leds/red/start_idx 42 | chown system system /sys/class/leds/blue/start_idx 43 | chown system system /sys/class/leds/green/start_idx 44 | chmod 660 /sys/class/leds/red/start_idx 45 | chmod 660 /sys/class/leds/green/start_idx 46 | chmod 660 /sys/class/leds/blue/start_idx 47 | 48 | # Button backlight permissions 49 | chown system system /sys/class/leds/button-backlight/brightness 50 | chmod 660 /sys/class/leds/button-backlight/brightness 51 | 52 | service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.oneplus3 53 | interface android.hardware.light@2.0::ILight default 54 | class hal 55 | user system 56 | group system 57 | # shutting off lights while powering-off 58 | shutdown critical 59 | writepid /dev/cpuset/system-background/tasks 60 | -------------------------------------------------------------------------------- /gps/utils/configure.ac: -------------------------------------------------------------------------------- 1 | # configure.ac -- Autoconf script for gps gps-utils 2 | # 3 | # Process this file with autoconf to produce a configure script 4 | 5 | # Requires autoconf tool later than 2.61 6 | AC_PREREQ(2.61) 7 | # Initialize the gps gps-utils package version 1.0.0 8 | AC_INIT([gps-utils],1.0.0) 9 | # Does not strictly follow GNU Coding standards 10 | AM_INIT_AUTOMAKE([foreign]) 11 | # Disables auto rebuilding of configure, Makefile.ins 12 | AM_MAINTAINER_MODE 13 | # Verifies the --srcdir is correct by checking for the path 14 | AC_CONFIG_SRCDIR([Makefile.am]) 15 | # defines some macros variable to be included by source 16 | AC_CONFIG_HEADERS([config.h]) 17 | AC_CONFIG_MACRO_DIR([m4]) 18 | 19 | # Checks for programs. 20 | AC_PROG_LIBTOOL 21 | AC_PROG_CXX 22 | AC_PROG_CC 23 | AM_PROG_CC_C_O 24 | AC_PROG_AWK 25 | AC_PROG_CPP 26 | AC_PROG_INSTALL 27 | AC_PROG_LN_S 28 | AC_PROG_MAKE_SET 29 | PKG_PROG_PKG_CONFIG 30 | 31 | # Checks for libraries. 32 | PKG_CHECK_MODULES([CUTILS], [libcutils]) 33 | AC_SUBST([CUTILS_CFLAGS]) 34 | AC_SUBST([CUTILS_LIBS]) 35 | 36 | AC_ARG_WITH([core_includes], 37 | AC_HELP_STRING([--with-core-includes=@<:@dir@:>@], 38 | [Specify the location of the core headers]), 39 | [core_incdir=$withval], 40 | with_core_includes=no) 41 | 42 | if test "x$with_core_includes" != "xno"; then 43 | CPPFLAGS="${CPPFLAGS} -I${core_incdir}" 44 | fi 45 | 46 | AC_ARG_WITH([locpla_includes], 47 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 48 | [specify the path to locpla-includes in loc-pla_git.bb]), 49 | [locpla_incdir=$withval], 50 | with_locpla_includes=no) 51 | 52 | if test "x$with_locpla_includes" != "xno"; then 53 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 54 | fi 55 | 56 | AC_SUBST([CPPFLAGS]) 57 | 58 | AC_ARG_WITH([glib], 59 | AC_HELP_STRING([--with-glib], 60 | [enable glib, building HLOS systems which use glib])) 61 | 62 | if (test "x${with_glib}" = "xyes"); then 63 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 64 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 65 | AC_MSG_ERROR(GThread >= 2.16 is required)) 66 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 67 | AC_MSG_ERROR(GLib >= 2.16 is required)) 68 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 69 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 70 | 71 | AC_SUBST(GLIB_CFLAGS) 72 | AC_SUBST(GLIB_LIBS) 73 | fi 74 | 75 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 76 | 77 | AC_CONFIG_FILES([ \ 78 | Makefile \ 79 | gps-utils.pc 80 | ]) 81 | 82 | AC_OUTPUT 83 | -------------------------------------------------------------------------------- /DeviceSettings/src/com/aosip/device/DeviceSettings/SystemSettingsStore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 AICP 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.aosip.device.DeviceSettings; 18 | 19 | import android.content.ContentResolver; 20 | import android.preference.PreferenceDataStore; 21 | import android.provider.Settings; 22 | 23 | public class SystemSettingsStore extends androidx.preference.PreferenceDataStore 24 | implements PreferenceDataStore { 25 | 26 | private ContentResolver mContentResolver; 27 | 28 | public SystemSettingsStore(ContentResolver contentResolver) { 29 | mContentResolver = contentResolver; 30 | } 31 | 32 | public boolean getBoolean(String key, boolean defValue) { 33 | return getInt(key, defValue ? 1 : 0) != 0; 34 | } 35 | 36 | public float getFloat(String key, float defValue) { 37 | return Settings.System.getFloat(mContentResolver, key, defValue); 38 | } 39 | 40 | public int getInt(String key, int defValue) { 41 | return Settings.System.getInt(mContentResolver, key, defValue); 42 | } 43 | 44 | public long getLong(String key, long defValue) { 45 | return Settings.System.getLong(mContentResolver, key, defValue); 46 | } 47 | 48 | public String getString(String key, String defValue) { 49 | String result = Settings.System.getString(mContentResolver, key); 50 | return result == null ? defValue : result; 51 | } 52 | 53 | public void putBoolean(String key, boolean value) { 54 | putInt(key, value ? 1 : 0); 55 | } 56 | 57 | public void putFloat(String key, float value) { 58 | Settings.System.putFloat(mContentResolver, key, value); 59 | } 60 | 61 | public void putInt(String key, int value) { 62 | Settings.System.putInt(mContentResolver, key, value); 63 | } 64 | 65 | public void putLong(String key, long value) { 66 | Settings.System.putLong(mContentResolver, key, value); 67 | } 68 | 69 | public void putString(String key, String value) { 70 | Settings.System.putString(mContentResolver, key, value); 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /gps/core/configure.ac: -------------------------------------------------------------------------------- 1 | # configure.ac -- Autoconf script for gps loc-core 2 | # 3 | # Process this file with autoconf to produce a configure script 4 | 5 | # Requires autoconf tool later than 2.61 6 | AC_PREREQ(2.61) 7 | # Initialize the gps loc-hal package version 1.0.0 8 | AC_INIT([loc-core],1.0.0) 9 | # Does not strictly follow GNU Coding standards 10 | AM_INIT_AUTOMAKE([foreign]) 11 | # Disables auto rebuilding of configure, Makefile.ins 12 | AM_MAINTAINER_MODE 13 | # Verifies the --srcdir is correct by checking for the path 14 | AC_CONFIG_SRCDIR([loc-core.pc.in]) 15 | # defines some macros variable to be included by source 16 | AC_CONFIG_HEADERS([config.h]) 17 | AC_CONFIG_MACRO_DIR([m4]) 18 | 19 | # Checks for programs. 20 | AC_PROG_LIBTOOL 21 | AC_PROG_CXX 22 | AC_PROG_CC 23 | AM_PROG_CC_C_O 24 | AC_PROG_AWK 25 | AC_PROG_CPP 26 | AC_PROG_INSTALL 27 | AC_PROG_LN_S 28 | AC_PROG_MAKE_SET 29 | PKG_PROG_PKG_CONFIG 30 | 31 | # Checks for libraries. 32 | PKG_CHECK_MODULES([GPSUTILS], [gps-utils]) 33 | AC_SUBST([GPSUTILS_CFLAGS]) 34 | AC_SUBST([GPSUTILS_LIBS]) 35 | 36 | AC_ARG_WITH([core_includes], 37 | AC_HELP_STRING([--with-core-includes=@<:@dir@:>@], 38 | [Specify the location of the core headers]), 39 | [core_incdir=$withval], 40 | with_core_includes=no) 41 | 42 | if test "x$with_core_includes" != "xno"; then 43 | CPPFLAGS="${CPPFLAGS} -I${core_incdir}" 44 | fi 45 | 46 | AC_ARG_WITH([locpla_includes], 47 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 48 | [specify the path to locpla-includes in loc-pla_git.bb]), 49 | [locpla_incdir=$withval], 50 | with_locpla_includes=no) 51 | 52 | if test "x$with_locpla_includes" != "xno"; then 53 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 54 | fi 55 | 56 | AC_SUBST([CPPFLAGS]) 57 | 58 | AC_ARG_WITH([glib], 59 | AC_HELP_STRING([--with-glib], 60 | [enable glib, building HLOS systems which use glib])) 61 | 62 | if (test "x${with_glib}" = "xyes"); then 63 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 64 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 65 | AC_MSG_ERROR(GThread >= 2.16 is required)) 66 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 67 | AC_MSG_ERROR(GLib >= 2.16 is required)) 68 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 69 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 70 | 71 | AC_SUBST(GLIB_CFLAGS) 72 | AC_SUBST(GLIB_LIBS) 73 | fi 74 | 75 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 76 | 77 | AC_CONFIG_FILES([ \ 78 | Makefile \ 79 | loc-core.pc \ 80 | ]) 81 | 82 | AC_OUTPUT 83 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 24 | 1 25 | 26 | 27 | true 28 | 29 | 30 | true 31 | 32 | 35 | true 36 | 37 | 41 | true 42 | 43 | 44 | true 45 | 46 | 47 | org.codeaurora.ims 48 | 49 | 50 | org.codeaurora.ims 51 | 52 | -------------------------------------------------------------------------------- /gps/android/AGnss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_AGNSS_H 22 | #define ANDROID_HARDWARE_GNSS_V1_0_AGNSS_H 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V1_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V1_0::IAGnss; 35 | using ::android::hardware::gnss::V1_0::IAGnssCallback; 36 | using ::android::hardware::Return; 37 | using ::android::hardware::Void; 38 | using ::android::hardware::hidl_vec; 39 | using ::android::hardware::hidl_string; 40 | using ::android::sp; 41 | 42 | struct Gnss; 43 | struct AGnss : public IAGnss { 44 | 45 | AGnss(Gnss* gnss); 46 | ~AGnss(); 47 | /* 48 | * Methods from ::android::hardware::gnss::V1_0::IAGnss interface follow. 49 | * These declarations were generated from IAGnss.hal. 50 | */ 51 | Return setCallback(const sp& callback) override; 52 | 53 | Return dataConnClosed() override; 54 | 55 | Return dataConnFailed() override; 56 | 57 | Return dataConnOpen(const hidl_string& apn, 58 | IAGnss::ApnIpType apnIpType) override; 59 | 60 | Return setServer(IAGnssCallback::AGnssType type, 61 | const hidl_string& hostname, int32_t port) override; 62 | 63 | void statusIpV4Cb(AGnssExtStatusIpV4 status); 64 | 65 | /* Data call setup callback passed down to GNSS HAL implementation */ 66 | static void agnssStatusIpV4Cb(AGnssExtStatusIpV4 status); 67 | 68 | private: 69 | Gnss* mGnss = nullptr; 70 | sp mAGnssCbIface = nullptr; 71 | }; 72 | 73 | } // namespace implementation 74 | } // namespace V1_0 75 | } // namespace gnss 76 | } // namespace hardware 77 | } // namespace android 78 | 79 | #endif // ANDROID_HARDWARE_GNSS_V1_0_AGNSS_H 80 | --------------------------------------------------------------------------------