├── Android.bp ├── configs ├── sensors │ └── hals.conf ├── perf │ ├── perf-profile0.conf │ └── perfconfigstore.xml ├── wifi │ ├── hostapd.deny │ ├── p2p_supplicant_overlay.conf │ ├── hostapd.accept │ └── wpa_supplicant_overlay.conf ├── msm_irqbalance.conf ├── public.libraries.txt ├── idc │ ├── uinput-fpc.idc │ └── uinput-goodix.idc ├── privapp-permission │ ├── privapp-permissions-hotword.xml │ └── privapp-permissions-qti-product.xml ├── keylayout │ ├── uinput-goodix.kl │ └── uinput-fpc.kl ├── audio │ └── audio_tuning_mixer.txt └── component-overrides.xml ├── .clang-format ├── sepolicy ├── public │ └── attributes ├── vendor │ ├── bootanim.te │ ├── platform_app.te │ ├── hwservice.te │ ├── poweroffalarm_app.te │ ├── time_daemon.te │ ├── zygote.te │ ├── webview_zygote.te │ ├── hal_ir_default.te │ ├── rmt_storage.te │ ├── rild.te │ ├── device.te │ ├── radio.te │ ├── hal_sensors_default.te │ ├── ipacm.te │ ├── hal_audio_default.te │ ├── tee.te │ ├── app.te │ ├── property.te │ ├── ueventd.te │ ├── thermal-engine.te │ ├── qti_init_shell.te │ ├── hal_mlipay_default.te │ ├── init.te │ ├── vendor_tinyalse.te │ ├── system_server.te │ ├── init_fingerprint.te │ ├── hal_camera_default.te │ ├── hal_power_default.te │ ├── file.te │ ├── system_app.te │ ├── hwservice_contexts │ ├── vendor_init.te │ └── vendor_toolbox.te └── private │ ├── system_app.te │ ├── system_server.te │ ├── dnsmasq.te │ ├── file_contexts │ ├── property_contexts │ └── folio_daemon.te ├── DeviceDoze ├── proguard.flags ├── res │ ├── drawable │ │ ├── ic_doze.xml │ │ ├── ic_pickup.xml │ │ ├── ic_raise.xml │ │ ├── ic_hand_wave.xml │ │ ├── switchbar_background.xml │ │ └── ic_pocket.xml │ ├── color │ │ ├── switchbar_switch_thumb_tint.xml │ │ ├── switchbar_switch_track_tint.xml │ │ └── switch_bar_bg.xml │ ├── color-night │ │ ├── switchbar_switch_track_tint.xml │ │ └── switchbar_switch_thumb_tint.xml │ └── layout │ │ └── doze.xml ├── Android.mk └── src │ └── com │ └── advanced │ └── settings │ └── doze │ ├── DozeSettingsActivity.java │ ├── BootCompletedReceiver.java │ └── DozeTileService.java ├── DeviceSettings ├── proguard.flags ├── res │ ├── drawable │ │ ├── preview.jpg │ │ ├── action_reset.xml │ │ ├── ic_headphone.xml │ │ ├── ic_doze.xml │ │ ├── ic_device.xml │ │ ├── ic_mic.xml │ │ ├── ic_flip.xml │ │ ├── ic_thermal.xml │ │ ├── thermal_balance.xml │ │ ├── action_presets.xml │ │ ├── ic_color.xml │ │ ├── ic_fps_info.xml │ │ └── ic_jason.xml │ ├── menu │ │ └── menu_reset.xml │ ├── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ └── styles.xml │ ├── layout │ │ ├── activity_kcal.xml │ │ └── custom_seekbar_preference_dialog.xml │ └── values-es-rMX │ │ └── strings.xml ├── src │ └── org │ │ └── lineageos │ │ └── settings │ │ └── device │ │ ├── preferences │ │ ├── NotificationLedSeekBarPreference.java │ │ ├── SecureSettingCustomSeekBarPreference.java │ │ └── VibrationSeekBarPreference.java │ │ ├── PerformanceTileService.java │ │ └── DeviceSettingsActivity.java └── Android.mk ├── data-ipa-cfg-mgr ├── Makefile.am ├── ipacm │ └── src │ │ ├── mobileap_firewall.xml │ │ ├── Makefile.am │ │ └── ipacm.rc ├── ipanat │ ├── test │ │ ├── README.txt │ │ ├── Makefile.am │ │ └── Android.mk │ └── src │ │ ├── Makefile.am │ │ ├── Android.mk │ │ └── ipa_nat_logi.c ├── hal │ └── Android.mk └── configure.ac ├── ims └── Android.bp ├── usb ├── android.hardware.usb@1.0-service.xiaomi_sdm660.rc ├── Android.bp ├── Usb.h └── service.cpp ├── seccomp ├── mediaextractor-seccomp.policy └── mediacodec-seccomp.policy ├── gps ├── android │ ├── 1.0 │ │ ├── android.hardware.gnss@1.0-service-qti.rc │ │ ├── android.hardware.gnss@1.0-service-qti.xml │ │ └── GnssDebug.h │ ├── 1.1 │ │ ├── android.hardware.gnss@1.1-service-qti.rc │ │ ├── android.hardware.gnss@1.1-service-qti.xml │ │ └── GnssDebug.h │ ├── 2.0 │ │ ├── android.hardware.gnss@2.0-service-qti.rc │ │ ├── android.hardware.gnss@2.0-service-qti.xml │ │ └── GnssDebug.h │ ├── Android.mk │ └── utils │ │ ├── Android.mk │ │ └── battery_listener.h ├── Android.mk ├── Makefile.am ├── gps_vendor_board.mk ├── core │ ├── loc-core.pc.in │ └── Android.mk ├── utils │ ├── gps-utils.pc.in │ ├── Android.mk │ └── Makefile.am ├── location │ ├── location-api.pc.in │ ├── Android.mk │ └── Makefile.am ├── batching │ ├── location-batching.pc.in │ ├── Android.mk │ └── Makefile.am ├── geofence │ ├── location-geofence.pc.in │ ├── Android.mk │ ├── Makefile.am │ └── configure.ac ├── loc-hal.pc.in ├── gps_vendor_product.mk ├── pla │ └── Android.mk ├── etc │ └── lowi.conf └── gnss │ ├── Makefile.am │ └── Android.mk ├── rro_overlays ├── WifiOverlay │ ├── Android.bp │ └── AndroidManifest.xml └── TetheringOverlay │ ├── AndroidManifest.xml │ └── Android.bp ├── power-libperfmgr ├── libperfmgr │ ├── TEST_MAPPING │ └── include │ │ └── perfmgr │ │ ├── PropertyNode.h │ │ └── FileNode.h ├── hidl │ ├── android.hardware.power@1.3-service.xiaomi_sdm660.xml │ ├── android.hardware.power@1.3-service.xiaomi_sdm660-libperfmgr.rc │ └── service.cpp └── Android.bp ├── rootdir ├── etc │ ├── init.recovery.qcom.rc │ └── init.safailnet.rc └── bin │ ├── init.goodix.sh │ └── init.qcom.early_boot.sh ├── org.ifaa.android.manager ├── src │ └── org │ │ └── ifaa │ │ └── android │ │ └── manager │ │ ├── IFAAManagerV2.java │ │ ├── IFAAManagerV4.java │ │ ├── IFAAManagerFactory.java │ │ ├── IIFAAService.aidl │ │ └── IFAAManagerV3.java └── Android.bp ├── folio_daemon └── Android.bp ├── RemovePackages └── Android.mk ├── libshims ├── camera_sdm660_shim.cpp ├── Android.bp └── libcutils_shim │ └── jstring.h ├── overlay ├── packages │ ├── apps │ │ ├── DocumentsUI │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── config.xml │ │ ├── Settings │ │ │ └── res │ │ │ │ └── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── styles.xml │ │ │ │ └── arrays.xml │ │ └── Snap │ │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ └── services │ │ ├── Telecomm │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ │ └── Telephony │ │ └── res │ │ └── values │ │ └── config.xml └── frameworks │ └── base │ ├── packages │ ├── SystemUI │ │ └── res │ │ │ ├── values-sw600dp │ │ │ └── dimens.xml │ │ │ └── values │ │ │ ├── dimens.xml │ │ │ └── config.xml │ ├── SettingsLib │ │ └── res │ │ │ └── values │ │ │ └── arrays.xml │ └── SettingsProvider │ │ └── res │ │ └── values │ │ └── defaults.xml │ └── core │ └── res │ └── res │ ├── values │ ├── colors_device_defaults.xml │ └── strings.xml │ ├── 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 ├── overlay-lineage └── frameworks │ └── base │ └── packages │ └── SystemUI │ └── res │ └── values │ └── config.xml ├── init └── Android.bp ├── libhidl └── Android.mk ├── light ├── Android.bp └── service.cpp ├── overlay-evo ├── frameworks │ └── base │ │ └── packages │ │ └── SystemUI │ │ └── res │ │ └── values │ │ └── evolution_config.xml └── packages │ └── apps │ └── Settings │ └── res │ └── values │ └── evolution_config.xml ├── README.md ├── biometrics ├── Android.bp └── service.cpp ├── vndk ├── vndk-ext-libs.mk └── Android.mk ├── framework_manifest.xml └── bluetooth └── bdroid_buildcfg.h /Android.bp: -------------------------------------------------------------------------------- 1 | soong_namespace { 2 | } 3 | -------------------------------------------------------------------------------- /configs/sensors/hals.conf: -------------------------------------------------------------------------------- 1 | sensors.ssc.so 2 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | ../../../build/soong/scripts/system-clang-format -------------------------------------------------------------------------------- /sepolicy/public/attributes: -------------------------------------------------------------------------------- 1 | # HALs 2 | hal_attribute(mlipay) 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/bootanim.te: -------------------------------------------------------------------------------- 1 | allow bootanim sysfs_kgsl:dir search; 2 | -------------------------------------------------------------------------------- /sepolicy/private/system_app.te: -------------------------------------------------------------------------------- 1 | hal_client_domain(system_app, hal_mlipay) 2 | -------------------------------------------------------------------------------- /sepolicy/private/system_server.te: -------------------------------------------------------------------------------- 1 | binder_call(system_server, folio_daemon) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/platform_app.te: -------------------------------------------------------------------------------- 1 | allow platform_app sysfs_kgsl:dir search; 2 | -------------------------------------------------------------------------------- /sepolicy/private/dnsmasq.te: -------------------------------------------------------------------------------- 1 | allow dnsmasq netd:unix_stream_socket { getattr }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice.te: -------------------------------------------------------------------------------- 1 | type hal_mlipay_hwservice, hwservice_manager_type; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/poweroffalarm_app.te: -------------------------------------------------------------------------------- 1 | allow poweroffalarm_app cgroup:file write; 2 | -------------------------------------------------------------------------------- /DeviceDoze/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class com.advanced.settings.doze.* { 2 | *; 3 | } 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/time_daemon.te: -------------------------------------------------------------------------------- 1 | allow time_daemon self:capability { setgid setuid }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/zygote.te: -------------------------------------------------------------------------------- 1 | allow zygote exported_camera_prop:file { read write }; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/webview_zygote.te: -------------------------------------------------------------------------------- 1 | allow webview_zygote zygote:unix_dgram_socket write; 2 | -------------------------------------------------------------------------------- /DeviceSettings/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class org.lineageos.settings.device.* { 2 | *; 3 | } 4 | -------------------------------------------------------------------------------- /sepolicy/private/file_contexts: -------------------------------------------------------------------------------- 1 | /system/bin/folio_daemon u:object_r:folio_daemon_exec:s0 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_ir_default.te: -------------------------------------------------------------------------------- 1 | allow hal_ir_default spidev_device:chr_file rw_file_perms; 2 | -------------------------------------------------------------------------------- /configs/perf/perf-profile0.conf: -------------------------------------------------------------------------------- 1 | [priority] # This profile is reserved for perflock requests 2 | 99 3 | -------------------------------------------------------------------------------- /sepolicy/private/property_contexts: -------------------------------------------------------------------------------- 1 | sys.listeners.registered u:object_r:vendor_tee_listener_prop:s0 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/rmt_storage.te: -------------------------------------------------------------------------------- 1 | r_dir_file(rmt_storage, sysfs_data) 2 | r_dir_file(rmt_storage, sysfs_ssr) 3 | -------------------------------------------------------------------------------- /configs/wifi/hostapd.deny: -------------------------------------------------------------------------------- 1 | # List of MAC addresses that are not allowed to authenticate (IEEE 802.11) 2 | # with the AP. 3 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | AUTOMAKE_OPTIONS = foreign 3 | SUBDIRS = ipanat/src ipacm/src/ 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/rild.te: -------------------------------------------------------------------------------- 1 | allow rild qcom_ims_prop:file { getattr open read }; 2 | allow rild vendor_file:file ioctl; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/device.te: -------------------------------------------------------------------------------- 1 | type blkio_dev, dev_type; 2 | type fingerprint_device, dev_type; 3 | type spidev_device, dev_type; 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/radio.te: -------------------------------------------------------------------------------- 1 | allow radio hal_datafactory_hwservice:hwservice_manager find; 2 | binder_call(radio, cnd) 3 | get_prop(radio, qcom_ims_prop) 4 | -------------------------------------------------------------------------------- /configs/wifi/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_no_group_iface=1 3 | p2p_go_intent=14 4 | bss_max_count=400 5 | p2p_search_delay=100 6 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SuperiorOS-Devices/device_xiaomi_lavender-common/eleven/DeviceSettings/res/drawable/preview.jpg -------------------------------------------------------------------------------- /ims/Android.bp: -------------------------------------------------------------------------------- 1 | java_library { 2 | name: "ims-ext-common_system", 3 | installable: true, 4 | static_libs: [ 5 | "ims-ext-common", 6 | ], 7 | } 8 | -------------------------------------------------------------------------------- /usb/android.hardware.usb@1.0-service.xiaomi_sdm660.rc: -------------------------------------------------------------------------------- 1 | service usb-hal-1-0 /vendor/bin/hw/android.hardware.usb@1.0-service.xiaomi_sdm660 2 | class hal 3 | user system 4 | group system 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /configs/msm_irqbalance.conf: -------------------------------------------------------------------------------- 1 | PRIO=1,1,0,0,0,0,0,0 2 | #arch_timer, arm-pmu, arch_mem_timer, mdss, glink-smem-rpm, mpm irqs, kgsl 3 | IGNORED_IRQ=19,22,39,115,200,203,332 4 | #WLAN irqs 5 | BLACKLIST_IRQ=446,455,456 6 | -------------------------------------------------------------------------------- /gps/android/1.0/android.hardware.gnss@1.0-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@1.0-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /gps/android/1.1/android.hardware.gnss@1.1-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@1.1-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /gps/android/2.0/android.hardware.gnss@2.0-service-qti.rc: -------------------------------------------------------------------------------- 1 | service gnss_service /vendor/bin/hw/android.hardware.gnss@2.0-service-qti 2 | class hal 3 | user gps 4 | group system gps radio vendor_qti_diag 5 | -------------------------------------------------------------------------------- /gps/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | LOCAL_PATH := $(call my-dir) 3 | include $(LOCAL_PATH)/build/target_specific_features.mk 4 | include $(call all-makefiles-under,$(LOCAL_PATH)) 5 | endif 6 | -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "WifiOverlay", 3 | theme: "WifiOverlay", 4 | certificate: "platform", 5 | sdk_version: "current", 6 | product_specific: true 7 | } 8 | -------------------------------------------------------------------------------- /power-libperfmgr/libperfmgr/TEST_MAPPING: -------------------------------------------------------------------------------- 1 | { 2 | "presubmit": [ 3 | { 4 | "name": "libperfmgr_test" 5 | } 6 | ], 7 | "pts-experimental": [ 8 | { 9 | "name": "libperfmgr_test" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /configs/wifi/hostapd.accept: -------------------------------------------------------------------------------- 1 | # List of MAC addresses that are allowed to authenticate (IEEE 802.11) 2 | # with the AP. Optional VLAN ID can be assigned for clients based on the 3 | # MAC address if dynamic VLANs (hostapd.conf dynamic_vlan option) are used. 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_sensors_default.te: -------------------------------------------------------------------------------- 1 | allow hal_sensors_default diag_device:chr_file { read write }; 2 | allow hal_sensors_default sysfs:file { read open }; 3 | allow hal_sensors_default sysfs_info:file { read write }; 4 | set_prop(hal_sensors_default, camera_prop) 5 | -------------------------------------------------------------------------------- /gps/gps_vendor_board.mk: -------------------------------------------------------------------------------- 1 | # Flags from BoardConfigVendor.mk 2 | ifneq ($(TARGET_USES_QMAA),true) 3 | BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default 4 | else ifneq ($(TARGET_USES_QMAA_OVERRIDE_GPS),false) 5 | BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default 6 | endif 7 | 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /rootdir/etc/init.recovery.qcom.rc: -------------------------------------------------------------------------------- 1 | on fs 2 | wait /dev/block/platform/soc/${ro.boot.bootdevice} 3 | symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice 4 | 5 | on init 6 | setprop sys.usb.configfs 1 7 | setprop sys.usb.controller "a800000.dwc3" 8 | -------------------------------------------------------------------------------- /gps/utils/gps-utils.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: gps-utils 7 | Description: QTI GPS Location utils 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgps_utils 10 | Cflags: -I${includedir}/gps-utils 11 | -------------------------------------------------------------------------------- /gps/location/location-api.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-api 7 | Description: Location API 8 | Version: @VERSION 9 | Libs: -L${libdir} -llocation_api 10 | Cflags: -I${includedir}/location-api 11 | -------------------------------------------------------------------------------- /gps/batching/location-batching.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-batching 7 | Description: QTI GPS Batching 8 | Version: @VERSION 9 | Libs: -L${libdir} -lbatching 10 | Cflags: -I${includedir}/location-batching 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/ipacm.te: -------------------------------------------------------------------------------- 1 | # Fix for WLAN tethering offload 2 | # SELinux : avc: denied { set } for property=wifi.active.interface pid=2918 uid=1010 gid=1010 scontext=u:r::s0 tcontext=u:object_r:default_prop:s0 tclass=property_service 3 | allow hal_wifi_default exported_wifi_prop:property_service set; 4 | 5 | -------------------------------------------------------------------------------- /gps/geofence/location-geofence.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: location-geofence 7 | Description: QTI GPS Geofence 8 | Version: @VERSION 9 | Libs: -L${libdir} -lgeofencing 10 | Cflags: -I${includedir}/location-geofence 11 | -------------------------------------------------------------------------------- /rootdir/etc/init.safailnet.rc: -------------------------------------------------------------------------------- 1 | # Safetynet bypass 2 | # Inspired in magisk source code, by topjohnwu 3 | # Ported to ramdisk by jhenrique09 4 | 5 | on property:sys.boot_completed=1 6 | # selinux nodes, hide permissive state 7 | chmod 0640 /sys/fs/selinux/enforce 8 | chmod 0440 /sys/fs/selinux/policy 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /configs/wifi/wpa_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_disabled=1 3 | tdls_external_control=1 4 | interworking=1 5 | hs20=1 6 | bss_max_count=512 7 | auto_interworking=0 8 | bss_no_flush_when_down=1 9 | wowlan_triggers=magic_pkt 10 | driver_param=use_p2p_group_interface=1 11 | wowlan_triggers=magic_pkt 12 | -------------------------------------------------------------------------------- /configs/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libqti-perfd-client.so 2 | libadsprpc.so 3 | libcdsprpc.so 4 | libsdsprpc.so 5 | libfastcvopt.so 6 | liblistenjni.so 7 | liblistensoundmodel2.so 8 | libOpenCL.so 9 | libnpu.so 10 | libhta_controller.so 11 | libhta_hexagon_runtime.so 12 | unnhal-acc-hta.so 13 | libprotobuf-cpp-full.so 14 | libprotobuf-cpp-lite.so 15 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_audio_default.te: -------------------------------------------------------------------------------- 1 | allow hal_audio_default diag_device:chr_file { read write }; 2 | allow hal_audio_default sysfs:dir r_dir_perms; 3 | allow hal_audio_default sysfs_info:file { open getattr read }; 4 | allow hal_audio_default vendor_data_file:dir { create write add_name }; 5 | allow hal_audio_default vendor_data_file:file { append create getattr open read }; 6 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipacm/src/mobileap_firewall.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 0 6 | 7 | 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/tee.te: -------------------------------------------------------------------------------- 1 | # TODO(b/36644492): Remove data_between_core_and_vendor_violators once 2 | # tee no longer directly accesses /data owned by the frameworks. 3 | typeattribute tee data_between_core_and_vendor_violators; 4 | allow tee fingerprintd_data_file:dir rw_dir_perms; 5 | allow tee fingerprintd_data_file:file create_file_perms; 6 | allow tee system_data_file:dir r_dir_perms; 7 | -------------------------------------------------------------------------------- /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/vendor/app.te: -------------------------------------------------------------------------------- 1 | # Allow appdomain to get vendor_camera_prop 2 | binder_call({ appdomain -isolated_app }, hal_mlipay_default) 3 | get_prop(appdomain, vendor_camera_prop) 4 | get_prop({ appdomain -isolated_app }, mlipay_prop) 5 | get_prop({ appdomain -isolated_app }, hal_fingerprint_prop) 6 | get_prop({ appdomain -isolated_app }, ifaa_prop) 7 | get_prop({ appdomain -isolated_app }, vendor_fp_prop) 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/property.te: -------------------------------------------------------------------------------- 1 | type hal_fingerprint_prop, property_type; 2 | type ifaa_prop, property_type; 3 | type mlipay_prop, property_type; 4 | type vendor_fp_prop, property_type; 5 | type vendor_camera_prop, property_type; 6 | 7 | # Thermal engine 8 | type thermal_engine_prop, property_type; 9 | 10 | # Power 11 | type power_prop, property_type; 12 | type vendor_power_prop, property_type; 13 | -------------------------------------------------------------------------------- /sepolicy/vendor/ueventd.te: -------------------------------------------------------------------------------- 1 | allow ueventd hall_dev:dir r_dir_perms; 2 | allow ueventd hall_dev:file rw_file_perms; 3 | allow ueventd hall_dev:lnk_file r_file_perms; 4 | allow ueventd ir_dev_file:chr_file { create setattr }; 5 | allow ueventd kcal_dev:dir r_dir_perms; 6 | allow ueventd kcal_dev:file rw_file_perms; 7 | allow ueventd kcal_dev:lnk_file r_file_perms; 8 | allow ueventd metadata_file:dir search; 9 | -------------------------------------------------------------------------------- /folio_daemon/Android.bp: -------------------------------------------------------------------------------- 1 | cc_binary { 2 | name: "folio_daemon", 3 | 4 | shared_libs: [ 5 | "libandroid", 6 | "libcutils", 7 | "liblog", 8 | ], 9 | 10 | srcs: ["main.cpp"], 11 | 12 | cflags: [ 13 | "-DLOG_TAG=\"folio_daemon\"", 14 | "-DLOG_NDEBUG=0", 15 | "-Wall", 16 | "-Werror", 17 | ], 18 | 19 | owner: "google", 20 | 21 | } 22 | -------------------------------------------------------------------------------- /org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerV4.java: -------------------------------------------------------------------------------- 1 | package org.ifaa.android.manager; 2 | 3 | import android.compat.annotation.UnsupportedAppUsage; 4 | 5 | public abstract class IFAAManagerV4 extends IFAAManagerV3 { 6 | @UnsupportedAppUsage 7 | public abstract int getEnabled(int bioType); 8 | 9 | @UnsupportedAppUsage 10 | public abstract int[] getIDList(int bioType); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /power-libperfmgr/hidl/android.hardware.power@1.3-service.xiaomi_sdm660.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | android.hardware.power 4 | hwbinder 5 | 1.3 6 | 7 | IPower 8 | default 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /org.ifaa.android.manager/src/org/ifaa/android/manager/IFAAManagerFactory.java: -------------------------------------------------------------------------------- 1 | package org.ifaa.android.manager; 2 | 3 | import android.compat.annotation.UnsupportedAppUsage; 4 | import android.content.Context; 5 | 6 | public class IFAAManagerFactory { 7 | @UnsupportedAppUsage 8 | public static IFAAManager getIFAAManager(Context context, int authType) { 9 | return IFAAManagerImpl.getInstance(context); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /sepolicy/vendor/thermal-engine.te: -------------------------------------------------------------------------------- 1 | allow thermal-engine property_socket:sock_file write; 2 | allow thermal-engine sysfs:dir r_dir_perms; 3 | allow thermal-engine self:capability { chown fowner }; 4 | allow thermal-engine thermal_data_file:dir rw_dir_perms; 5 | allow thermal-engine thermal_data_file:file create_file_perms; 6 | dontaudit thermal-engine self:capability dac_override; 7 | set_prop(thermal-engine, thermal_engine_prop); 8 | r_dir_file(thermal-engine sysfs_thermal) 9 | -------------------------------------------------------------------------------- /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 | ARM_cacheflush: 1 12 | inotify_init1: 1 13 | inotify_add_watch: 1 14 | inotify_rm_watch: 1 15 | uname: 1 16 | ueventd: 1 17 | timer_create: 1 18 | timer_settime: 1 19 | rt_sigtimedwait: 1 20 | -------------------------------------------------------------------------------- /sepolicy/vendor/qti_init_shell.te: -------------------------------------------------------------------------------- 1 | allow qti_init_shell ctl_start_prop:property_service set; 2 | allow qti_init_shell ctl_stop_prop:property_service set; 3 | allow qti_init_shell sysfs_cpu_boost:file write; 4 | allow qti_init_shell sysfs:file write; 5 | allow qti_init_shell vendor_radio_data_file:dir { getattr read search }; 6 | allow qti_init_shell vendor_radio_data_file:file { getattr read setattr write }; 7 | dontaudit qti_init_shell self:capability { dac_override dac_read_search }; 8 | -------------------------------------------------------------------------------- /configs/idc/uinput-fpc.idc: -------------------------------------------------------------------------------- 1 | # 2 | # FPC1020 Touch sensor driver 3 | # 4 | # Copyright (c) 2013,2014 Fingerprint Cards AB 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License Version 2 8 | # as published by the Free Software Foundation. 9 | # 10 | 11 | device.internal = 1 12 | 13 | keyboard.layout = uinput-fpc 14 | keyboard.builtIn = 1 15 | keyboard.orientationAware = 1 16 | -------------------------------------------------------------------------------- /configs/idc/uinput-goodix.idc: -------------------------------------------------------------------------------- 1 | # 2 | # FPC1020 Touch sensor driver 3 | # 4 | # Copyright (c) 2013,2014 Fingerprint Cards AB 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License Version 2 8 | # as published by the Free Software Foundation. 9 | # 10 | 11 | device.internal = 1 12 | 13 | keyboard.layout = uinput-goodix 14 | keyboard.builtIn = 1 15 | keyboard.orientationAware = 1 16 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/action_reset.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /configs/privapp-permission/privapp-permissions-hotword.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /gps/android/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 3 | include $(CLEAR_VARS) 4 | DIR_LIST := $(LOCAL_PATH) 5 | include $(DIR_LIST)/utils/Android.mk 6 | ifeq ($(GNSS_HIDL_VERSION),2.0) 7 | include $(DIR_LIST)/2.0/Android.mk 8 | else 9 | ifeq ($(GNSS_HIDL_VERSION),1.1) 10 | include $(DIR_LIST)/1.1/Android.mk 11 | else 12 | include $(DIR_LIST)/1.0/Android.mk 13 | endif #GNSS HIDL 1.1 14 | endif #GNSS HIDL 2.0 15 | endif #BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 16 | -------------------------------------------------------------------------------- /rro_overlays/TetheringOverlay/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /DeviceSettings/res/menu/menu_reset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /DeviceDoze/res/drawable/ic_doze.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /configs/keylayout/uinput-goodix.kl: -------------------------------------------------------------------------------- 1 | # 2 | # Goodix fingerprint sensor driver 3 | # 4 | # Copyright (c) 2013,2014 Fingerprint Cards AB 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License Version 2 8 | # as published by the Free Software Foundation. 9 | # 10 | 11 | key 102 HOME VIRTUAL 12 | key 103 SYSTEM_NAVIGATION_UP 13 | key 105 SYSTEM_NAVIGATION_LEFT 14 | key 106 SYSTEM_NAVIGATION_RIGHT 15 | key 108 SYSTEM_NAVIGATION_DOWN 16 | -------------------------------------------------------------------------------- /RemovePackages/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := RemovePackages 5 | LOCAL_MODULE_CLASS := APPS 6 | LOCAL_MODULE_TAGS := optional 7 | LOCAL_OVERRIDES_PACKAGES := AmbientSensePrebuilt CarrierSetup Drive Maps MyVerizonServices OBDM_Permissions OemDmTrigger PrebuiltGmail Showcase SprintDM SprintHM YouTube YouTubeMusicPrebuilt VZWAPNLib VzwOmaTrigger obdm_stub 8 | LOCAL_UNINSTALLABLE_MODULE := true 9 | LOCAL_CERTIFICATE := PRESIGNED 10 | LOCAL_SRC_FILES := /dev/null 11 | include $(BUILD_PREBUILT) 12 | -------------------------------------------------------------------------------- /configs/keylayout/uinput-fpc.kl: -------------------------------------------------------------------------------- 1 | # 2 | # FPC1020 Touch sensor driver 3 | # 4 | # Copyright (c) 2013,2014 Fingerprint Cards AB 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License Version 2 8 | # as published by the Free Software Foundation. 9 | # 10 | key 102 HOME VIRTUAL 11 | key 103 SYSTEM_NAVIGATION_UP 12 | key 105 SYSTEM_NAVIGATION_LEFT 13 | key 106 SYSTEM_NAVIGATION_RIGHT 14 | key 108 SYSTEM_NAVIGATION_DOWN 15 | 16 | key 172 HOME VIRTUAL 17 | -------------------------------------------------------------------------------- /org.ifaa.android.manager/src/org/ifaa/android/manager/IIFAAService.aidl: -------------------------------------------------------------------------------- 1 | package org.ifaa.android.manager; 2 | 3 | interface IIFAAService { 4 | byte[] processCmd_v2(in byte[] param); 5 | int[] getIDList(int bioType); 6 | int faceEnroll(String sessionId, int flags); 7 | int faceUpgrade(int action, String path, int offset, in byte[] data, int data_len); 8 | int faceAuthenticate_v2(String sessionId, int flags); 9 | int faceCancel_v2(String sessionId); 10 | byte[] faceInvokeCommand(in byte[] param); 11 | int faceGetCellinfo(); 12 | } 13 | -------------------------------------------------------------------------------- /DeviceSettings/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/ic_headphone.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/ic_doze.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /sepolicy/private/folio_daemon.te: -------------------------------------------------------------------------------- 1 | type folio_daemon, domain, coredomain; 2 | type folio_daemon_exec, system_file_type, exec_type, file_type; 3 | 4 | init_daemon_domain(folio_daemon) 5 | 6 | allow folio_daemon binder_device:chr_file rw_file_perms; 7 | allow folio_daemon uhid_device:chr_file rw_file_perms; 8 | 9 | allow folio_daemon system_server:unix_stream_socket rw_socket_perms_no_ioctl; 10 | 11 | binder_use(folio_daemon) 12 | binder_call(folio_daemon, system_server) 13 | 14 | allow folio_daemon sensorservice_service:service_manager find; 15 | allow folio_daemon permission_service:service_manager find; 16 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_mlipay_default.te: -------------------------------------------------------------------------------- 1 | type hal_mlipay_default, domain; 2 | type hal_mlipay_default_exec, exec_type, vendor_file_type, file_type; 3 | 4 | add_hwservice(hal_mlipay_default, hal_mlipay_hwservice) 5 | get_prop(hal_mlipay_default, hwservicemanager_prop) 6 | init_daemon_domain(hal_mlipay_default) 7 | hwbinder_use(hal_mlipay_default) 8 | r_dir_file(hal_mlipay_default, firmware_file) 9 | get_prop(hal_mlipay_default, hal_fingerprint_prop); 10 | set_prop(hal_mlipay_default, mlipay_prop); 11 | 12 | allow hal_mlipay_default tee_device:chr_file rw_file_perms; 13 | allow hal_mlipay_default ion_device:chr_file r_file_perms; 14 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/ic_device.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/ic_mic.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /gps/gps_vendor_product.mk: -------------------------------------------------------------------------------- 1 | # HAL packages 2 | PRODUCT_PACKAGES += android.hardware.gnss@1.0-impl-qti 3 | PRODUCT_PACKAGES += android.hardware.gnss@1.0-service-qti 4 | PRODUCT_PACKAGES += android.hardware.gnss@1.1-impl-qti 5 | PRODUCT_PACKAGES += android.hardware.gnss@1.1-service-qti 6 | PRODUCT_PACKAGES += android.hardware.gnss@2.0-impl-qti 7 | PRODUCT_PACKAGES += android.hardware.gnss@2.0-service-qti 8 | PRODUCT_PACKAGES += gps.conf 9 | PRODUCT_PACKAGES += libloc_core 10 | PRODUCT_PACKAGES += libgnss 11 | PRODUCT_PACKAGES += liblocation_api 12 | PRODUCT_PACKAGES += libgps.utils 13 | PRODUCT_PACKAGES += libbatching 14 | PRODUCT_PACKAGES += libgeofencing 15 | -------------------------------------------------------------------------------- /libshims/camera_sdm660_shim.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 | extern "C" void _ZN7android6Parcel17writeUint64VectorERKNSt3__16vectorIyNS1_9allocatorIyEEEE() { }; 11 | extern "C" void _ZNK7android6Parcel16readUint64VectorEPNSt3__16vectorIyNS1_9allocatorIyEEEE() { }; 12 | } 13 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/ic_flip.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /sepolicy/vendor/init.te: -------------------------------------------------------------------------------- 1 | allow init blkio_dev:file { create open read write }; 2 | allow init hwservicemanager:binder { call transfer }; 3 | allow init ipa_dev:chr_file open; 4 | allow init ion_device:chr_file ioctl; 5 | allow init property_socket:sock_file write; 6 | allow init persist_block_device:lnk_file relabelto; 7 | allow init sysfs_dm:file { open write }; 8 | allow init sysfs_info:file { open read }; 9 | allow init sysfs:file setattr; 10 | allow init sysfs_graphics:file { open write }; 11 | allow init sysfs_battery_supply:file setattr; 12 | allow init socket_device:sock_file { unlink setattr create }; 13 | allow init vendor_default_prop:property_service set; 14 | -------------------------------------------------------------------------------- /DeviceDoze/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 := DeviceDoze 9 | LOCAL_CERTIFICATE := platform 10 | LOCAL_PRIVATE_PLATFORM_APIS := true 11 | LOCAL_PRIVILEGED_MODULE := true 12 | LOCAL_PRIVATE_PLATFORM_APIS := true 13 | 14 | LOCAL_USE_AAPT2 := true 15 | 16 | LOCAL_STATIC_ANDROID_LIBRARIES := \ 17 | androidx.preference_preference 18 | 19 | LOCAL_RESOURCE_DIR := \ 20 | $(LOCAL_PATH)/res 21 | 22 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags 23 | 24 | include $(BUILD_PACKAGE) 25 | 26 | include $(call all-makefiles-under,$(LOCAL_PATH)) 27 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_tinyalse.te: -------------------------------------------------------------------------------- 1 | # Tinyalsa installation for vendor binaries / scripts 2 | # Non-vendor processes are not allowed to execute the binary 3 | # and is always executed without transition. 4 | type vendor_tinyalsa_exec, exec_type, vendor_file_type, file_type; 5 | 6 | # Do not allow domains to transition to vendor tinyalsa 7 | # or read, execute the vendor_tinyalsa file. 8 | full_treble_only(` 9 | # Do not allow non-vendor domains to transition 10 | # to vendor tinyalsa except for the whitelisted domains. 11 | neverallow { 12 | coredomain 13 | -init 14 | -modprobe 15 | } vendor_tinyalsa_exec:file { entrypoint execute execute_no_trans }; 16 | ') 17 | -------------------------------------------------------------------------------- /DeviceSettings/res/layout/activity_kcal.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 | 18 | 19 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/ic_thermal.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /sepolicy/vendor/system_server.te: -------------------------------------------------------------------------------- 1 | allow system_server blkio_dev:dir search; 2 | allow system_server default_android_service:service_manager add; 3 | allow system_server exported_camera_prop:file read; 4 | allow system_server kernel:system syslog_read; 5 | allow system_server sysfs_battery_supply:file rw_file_perms; 6 | allow system_server sysfs_vibrator:file rw_file_perms; 7 | allow system_server thermal_service:service_manager find; 8 | allow system_server userspace_reboot_exported_prop:file read; 9 | allow system_server vendor_camera_prop:file { getattr open read }; 10 | allow system_server vendor_default_prop:file { getattr open read }; 11 | allow system_server vendor_keylayout_file:dir search; 12 | allow system_server vendor_keylayout_file:file r_file_perms; 13 | -------------------------------------------------------------------------------- /DeviceDoze/res/drawable/ic_pickup.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/thermal_balance.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /sepolicy/vendor/init_fingerprint.te: -------------------------------------------------------------------------------- 1 | type init_fingerprint, domain; 2 | type init_fingerprint_exec, exec_type, vendor_file_type, file_type; 3 | typeattribute init_fingerprint data_between_core_and_vendor_violators; 4 | 5 | # Allow for transition from init domain to init_fingerprint 6 | init_daemon_domain(init_fingerprint) 7 | 8 | # Shell script needs to execute /vendor/bin/sh 9 | allow init_fingerprint vendor_shell_exec:file rx_file_perms; 10 | allow init_fingerprint vendor_toolbox_exec:file rx_file_perms; 11 | 12 | # Allow to delete file 13 | allow init_fingerprint mnt_vendor_file:dir search; 14 | allow init_fingerprint persist_drm_file:dir { read search open write remove_name }; 15 | allow init_fingerprint persist_drm_file:file { getattr unlink }; 16 | allow init_fingerprint system_data_file:file r_file_perms; 17 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_camera_default.te: -------------------------------------------------------------------------------- 1 | allow hal_camera_default camera_data_file:dir w_dir_perms; 2 | allow hal_camera_default camera_data_file:file create_file_perms; 3 | allow hal_camera_default media_rw_data_file:file { getattr }; 4 | allow hal_camera_default sysfs:file { getattr open read }; 5 | allow hal_camera_default sysfs_kgsl:dir search; 6 | allow hal_camera_default sysfs_kgsl:file r_file_perms; 7 | allow hal_camera_default vendor_video_prop:file r_file_perms; 8 | 9 | binder_call(hal_camera_default, hal_configstore_default) 10 | binder_call(hal_camera_default, hal_graphics_allocator_default) 11 | set_prop(hal_camera_default, exported_camera_prop) 12 | set_prop(hal_camera_default, vendor_camera_prop) 13 | set_prop(hal_camera_default, vendor_video_prop) 14 | typeattribute hal_camera_default data_between_core_and_vendor_violators; 15 | -------------------------------------------------------------------------------- /DeviceSettings/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | #FF6700 18 | 19 | -------------------------------------------------------------------------------- /DeviceDoze/res/drawable/ic_raise.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/test/README.txt: -------------------------------------------------------------------------------- 1 | 1 To run this suite separately(each test case creates table and delete table) use below command 2 | - To execute test suite nt times with n entries, command "ipanatest sep nt n" 3 | 4 | Example: To execute test suite 1 time with 100 entries, command "ipanattest sep 100" 5 | 6 | 7 | 2. To run test suite not separately(creates table and delete table only once) use below command 8 | - To execute test suite nt times with n entries, command "ipanatest reg nt n" 9 | 10 | Example: To execute test suite 5 times with 32 entries, command "ipanattest reg 5 32" 11 | 12 | 13 | 3. To run inotify regression test use command, "ipanattest inotify nt" 14 | 15 | Example: To execute inotify 5 times, command "ipanattest inotify 5" 16 | 17 | 18 | 4. if we just give command "ipanattest", runs test suite 1 time with 100 entries (non separate) 19 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/action_presets.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /DeviceDoze/res/drawable/ic_hand_wave.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /rro_overlays/TetheringOverlay/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2020 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 | runtime_resource_overlay { 18 | name: "TetheringConfigOverlay", 19 | resource_dirs: ["res"], 20 | sdk_version: "current", 21 | proprietary: true 22 | } 23 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_power_default.te: -------------------------------------------------------------------------------- 1 | # Allow writing to files in /proc/tp_gesture 2 | allow hal_power_default proc:file rw_file_perms; 3 | allow hal_power_default proc:dir search; 4 | allow hal_power_default proc_dt2w:file rw_file_perms; 5 | 6 | allow hal_power_default sysfs_touchpanel:file rw_file_perms; 7 | allow hal_power_default sysfs_touchpanel:dir search; 8 | allow hal_power_default sysfs_tap_to_wake:file rw_file_perms; 9 | 10 | r_dir_file(hal_power_default, debugfs_rpm) 11 | r_dir_file(hal_power_default, sysfs_graphics) 12 | 13 | allow hal_power_default device_latency:chr_file rw_file_perms; 14 | allow hal_power_default { sysfs_devfreq sysfs_kgsl }:dir search; 15 | allow hal_power_default { sysfs_devfreq sysfs_kgsl }:{ file lnk_file } rw_file_perms; 16 | allow hal_power_default sysfs_devices_system_cpu:file rw_file_perms; 17 | 18 | set_prop(hal_power_default, vendor_power_prop) 19 | 20 | -------------------------------------------------------------------------------- /power-libperfmgr/hidl/android.hardware.power@1.3-service.xiaomi_sdm660-libperfmgr.rc: -------------------------------------------------------------------------------- 1 | service vendor.power-hal-1-3 /vendor/bin/hw/android.hardware.power@1.3-service.xiaomi_sdm660-libperfmgr 2 | class hal 3 | user root 4 | group system 5 | priority -20 6 | interface android.hardware.power@1.0::IPower default 7 | interface android.hardware.power@1.1::IPower default 8 | interface android.hardware.power@1.2::IPower default 9 | interface android.hardware.power@1.3::IPower default 10 | 11 | # restart powerHAL when framework died 12 | on property:init.svc.zygote=restarting && property:vendor.powerhal.state=* 13 | setprop vendor.powerhal.state "" 14 | setprop vendor.powerhal.audio "" 15 | setprop vendor.powerhal.rendering "" 16 | restart vendor.power-hal-1-3 17 | 18 | # initialize powerHAL when boot is completed 19 | on property:sys.boot_completed=1 20 | setprop vendor.powerhal.init 1 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 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/ic_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /sepolicy/vendor/file.te: -------------------------------------------------------------------------------- 1 | type debugfs_rpm, debugfs_type, fs_type; 2 | type fingerprint_data_file, file_type, data_file_type, core_data_file_type; 3 | type fingerprint_sysfs, fs_type, sysfs_type; 4 | type ir_dev_file, file_type; 5 | type sysfs_info, fs_type, sysfs_type; 6 | type thermal_data_file, file_type, data_file_type; 7 | 8 | # Fingerprint 9 | type fingerprintd_device, file_type, dev_type; 10 | type persist_fingerprint_file, file_type; 11 | type sysfs_fingerprint, sysfs_type, fs_type; 12 | 13 | # Hall Switch 14 | type hall_dev, sysfs_type, fs_type; 15 | 16 | # Kcal 17 | type kcal_dev, sysfs_type, fs_type; 18 | 19 | # Touchscreen wake_gesture 20 | type proc_dt2w, fs_type, proc_type; 21 | type sysfs_tap_to_wake, sysfs_type, fs_type; 22 | type sysfs_touchpanel, fs_type, sysfs_type; 23 | 24 | # XiamiParts 25 | type sysfs_fpsinfo, sysfs_type, fs_type; 26 | type sysfs_headphonegain, sysfs_type, fs_type; 27 | type sysfs_micgain, sysfs_type, fs_type; 28 | -------------------------------------------------------------------------------- /overlay/packages/apps/DocumentsUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | true 20 | 21 | -------------------------------------------------------------------------------- /DeviceDoze/res/color/switchbar_switch_thumb_tint.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /gps/pla/Android.mk: -------------------------------------------------------------------------------- 1 | GNSS_CFLAGS := \ 2 | -Werror \ 3 | -Wno-error=unused-parameter \ 4 | -Wno-error=macro-redefined \ 5 | -Wno-error=reorder \ 6 | -Wno-error=missing-braces \ 7 | -Wno-error=self-assign \ 8 | -Wno-error=enum-conversion \ 9 | -Wno-error=logical-op-parentheses \ 10 | -Wno-error=null-arithmetic \ 11 | -Wno-error=null-conversion \ 12 | -Wno-error=parentheses-equality \ 13 | -Wno-error=undefined-bool-conversion \ 14 | -Wno-error=tautological-compare \ 15 | -Wno-error=switch \ 16 | -Wno-error=date-time 17 | 18 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 19 | ifneq ($(BUILD_TINY_ANDROID),true) 20 | 21 | LOCAL_PATH := $(call my-dir) 22 | 23 | include $(CLEAR_VARS) 24 | LOCAL_MODULE := libloc_pla_headers 25 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/android 26 | include $(BUILD_HEADER_LIBRARY) 27 | 28 | endif # not BUILD_TINY_ANDROID 29 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 30 | -------------------------------------------------------------------------------- /DeviceDoze/res/color/switchbar_switch_track_tint.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /DeviceDoze/res/color-night/switchbar_switch_track_tint.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /DeviceDoze/res/color-night/switchbar_switch_thumb_tint.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /overlay-lineage/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 6 19 | 7 20 | 21 | 22 | -------------------------------------------------------------------------------- /gps/etc/lowi.conf: -------------------------------------------------------------------------------- 1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | # 3 | # LOWI Config file 4 | # 5 | # GENERAL DESCRIPTION 6 | # This file contains the config params for LOWI 7 | # 8 | # Copyright (c) 2019 Qualcomm Technologies, Inc. 9 | # All Rights Reserved. 10 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 11 | # 12 | # 2012-2013 Qualcomm Atheros, Inc. 13 | # All Rights Reserved. 14 | # Qualcomm Atheros Confidential and Proprietary. 15 | # 16 | # Export of this technology or software is regulated by the U.S. Government. 17 | # Diversion contrary to U.S. law prohibited. 18 | #=============================================================================*/ 19 | 20 | # X86 ONLY - UBUNTU: 21 | # Copy this file in the same directory where the executable is 22 | 23 | # Log level 24 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 25 | LOWI_LOG_LEVEL = 3 26 | LOWI_USE_LOWI_LP = 0 27 | 28 | -------------------------------------------------------------------------------- /init/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | cc_library_static { 18 | name: "libinit_sdm660", 19 | recovery_available: true, 20 | srcs: ["init_sdm660.cpp"], 21 | whole_static_libs: ["libbase"], 22 | include_dirs: [ 23 | "system/core/base/include", 24 | "system/core/init", 25 | ], 26 | shared_libs: ["libbase"], 27 | } 28 | -------------------------------------------------------------------------------- /org.ifaa.android.manager/Android.bp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017-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 | java_library { 18 | name: "org.ifaa.android.manager", 19 | installable: true, 20 | srcs: [ 21 | "src/**/*.java", 22 | "src/**/I*.aidl", 23 | ], 24 | aidl: { 25 | local_include_dirs: ["src"], 26 | }, 27 | libs: [ "unsupportedappusage" ], 28 | } 29 | 30 | -------------------------------------------------------------------------------- /DeviceDoze/res/drawable/switchbar_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /DeviceSettings/src/org/lineageos/settings/device/preferences/NotificationLedSeekBarPreference.java: -------------------------------------------------------------------------------- 1 | package org.lineageos.settings.device.preferences; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.widget.SeekBar; 6 | import org.lineageos.settings.device.FileUtils; 7 | 8 | public class NotificationLedSeekBarPreference extends SecureSettingCustomSeekBarPreference { 9 | 10 | public static final String NOTIF_LED_PATH = "/sys/class/leds/white/brightness"; 11 | 12 | public NotificationLedSeekBarPreference(Context context, AttributeSet attrs) { 13 | super(context, attrs); 14 | } 15 | 16 | @Override 17 | public void onStartTrackingTouch(SeekBar seekBar) { 18 | notifyChanged(); 19 | FileUtils.setValue(NOTIF_LED_PATH, 255); 20 | } 21 | @Override 22 | public void onStopTrackingTouch(SeekBar seekBar) { 23 | notifyChanged(); 24 | FileUtils.setValue(NOTIF_LED_PATH, 0); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 8dp 19 | 24.0dip 20 | 8.0dip 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++1y 11 | 12 | libgnss_la_SOURCES = \ 13 | location_gnss.cpp \ 14 | GnssAdapter.cpp \ 15 | XtraSystemStatusObserver.cpp \ 16 | Agps.cpp 17 | 18 | if USE_GLIB 19 | libgnss_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 20 | libgnss_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -avoid-version 21 | libgnss_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 22 | else 23 | libgnss_la_CFLAGS = $(AM_CFLAGS) 24 | libgnss_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 25 | libgnss_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 26 | endif 27 | 28 | libgnss_la_LIBADD = -lstdc++ -ldl $(GPSUTILS_LIBS) $(LOCCORE_LIBS) 29 | 30 | #Create and Install libraries 31 | lib_LTLIBRARIES = libgnss.la 32 | -------------------------------------------------------------------------------- /overlay/packages/services/Telecomm/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | 21 | 22 | true 23 | 24 | 25 | -------------------------------------------------------------------------------- /DeviceSettings/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 20 | 21 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/ic_fps_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /gps/geofence/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | 4 | LOCAL_PATH := $(call my-dir) 5 | 6 | include $(CLEAR_VARS) 7 | 8 | LOCAL_MODULE := libgeofencing 9 | LOCAL_SANITIZE += $(GNSS_SANITIZE) 10 | # activate the following line for debug purposes only, comment out for production 11 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 12 | LOCAL_VENDOR_MODULE := true 13 | LOCAL_MODULE_TAGS := optional 14 | 15 | LOCAL_SRC_FILES:= \ 16 | GeofenceAdapter.cpp \ 17 | location_geofence.cpp 18 | 19 | LOCAL_SHARED_LIBRARIES := \ 20 | libutils \ 21 | libcutils \ 22 | libgps.utils \ 23 | liblog \ 24 | libloc_core 25 | 26 | LOCAL_HEADER_LIBRARIES := \ 27 | libgps.utils_headers \ 28 | libloc_core_headers \ 29 | libloc_pla_headers \ 30 | liblocation_api_headers 31 | 32 | LOCAL_PRELINK_MODULE := false 33 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 34 | include $(BUILD_SHARED_LIBRARY) 35 | 36 | endif # not BUILD_TINY_ANDROID 37 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 38 | 39 | -------------------------------------------------------------------------------- /configs/component-overrides.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /DeviceDoze/res/color/switch_bar_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values-sw600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 8dp 22 | 23 | 24 | 0dp 25 | 26 | 27 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values/colors_device_defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 19 | 20 | #ff000000 21 | #ff000000 22 | 23 | -------------------------------------------------------------------------------- /DeviceDoze/res/layout/doze.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /gps/android/utils/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | include $(CLEAR_VARS) 3 | 4 | LOCAL_MODULE := liblocbatterylistener 5 | LOCAL_SANITIZE += $(GNSS_SANITIZE) 6 | # activate the following line for debug purposes only, comment out for production 7 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 8 | LOCAL_VENDOR_MODULE := true 9 | 10 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 11 | 12 | LOCAL_C_INCLUDES += \ 13 | $(LOCAL_PATH) \ 14 | 15 | LOCAL_SRC_FILES:= \ 16 | battery_listener.cpp 17 | LOCAL_SHARED_LIBRARIES := \ 18 | liblog \ 19 | libhidlbase \ 20 | libcutils \ 21 | libutils \ 22 | android.hardware.health@1.0 \ 23 | android.hardware.health@2.0 \ 24 | android.hardware.power@1.2 \ 25 | libbase 26 | 27 | LOCAL_HEADER_LIBRARIES := \ 28 | libgps.utils_headers \ 29 | 30 | LOCAL_STATIC_LIBRARIES := libhealthhalutils 31 | LOCAL_CFLAGS += -DBATTERY_LISTENER_ENABLED 32 | 33 | include $(BUILD_STATIC_LIBRARY) 34 | 35 | include $(CLEAR_VARS) 36 | LOCAL_MODULE := liblocbatterylistener_headers 37 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 38 | 39 | include $(BUILD_HEADER_LIBRARY) 40 | 41 | 42 | -------------------------------------------------------------------------------- /libhidl/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017 The LineageOS Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | include $(CLEAR_VARS) 17 | LOCAL_MODULE := android.hidl.base@1.0 18 | LOCAL_MODULE_TAGS := optional 19 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 20 | include $(BUILD_SHARED_LIBRARY) 21 | 22 | include $(CLEAR_VARS) 23 | LOCAL_MODULE := android.hidl.base@1.0_vendor 24 | LOCAL_INSTALLED_MODULE_STEM := android.hidl.base@1.0.so 25 | LOCAL_MODULE_TAGS := optional 26 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 27 | LOCAL_VENDOR_MODULE := true 28 | include $(BUILD_SHARED_LIBRARY) 29 | -------------------------------------------------------------------------------- /usb/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2017 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | cc_binary { 16 | name: "android.hardware.usb@1.0-service.xiaomi_sdm660", 17 | relative_install_path: "hw", 18 | init_rc: ["android.hardware.usb@1.0-service.xiaomi_sdm660.rc"], 19 | srcs: ["service.cpp", "Usb.cpp"], 20 | shared_libs: [ 21 | "libbase", 22 | "libcutils", 23 | "libhidlbase", 24 | "libutils", 25 | "libhardware", 26 | "android.hardware.usb@1.0", 27 | ], 28 | proprietary: true, 29 | } 30 | -------------------------------------------------------------------------------- /configs/perf/perfconfigstore.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 10 | 11 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /DeviceDoze/res/drawable/ic_pocket.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /DeviceSettings/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | ifeq ($(BOARD_VENDOR_PLATFORM),xiaomi-sdm660) 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE_TAGS := optional 6 | LOCAL_STATIC_ANDROID_LIBRARIES := \ 7 | androidx.preference_preference 8 | 9 | LOCAL_SRC_FILES := $(call all-java-files-under, src) 10 | LOCAL_PACKAGE_NAME := DeviceSettings 11 | LOCAL_CERTIFICATE := platform 12 | LOCAL_PRIVILEGED_MODULE := true 13 | LOCAL_PRIVATE_PLATFORM_APIS := true 14 | LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 15 | LOCAL_USE_AAPT2 := true 16 | 17 | package_resource_overlays := $(strip \ 18 | $(wildcard $(foreach dir, $(PRODUCT_PACKAGE_OVERLAYS), \ 19 | $(addprefix $(dir)/, packages/apps/DeviceSettings/res))) \ 20 | $(wildcard $(foreach dir, $(DEVICE_PACKAGE_OVERLAYS), \ 21 | $(addprefix $(dir)/, packages/apps/DeviceSettings/res)))) 22 | 23 | LOCAL_RESOURCE_DIR := $(package_resource_overlays) $(LOCAL_RESOURCE_DIR) 24 | 25 | LOCAL_PROGUARD_FLAG_FILES := proguard.flags 26 | 27 | include frameworks/base/packages/SettingsLib/common.mk 28 | 29 | include $(BUILD_PACKAGE) 30 | 31 | include $(call all-makefiles-under,$(LOCAL_PATH)) 32 | endif 33 | -------------------------------------------------------------------------------- /libshims/Android.bp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 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: "camera.sdm660_shim", 17 | srcs: ["camera_sdm660_shim.cpp"], 18 | shared_libs: [ 19 | "libui", 20 | "libutils", 21 | ], 22 | 23 | proprietary: true, 24 | } 25 | 26 | cc_library_shared { 27 | name: "libcutils_shim", 28 | srcs: [ 29 | "libcutils_shim/strdup8to16.cpp", 30 | "libcutils_shim/strdup16to8.cpp", 31 | ], 32 | shared_libs: ["libcutils"], 33 | product_specific: true, 34 | } 35 | -------------------------------------------------------------------------------- /overlay/packages/apps/Settings/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 22 | 24 | 25 | 0 26 | -1 27 | -1 28 | 29 | 30 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsLib/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | 25 | 26 | 0 27 | -1 28 | -1 29 | 30 | 31 | -------------------------------------------------------------------------------- /light/Android.bp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2018 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_binary { 16 | defaults: ["hidl_defaults"], 17 | name: "android.hardware.light@2.0-service.xiaomi_sdm660", 18 | init_rc: ["android.hardware.light@2.0-service.xiaomi_sdm660.rc"], 19 | srcs: ["service.cpp", "Light.cpp"], 20 | shared_libs: [ 21 | "libbase", 22 | "libhardware", 23 | "libhidlbase", 24 | "liblog", 25 | "libutils", 26 | "android.hardware.light@2.0", 27 | ], 28 | relative_install_path : "hw", 29 | vendor: true, 30 | } 31 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 24dp 23 | 24 | 25 | 16dp 26 | 27 | 28 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/src/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs 2 | if KERNELMODULES 3 | AM_CFLAGS += -I./../inc $(KERNEL_DIR)/include 4 | else 5 | AM_CFLAGS += -I./../inc 6 | endif 7 | #AM_CFLAGS += -DDEBUG -g 8 | 9 | common_CFLAGS = -DUSE_GLIB @GLIB_CFLAGS@ 10 | if !KERNELMODULES 11 | common_LDFLAGS = -lrt @GLIB_LIBS@ 12 | endif 13 | 14 | if KERNELMODULES 15 | library_includedir = ../inc $(KERNEL_DIR)/include $(pkgincludedir) 16 | else 17 | library_includedir = $(pkgincludedir) 18 | endif 19 | 20 | c_sources = ipa_nat_drv.c \ 21 | ipa_nat_drvi.c \ 22 | ipa_nat_logi.c 23 | 24 | library_include_HEADERS = ./../inc/ipa_nat_drvi.h \ 25 | ./../inc/ipa_nat_drv.h \ 26 | ./../inc/ipa_nat_logi.h 27 | 28 | if KERNELMODULES 29 | noinst_LIBRARIES = libipanat.a 30 | libipanat_a_C = @C@ 31 | libipanat_a_SOURCES = $(c_sources) 32 | else 33 | lib_LTLIBRARIES = libipanat.la 34 | libipanat_la_C = @C@ 35 | libipanat_la_SOURCES = $(c_sources) 36 | libipanat_la_CFLAGS = $(AM_CFLAGS) $(common_CFLAGS) 37 | libipanat_la_LDFLAGS = -shared $(common_LDFLAGS) -version-info 1:0:0 38 | endif 39 | -------------------------------------------------------------------------------- /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_SANITIZE += $(GNSS_SANITIZE) 10 | # activate the following line for debug purposes only, comment out for production 11 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 12 | LOCAL_VENDOR_MODULE := true 13 | LOCAL_MODULE_TAGS := optional 14 | 15 | LOCAL_SHARED_LIBRARIES := \ 16 | libutils \ 17 | libcutils \ 18 | libgps.utils \ 19 | libdl \ 20 | liblog 21 | 22 | LOCAL_SRC_FILES += \ 23 | LocationAPI.cpp \ 24 | LocationAPIClientBase.cpp 25 | 26 | LOCAL_CFLAGS += \ 27 | -fno-short-enums 28 | 29 | LOCAL_HEADER_LIBRARIES := \ 30 | libloc_pla_headers \ 31 | libgps.utils_headers 32 | 33 | LOCAL_PRELINK_MODULE := false 34 | 35 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 36 | include $(BUILD_SHARED_LIBRARY) 37 | 38 | include $(CLEAR_VARS) 39 | LOCAL_MODULE := liblocation_api_headers 40 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 41 | include $(BUILD_HEADER_LIBRARY) 42 | 43 | endif # not BUILD_TINY_ANDROID 44 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 45 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 25 | Xiaomi SDM660 26 | 27 | -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 22 | 27 | 28 | -------------------------------------------------------------------------------- /overlay-evo/frameworks/base/packages/SystemUI/res/values/evolution_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | true 18 | 19 | 20 | 6 21 | 7 22 | 23 | 24 | false 25 | 26 | 27 | -------------------------------------------------------------------------------- /overlay/packages/apps/Snap/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 17 | 18 | 19 | true 20 | 21 | 22 | true 23 | 24 | 25 | false 26 | 27 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice_contexts: -------------------------------------------------------------------------------- 1 | com.fingerprints.extension::IFingerprintEngineering u:object_r:hal_fingerprint_hwservice:s0 2 | com.fingerprints.extension::IFingerprintSensorTest u:object_r:hal_fingerprint_hwservice:s0 3 | com.fingerprints.extension::IFingerprintNavigation u:object_r:hal_fingerprint_hwservice:s0 4 | com.fingerprints.extension::IFingerprintCalibration u:object_r:hal_fingerprint_hwservice:s0 5 | com.fingerprints.extension::IFingerprintSenseTouch u:object_r:hal_fingerprint_hwservice:s0 6 | com.fingerprints.extension::IFingerprintEngineering u:object_r:hal_fingerprint_hwservice:s0 7 | com.fingerprints.extension::IFingerprintNavigation u:object_r:hal_fingerprint_hwservice:s0 8 | com.fingerprints.extension::IFingerprintSensorTest u:object_r:hal_fingerprint_hwservice:s0 9 | vendor.goodix.hardware.fingerprint::IGoodixBiometricsFingerprint u:object_r:hal_fingerprint_hwservice:s0 10 | vendor.qti.hardware.fingerprint::IQtiExtendedFingerprint u:object_r:hal_fingerprint_hwservice:s0 11 | vendor.xiaomi.hardware.mlipay::IMlipayService u:object_r:hal_mlipay_hwservice:s0 12 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/hal/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_ARM_MODE := arm 5 | LOCAL_SRC_FILES := src/CtUpdateAmbassador.cpp \ 6 | src/HAL.cpp \ 7 | src/IpaEventRelay.cpp \ 8 | src/LocalLogBuffer.cpp \ 9 | src/OffloadStatistics.cpp \ 10 | src/PrefixParser.cpp 11 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/inc 12 | LOCAL_MODULE := liboffloadhal 13 | 14 | #LOCAL_CPP_FLAGS := -Wall -Werror 15 | LOCAL_SHARED_LIBRARIES := libhwbinder \ 16 | libhidlbase \ 17 | libhidltransport \ 18 | liblog \ 19 | libcutils \ 20 | libdl \ 21 | libbase \ 22 | libutils \ 23 | libhardware_legacy \ 24 | libhardware \ 25 | android.hardware.tetheroffload.config@1.0 \ 26 | android.hardware.tetheroffload.control@1.0 27 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/inc 28 | LOCAL_VENDOR_MODULE := true 29 | LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib 30 | LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64 31 | include $(BUILD_SHARED_LIBRARY) 32 | -------------------------------------------------------------------------------- /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_SANITIZE += $(GNSS_SANITIZE) 10 | # activate the following line for debug purposes only, comment out for production 11 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 12 | LOCAL_VENDOR_MODULE := true 13 | LOCAL_MODULE_TAGS := optional 14 | 15 | LOCAL_SHARED_LIBRARIES := \ 16 | libutils \ 17 | libcutils \ 18 | libdl \ 19 | liblog \ 20 | libloc_core \ 21 | libgps.utils 22 | 23 | LOCAL_SRC_FILES += \ 24 | location_gnss.cpp \ 25 | GnssAdapter.cpp \ 26 | Agps.cpp \ 27 | XtraSystemStatusObserver.cpp 28 | 29 | LOCAL_CFLAGS += \ 30 | -fno-short-enums \ 31 | 32 | ifeq ($(TARGET_BUILD_VARIANT),user) 33 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 34 | endif 35 | 36 | LOCAL_HEADER_LIBRARIES := \ 37 | libgps.utils_headers \ 38 | libloc_core_headers \ 39 | libloc_pla_headers \ 40 | liblocation_api_headers 41 | 42 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 43 | 44 | LOCAL_PRELINK_MODULE := false 45 | 46 | include $(BUILD_SHARED_LIBRARY) 47 | 48 | endif # not BUILD_TINY_ANDROID 49 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This repository contains device configuration for Xiaomi SDM660 devices 2 | 3 | Basic | Spec Sheet 4 | -------:|:---------- 5 | CPU | Quad-core 1.84 GHz Qualcomm Kryo 260 LP 6 | CPU | Quad-core 2.20 GHz Qualcomm Kryo 260 HP 7 | Chipset | Qualcomm Snapdragon 660, SDM660 8 | GPU | Adreno 512 9 | ROM | 32/64/128GB 10 | RAM | 3/4/6GB 11 | Android | 8.1.0 12 | 13 | Note: 14 | Depends on: android_packages_resources_devicesettings from LineageOS 15 | 16 | Currently Supported Devices: wayne (MI 6X), jasmine_sprout (MI A2), clover (MI PAD 4 /4 Plus), 17 | lavender (Redmi Note 7) and platina (Mi 8 Lite) 18 | ## Copyright 19 | 20 | ``` 21 | # 22 | # Copyright (C) 2018 The LineageOS Project 23 | # 24 | # Licensed under the Apache License, Version 2.0 (the "License"); 25 | # you may not use this file except in compliance with the License. 26 | # You may obtain a copy of the License at 27 | # 28 | # http://www.apache.org/licenses/LICENSE-2.0 29 | # 30 | # Unless required by applicable law or agreed to in writing, software 31 | # distributed under the License is distributed on an "AS IS" BASIS, 32 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 33 | # See the License for the specific language governing permissions and 34 | # limitations under the License. 35 | # 36 | -------------------------------------------------------------------------------- /DeviceSettings/src/org/lineageos/settings/device/preferences/SecureSettingCustomSeekBarPreference.java: -------------------------------------------------------------------------------- 1 | package org.lineageos.settings.device.preferences; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | 6 | public class SecureSettingCustomSeekBarPreference extends CustomSeekBarPreference { 7 | 8 | public SecureSettingCustomSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { 9 | super(context, attrs, defStyleAttr, defStyleRes); 10 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver())); 11 | } 12 | 13 | public SecureSettingCustomSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr) { 14 | super(context, attrs, defStyleAttr); 15 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver())); 16 | } 17 | 18 | public SecureSettingCustomSeekBarPreference(Context context, AttributeSet attrs) { 19 | super(context, attrs); 20 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver())); 21 | } 22 | 23 | public SecureSettingCustomSeekBarPreference(Context context) { 24 | super(context); 25 | setPreferenceDataStore(new SecureSettingsStore(context.getContentResolver())); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /biometrics/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2017-2018 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_binary { 17 | name: "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660", 18 | defaults: ["hidl_defaults"], 19 | init_rc: ["android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660.rc"], 20 | vendor: true, 21 | relative_install_path: "hw", 22 | srcs: [ 23 | "BiometricsFingerprint.cpp", 24 | "service.cpp", 25 | ], 26 | 27 | shared_libs: [ 28 | "libcutils", 29 | "liblog", 30 | "libhidlbase", 31 | "libhardware", 32 | "libutils", 33 | "android.hardware.biometrics.fingerprint@2.1", 34 | ], 35 | proprietary: true, 36 | 37 | } 38 | -------------------------------------------------------------------------------- /DeviceSettings/src/org/lineageos/settings/device/PerformanceTileService.java: -------------------------------------------------------------------------------- 1 | package org.lineageos.settings.device; 2 | 3 | import android.service.quicksettings.Tile; 4 | import android.service.quicksettings.TileService; 5 | 6 | public class PerformanceTileService extends TileService { 7 | 8 | @Override 9 | public void onStartListening() { 10 | 11 | int currentState = Integer.parseInt(FileUtils.getValue(DeviceSettings.THERMAL_PATH)); 12 | 13 | Tile tile = getQsTile(); 14 | tile.setState(Tile.STATE_ACTIVE); 15 | tile.setLabel(getResources().getStringArray(R.array.thermal_profiles)[currentState]); 16 | 17 | tile.updateTile(); 18 | super.onStartListening(); 19 | } 20 | 21 | @Override 22 | public void onClick() { 23 | int currentState = Integer.parseInt(FileUtils.getValue(DeviceSettings.THERMAL_PATH)); 24 | 25 | int nextState; 26 | if (currentState == 4) { 27 | nextState = 0; 28 | } else { 29 | nextState = currentState + 1; 30 | } 31 | 32 | Tile tile = getQsTile(); 33 | FileUtils.setValue(DeviceSettings.THERMAL_PATH, nextState); 34 | tile.setLabel(getResources().getStringArray(R.array.thermal_profiles)[nextState]); 35 | 36 | tile.updateTile(); 37 | super.onClick(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /DeviceDoze/src/com/advanced/settings/doze/DozeSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018-2020 The Xiaomi-SDM660 Project 3 | * 4 | * https://github.com/xiaomi-sdm660 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 | package com.advanced.settings.doze; 20 | 21 | import android.os.Bundle; 22 | import android.preference.PreferenceActivity; 23 | 24 | public class DozeSettingsActivity extends PreferenceActivity { 25 | 26 | private static final String TAG_DOZE = "doze"; 27 | 28 | @Override 29 | protected void onCreate(Bundle savedInstanceState) { 30 | super.onCreate(savedInstanceState); 31 | 32 | getFragmentManager().beginTransaction().replace(android.R.id.content, 33 | new DozeSettingsFragment(), TAG_DOZE).commit(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /gps/location/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = \ 4 | -I./ \ 5 | -I../utils \ 6 | $(LOCPLA_CFLAGS) \ 7 | $(GPSUTILS_CFLAGS) \ 8 | -std=c++11 9 | 10 | liblocation_api_la_SOURCES = \ 11 | LocationAPI.cpp \ 12 | LocationAPIClientBase.cpp 13 | 14 | if USE_EXTERNAL_AP 15 | AM_CFLAGS += -DFEATURE_EXTERNAL_AP 16 | endif 17 | 18 | if USE_GLIB 19 | liblocation_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 20 | liblocation_api_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 21 | liblocation_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 22 | else 23 | liblocation_api_la_CFLAGS = $(AM_CFLAGS) 24 | liblocation_api_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 25 | liblocation_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 26 | endif 27 | 28 | liblocation_api_la_LIBADD = -lstdc++ -ldl $(GPSUTILS_LIBS) 29 | 30 | library_include_HEADERS = \ 31 | LocationAPI.h \ 32 | LocationAPIClientBase.h \ 33 | location_interface.h \ 34 | LocationDataTypes.h \ 35 | ILocationAPI.h 36 | 37 | #Create and Install libraries 38 | lib_LTLIBRARIES = liblocation_api.la 39 | 40 | library_includedir = $(pkgincludedir) 41 | 42 | pkgconfigdir = $(libdir)/pkgconfig 43 | pkgconfig_DATA = location-api.pc 44 | EXTRA_DIST = $(pkgconfig_DATA) 45 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_init.te: -------------------------------------------------------------------------------- 1 | #============= vendor_init ============== 2 | typeattribute vendor_init data_between_core_and_vendor_violators; 3 | 4 | allow vendor_init { 5 | media_rw_data_file 6 | system_data_file 7 | tombstone_data_file 8 | camera_data_file 9 | }:dir { create search getattr open read setattr ioctl write add_name remove_name rmdir relabelfrom }; 10 | 11 | allow vendor_init fingerprint_data_file:dir {setattr create}; 12 | allow vendor_init media_rw_data_file:file { getattr relabelfrom }; 13 | allow vendor_init persist_debug_prop:file read; 14 | allow vendor_init rootfs:dir { add_name create setattr write }; 15 | allow vendor_init rootfs:lnk_file setattr; 16 | allow vendor_init unlabeled:{ dir file } { getattr relabelfrom }; 17 | allow vendor_init blkio_dev:file { open read write create }; 18 | allow vendor_init proc_dirty:file write; 19 | 20 | allow vendor_init { 21 | audio_prop 22 | bservice_prop 23 | persist_debug_prop 24 | qcom_ims_prop 25 | reschedule_service_prop 26 | thermal_engine_prop 27 | vendor_ssr_prop 28 | vendor_fp_prop 29 | }:property_service set; 30 | 31 | set_prop(vendor_init, camera_prop) 32 | set_prop(vendor_init, exported_camera_prop) 33 | set_prop(vendor_init, vendor_camera_prop) 34 | set_prop(vendor_init, freq_prop) 35 | set_prop(vendor_init, fm_prop) 36 | set_prop(vendor_init, vendor_power_prop) 37 | -------------------------------------------------------------------------------- /overlay-evo/packages/apps/Settings/res/values/evolution_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | 17 | com.advanced.settings.doze/com.advanced.settings.doze.DozeSettingsActivity 18 | 19 | 25 | 0 26 | 27 | 28 | -------------------------------------------------------------------------------- /vndk/vndk-ext-libs.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019 The LineageOS Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | EXTRA_VENDOR_LIBRARIES_32 := \ 18 | libandroidicu \ 19 | libaudioclient \ 20 | libaudiomanager \ 21 | libaudiopolicy \ 22 | libbufferhub \ 23 | libbufferhubqueue \ 24 | libcamera_client \ 25 | libft2 \ 26 | libgui \ 27 | libharfbuzz_ng \ 28 | libheif \ 29 | libicui18n \ 30 | libinput \ 31 | libmedia \ 32 | libmediametrics \ 33 | libmediautils \ 34 | libmemunreachable \ 35 | libminikin \ 36 | libnblog \ 37 | libpackagelistparser \ 38 | libpdx_default_transport \ 39 | libselinux \ 40 | libstdc++ \ 41 | libsonivox \ 42 | libvibrator 43 | 44 | EXTRA_VENDOR_LIBRARIES_64 := \ 45 | libstdc++ \ 46 | libpowermanager 47 | -------------------------------------------------------------------------------- /DeviceSettings/res/drawable/ic_jason.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/test/Android.mk: -------------------------------------------------------------------------------- 1 | BOARD_PLATFORM_LIST := test 2 | ifeq ($(call is-board-platform-in-list,$(BOARD_PLATFORM_LIST)),true) 3 | ifneq (,$(filter $(QCOM_BOARD_PLATFORMS),$(TARGET_BOARD_PLATFORM))) 4 | ifneq (, $(filter aarch64 arm arm64, $(TARGET_ARCH))) 5 | 6 | LOCAL_PATH := $(call my-dir) 7 | 8 | include $(CLEAR_VARS) 9 | 10 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/ 11 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ipanat/inc 12 | 13 | LOCAL_HEADER_LIBRARIES := generated_kernel_headers 14 | 15 | LOCAL_MODULE := ipa_nat_test 16 | LOCAL_SRC_FILES := ipa_nat_test000.c \ 17 | ipa_nat_test001.c \ 18 | ipa_nat_test002.c \ 19 | ipa_nat_test003.c \ 20 | ipa_nat_test004.c \ 21 | ipa_nat_test005.c \ 22 | ipa_nat_test006.c \ 23 | ipa_nat_test007.c \ 24 | ipa_nat_test008.c \ 25 | ipa_nat_test009.c \ 26 | ipa_nat_test010.c \ 27 | ipa_nat_test011.c \ 28 | ipa_nat_test012.c \ 29 | ipa_nat_test013.c \ 30 | ipa_nat_test014.c \ 31 | ipa_nat_test015.c \ 32 | ipa_nat_test016.c \ 33 | ipa_nat_test017.c \ 34 | ipa_nat_test018.c \ 35 | ipa_nat_test019.c \ 36 | ipa_nat_test020.c \ 37 | ipa_nat_test021.c \ 38 | ipa_nat_test022.c \ 39 | main.c 40 | 41 | 42 | LOCAL_SHARED_LIBRARIES := libipanat 43 | 44 | LOCAL_MODULE_TAGS := tests 45 | LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/kernel-tests/ip_accelerator 46 | 47 | include $(BUILD_EXECUTABLE) 48 | 49 | endif # $(TARGET_ARCH) 50 | endif 51 | endif 52 | -------------------------------------------------------------------------------- /gps/batching/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = \ 2 | $(GPSUTILS_CFLAGS) \ 3 | $(LOCCORE_CFLAGS) \ 4 | -I./ \ 5 | -std=c++1y \ 6 | -D__func__=__PRETTY_FUNCTION__ \ 7 | -fno-short-enums 8 | 9 | ACLOCAL_AMFLAGS = -I m4 10 | 11 | requiredlibs = \ 12 | $(GPSUTILS_LIBS) \ 13 | $(LOCCORE_LIBS) \ 14 | -llog 15 | 16 | h_sources = \ 17 | BatchingAdapter.h 18 | 19 | libbatching_la_SOURCES = \ 20 | location_batching.cpp \ 21 | BatchingAdapter.cpp 22 | 23 | if USE_GLIB 24 | libbatching_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 25 | #libbatching_la_LDFLAGS = -lstdc++ -g -Wl,-z,defs -lpthread $(requiredlibs) @GLIB_LIBS@ -shared -avoid-version 26 | libbatching_la_LDFLAGS = -lstdc++ -g -Wl,-z,defs -lpthread $(requiredlibs) @GLIB_LIBS@ -avoid-version 27 | libbatching_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 28 | else 29 | libbatching_la_CFLAGS = $(AM_CFLAGS) 30 | libbatching_la_LDFLAGS = -Wl,-z,defs -lpthread $(requiredlibs) -shared -version-info 1:0:0 31 | libbatching_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 32 | endif 33 | 34 | library_include_HEADERS = $(h_sources) 35 | 36 | library_includedir = $(pkgincludedir) 37 | 38 | #Create and Install libraries 39 | lib_LTLIBRARIES = libbatching.la 40 | 41 | pkgconfigdir = $(libdir)/pkgconfig 42 | pkgconfig_DATA = location-batching.pc 43 | sysconf_DATA = $(WORKSPACE)/hardware/qcom/gps/etc/flp.conf 44 | EXTRA_DIST = $(pkgconfig_DATA) 45 | 46 | -------------------------------------------------------------------------------- /DeviceDoze/src/com/advanced/settings/doze/BootCompletedReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018-2020 The Xiaomi-SDM660 Project 3 | * 4 | * https://github.com/xiaomi-sdm660 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 | package com.advanced.settings.doze; 20 | 21 | import android.content.BroadcastReceiver; 22 | import android.content.Context; 23 | import android.content.Intent; 24 | import android.util.Log; 25 | 26 | public class BootCompletedReceiver extends BroadcastReceiver { 27 | 28 | private static final boolean DEBUG = false; 29 | private static final String TAG = "DeviceDoze"; 30 | 31 | @Override 32 | public void onReceive(final Context context, Intent intent) { 33 | if (Utils.isDozeEnabled(context) && Utils.sensorsEnabled(context)) { 34 | if (DEBUG) Log.d(TAG, "Starting service"); 35 | Utils.startService(context); 36 | } 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /libshims/libcutils_shim/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 | #pragma once 18 | 19 | #include 20 | #include 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | #if __STDC_VERSION__ < 201112L && __cplusplus < 201103L 27 | typedef uint16_t char16_t; 28 | #endif 29 | 30 | extern char * strndup16to8 (const char16_t* s, size_t n); 31 | extern size_t strnlen16to8 (const char16_t* s, size_t n); 32 | extern char * strncpy16to8 (char *dest, const char16_t*s, size_t n); 33 | 34 | extern char16_t * strdup8to16 (const char* s, size_t *out_len); 35 | extern size_t strlen8to16 (const char* utf8Str); 36 | extern char16_t * strcpy8to16 (char16_t *dest, const char*s, size_t *out_len); 37 | extern char16_t * strcpylen8to16 (char16_t *dest, const char*s, int length, 38 | size_t *out_len); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_toolbox.te: -------------------------------------------------------------------------------- 1 | type vendor_toolbox, domain; 2 | init_daemon_domain(vendor_toolbox) 3 | 4 | # Allow vendor_toolbox to use sys_admin capability 5 | allow vendor_toolbox self:capability sys_admin; 6 | 7 | # Allow vendor_toolbox to execute /vendor/bin/toybox_vendor 8 | allow vendor_toolbox vendor_toolbox_exec:file execute_no_trans; 9 | 10 | # Allow vendor_toolbox to read directories in rootfs 11 | allow vendor_toolbox rootfs:dir r_dir_perms; 12 | 13 | # Allow vendor_toolbox to remove "security.*" xattrs from /mnt/vendor/persist 14 | allow vendor_toolbox { 15 | mnt_vendor_file 16 | persist_alarm_file 17 | persist_block_device 18 | persist_bluetooth_file 19 | persist_bms_file 20 | persist_display_file 21 | persist_drm_file 22 | persist_file 23 | persist_fingerprint_file 24 | persist_hvdcp_file 25 | persist_misc_file 26 | persist_qti_fp_file 27 | persist_rfs_file 28 | persist_rfs_shared_hlos_file 29 | persist_secnvm_file 30 | persist_time_file 31 | persist_vpp_file 32 | regionalization_file 33 | rfs_file 34 | rfs_shared_hlos_file 35 | sensors_persist_file 36 | unlabeled 37 | vendor_persist_mmi_file 38 | }:dir { r_dir_perms setattr getattr}; 39 | 40 | allow vendor_toolbox { 41 | mnt_vendor_file 42 | persist_alarm_file 43 | persist_block_device 44 | persist_bluetooth_file 45 | persist_bms_file 46 | persist_hvdcp_file 47 | persist_time_file 48 | regionalization_file 49 | sensors_persist_file 50 | }:file { getattr}; 51 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/src/Android.mk: -------------------------------------------------------------------------------- 1 | BOARD_PLATFORM_LIST := msm8909 2 | BOARD_PLATFORM_LIST += msm8916 3 | BOARD_PLATFORM_LIST += msm8917 4 | ifeq ($(TARGET_BOARD_SUFFIX),_gvmq) 5 | BOARD_PLATFORM_LIST += msmnile 6 | endif 7 | TARGET_DISABLE_IPANAT := false 8 | 9 | ifeq ($(TARGET_USES_QMAA),true) 10 | ifneq ($(TARGET_USES_QMAA_OVERRIDE_DATA),true) 11 | TARGET_DISABLE_IPANAT := true 12 | endif #TARGET_USES_QMAA_OVERRIDE_DATA 13 | endif #TARGET_USES_QMAA 14 | 15 | ifneq ($(TARGET_DISABLE_IPANAT),true) 16 | ifneq ($(call is-board-platform-in-list,$(BOARD_PLATFORM_LIST)),true) 17 | ifneq (,$(filter $(QCOM_BOARD_PLATFORMS),$(TARGET_BOARD_PLATFORM))) 18 | ifneq (, $(filter aarch64 arm arm64, $(TARGET_ARCH))) 19 | 20 | LOCAL_PATH := $(call my-dir) 21 | 22 | include $(CLEAR_VARS) 23 | 24 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/../inc 25 | 26 | LOCAL_HEADER_LIBRARIES := generated_kernel_headers 27 | 28 | LOCAL_SRC_FILES := ipa_nat_drv.c \ 29 | ipa_nat_drvi.c 30 | 31 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/../inc 32 | LOCAL_VENDOR_MODULE := true 33 | LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64 34 | LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib 35 | ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) 36 | LOCAL_CFLAGS := -DDEBUG 37 | endif 38 | LOCAL_CFLAGS += -Wall -Werror 39 | LOCAL_CFLAGS += -DFEATURE_IPA_ANDROID 40 | LOCAL_MODULE := libipanat 41 | LOCAL_MODULE_TAGS := optional 42 | LOCAL_PRELINK_MODULE := false 43 | LOCAL_CLANG := true 44 | include $(BUILD_SHARED_LIBRARY) 45 | 46 | endif # $(TARGET_ARCH) 47 | endif 48 | endif 49 | endif 50 | -------------------------------------------------------------------------------- /usb/Usb.h: -------------------------------------------------------------------------------- 1 | #ifndef ANDROID_HARDWARE_USB_V1_0_USB_H 2 | #define ANDROID_HARDWARE_USB_V1_0_USB_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #ifdef LOG_TAG 10 | #undef LOG_TAG 11 | #endif 12 | 13 | #define LOG_TAG "android.hardware.usb@1.0-service.xiaomi_sdm660" 14 | #define UEVENT_MSG_LEN 2048 15 | 16 | namespace android { 17 | namespace hardware { 18 | namespace usb { 19 | namespace V1_0 { 20 | namespace implementation { 21 | 22 | using ::android::hardware::usb::V1_0::IUsb; 23 | using ::android::hardware::usb::V1_0::IUsbCallback; 24 | using ::android::hardware::usb::V1_0::PortRole; 25 | using ::android::hidl::base::V1_0::IBase; 26 | using ::android::hardware::hidl_array; 27 | using ::android::hardware::hidl_memory; 28 | using ::android::hardware::hidl_string; 29 | using ::android::hardware::hidl_vec; 30 | using ::android::hardware::Return; 31 | using ::android::hardware::Void; 32 | using ::android::sp; 33 | 34 | struct Usb : public IUsb { 35 | Return switchRole(const hidl_string& portName, const PortRole& role) override; 36 | Return setCallback(const sp& callback) override; 37 | Return queryPortStatus() override; 38 | 39 | sp mCallback; 40 | pthread_mutex_t mLock = PTHREAD_MUTEX_INITIALIZER; 41 | }; 42 | 43 | } // namespace implementation 44 | } // namespace V1_0 45 | } // namespace usb 46 | } // namespace hardware 47 | } // namespace android 48 | 49 | #endif // ANDROID_HARDWARE_USB_V1_0_USB_H 50 | -------------------------------------------------------------------------------- /gps/geofence/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CFLAGS = -Wundef \ 2 | -Wno-trigraphs \ 3 | -g -O0 \ 4 | -fno-inline \ 5 | -fno-short-enums \ 6 | -fpic \ 7 | ${GPSUTILS_CFLAGS} \ 8 | ${LOCCORE_CFLAGS} \ 9 | $(LOCPLA_CFLAGS) \ 10 | -D__func__=__PRETTY_FUNCTION__ \ 11 | -std=c++1y 12 | 13 | AM_CPPFLAGS = $(AM_CFLAGS) 14 | 15 | ACLOCAL_AMFLAGS = -I m4 16 | 17 | requiredlibs = \ 18 | ${LOCCORE_LIBS} \ 19 | $(GPSUTILS_LIBS) \ 20 | -llog 21 | 22 | h_sources = \ 23 | GeofenceAdapter.h 24 | 25 | c_sources = \ 26 | GeofenceAdapter.cpp \ 27 | location_geofence.cpp 28 | 29 | libgeofencing_la_SOURCES = $(c_sources) 30 | if USE_GLIB 31 | libgeofencing_la_CFLAGS = -DUSE_GLIB @GLIB_CFLAGS@ $(AM_CFLAGS) 32 | libgeofencing_la_CPPFLAGS = -DUSE_GLIB @GLIB_CFLAGS@ $(AM_CFLAGS) $(AM_CPPFLAGS) 33 | libgeofencing_la_LDFLAGS = -lstdc++ -Wl,-z,defs @GLIB_LIBS@ $(requiredlibs) -shared -version-info 1:0:0 34 | libgeofencing_la_LIBDADD = $(requiredlibs) -lstdc++ @GLIB_LIBS@ 35 | else 36 | libgeofencing_la_CFLAGS = $(AM_CFLAGS) 37 | libgeofencing_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 38 | libgeofencing_la_LDFLAGS = -lstdc++ -Wl,-z,defs $(requiredlibs) -shared -version-info 1:0:0 39 | libgeofencing_la_LIBDADD = $(requiredlibs) -lstdc++ 40 | endif 41 | 42 | library_include_HEADERS = $(h_sources) 43 | 44 | library_includedir = $(pkgincludedir) 45 | 46 | lib_LTLIBRARIES = libgeofencing.la 47 | 48 | pkgconfigdir = $(libdir)/pkgconfig 49 | pkgconfig_DATA = location-geofence.pc 50 | EXTRA_DIST = $(pkgconfig_DATA) 51 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | false 23 | 24 | 25 | true 26 | 27 | 28 | 78 29 | 30 | 31 | 60000 32 | 33 | 34 | false 35 | 36 | 37 | false 38 | 39 | -------------------------------------------------------------------------------- /usb/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 The LineageOS jProject 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 "Usb.h" 20 | 21 | using android::sp; 22 | 23 | // libhwbinder: 24 | using android::hardware::configureRpcThreadpool; 25 | using android::hardware::joinRpcThreadpool; 26 | 27 | // Generated HIDL files 28 | using android::hardware::usb::V1_0::IUsb; 29 | using android::hardware::usb::V1_0::implementation::Usb; 30 | 31 | int main() { 32 | android::sp service = new Usb(); 33 | 34 | configureRpcThreadpool(1, true /*callerWillJoin*/); 35 | android::status_t status = service->registerAsService(); 36 | 37 | if (status != android::OK) { 38 | LOG(ERROR) << "Cannot register USB HAL service"; 39 | return 1; 40 | } 41 | 42 | LOG(INFO) << "USB HAL Ready."; 43 | joinRpcThreadpool(); 44 | // Under noraml cases, execution will not reach this line. 45 | LOG(ERROR) << "USB HAL failed to join thread pool."; 46 | return 1; 47 | } 48 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipacm/src/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I./../inc \ 2 | -I$(top_srcdir)/ipanat/inc \ 3 | ${LIBXML_CFLAGS} 4 | AM_CPPFLAGS += -Wall -Wundef -Wno-trigraphs 5 | AM_CPPFLAGS += -DDEBUG -g -DFEATURE_ETH_BRIDGE_LE -DFEATURE_L2TP 6 | AM_CPPFLAGS += -DFEATURE_IPA_V3 7 | 8 | ipacm_SOURCES = IPACM_Main.cpp \ 9 | IPACM_Conntrack_NATApp.cpp\ 10 | IPACM_ConntrackClient.cpp \ 11 | IPACM_ConntrackListener.cpp \ 12 | IPACM_EvtDispatcher.cpp \ 13 | IPACM_Config.cpp \ 14 | IPACM_CmdQueue.cpp \ 15 | IPACM_Log.cpp \ 16 | IPACM_Filtering.cpp \ 17 | IPACM_Routing.cpp \ 18 | IPACM_Header.cpp \ 19 | IPACM_Lan.cpp \ 20 | IPACM_Iface.cpp \ 21 | IPACM_Wlan.cpp \ 22 | IPACM_Wan.cpp \ 23 | IPACM_IfaceManager.cpp \ 24 | IPACM_Neighbor.cpp \ 25 | IPACM_Netlink.cpp \ 26 | IPACM_Xml.cpp \ 27 | IPACM_LanToLan.cpp 28 | 29 | bin_PROGRAMS = ipacm 30 | 31 | requiredlibs = ${LIBXML_LIB} -lxml2 -lpthread -lnetfilter_conntrack -lnfnetlink\ 32 | ../../ipanat/src/libipanat.la 33 | 34 | AM_CPPFLAGS += "-std=c++0x" 35 | 36 | if USE_GLIB 37 | ipacm_CFLAGS = $(AM_CFLAGS) -DUSE_GLIB @GLIB_CFLAGS@ 38 | ipacm_LDFLAGS = -lpthread @GLIB_LIBS@ 39 | ipacm_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 40 | else 41 | ipacm_CFLAGS = $(AM_CFLAGS) 42 | ipacm_LDFLAGS = -lpthread 43 | ipacm_CPPFLAGS = $(AM_CPPFLAGS) 44 | endif 45 | ipacm_LDADD = $(requiredlibs) 46 | 47 | LOCAL_MODULE := libipanat 48 | LOCAL_PRELINK_MODULE := false 49 | include $(BUILD_SHARED_LIBRARY) 50 | 51 | etcdir = ${sysconfdir} 52 | etc_SCRIPTS = IPACM_cfg.xml 53 | 54 | init_ddir = ${sysconfdir}/init.d 55 | init_d_SCRIPTS = start_ipacm_le 56 | -------------------------------------------------------------------------------- /light/service.cpp: -------------------------------------------------------------------------------- 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 | 17 | #define LOG_TAG "android.hardware.light@2.0-service.xiaomi_sdm660" 18 | 19 | #include 20 | #include 21 | 22 | #include "Light.h" 23 | 24 | using android::hardware::configureRpcThreadpool; 25 | using android::hardware::joinRpcThreadpool; 26 | 27 | using android::hardware::light::V2_0::ILight; 28 | using android::hardware::light::V2_0::implementation::Light; 29 | 30 | using android::OK; 31 | using android::sp; 32 | using android::status_t; 33 | 34 | int main() { 35 | sp service = new Light(); 36 | 37 | configureRpcThreadpool(1, true); 38 | 39 | status_t status = service->registerAsService(); 40 | if (status != OK) { 41 | LOG(ERROR) << "Cannot register Light HAL service."; 42 | return 1; 43 | } 44 | 45 | LOG(DEBUG) << "Light HAL service ready."; 46 | 47 | joinRpcThreadpool(); 48 | 49 | LOG(ERROR) << "Light HAL service failed to join thread pool."; 50 | return 1; 51 | } 52 | -------------------------------------------------------------------------------- /power-libperfmgr/libperfmgr/include/perfmgr/PropertyNode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 specic language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_LIBPERFMGR_PROPERTYNODE_H_ 18 | #define ANDROID_LIBPERFMGR_PROPERTYNODE_H_ 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #include "perfmgr/Node.h" 25 | 26 | namespace android { 27 | namespace perfmgr { 28 | 29 | // PropertyNode represents managed system properties 30 | class PropertyNode : public Node { 31 | public: 32 | PropertyNode(std::string name, std::string node_path, 33 | std::vector req_sorted, 34 | std::size_t default_val_index, bool reset_on_init); 35 | 36 | std::chrono::milliseconds Update(bool log_error) override; 37 | 38 | void DumpToFd(int fd) const override; 39 | 40 | private: 41 | PropertyNode(const Node& other) = delete; 42 | PropertyNode& operator=(Node const&) = delete; 43 | }; 44 | 45 | } // namespace perfmgr 46 | } // namespace android 47 | 48 | #endif // ANDROID_LIBPERFMGR_PROPERTYNODE_H_ 49 | -------------------------------------------------------------------------------- /DeviceSettings/src/org/lineageos/settings/device/preferences/VibrationSeekBarPreference.java: -------------------------------------------------------------------------------- 1 | package org.lineageos.settings.device.preferences; 2 | 3 | import android.content.Context; 4 | import android.os.VibrationEffect; 5 | import android.os.Vibrator; 6 | import android.util.AttributeSet; 7 | import android.widget.SeekBar; 8 | 9 | public class VibrationSeekBarPreference extends SecureSettingCustomSeekBarPreference { 10 | 11 | private final Vibrator mVibrator; 12 | 13 | public VibrationSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { 14 | super(context, attrs, defStyleAttr, defStyleRes); 15 | mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); 16 | } 17 | 18 | public VibrationSeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr) { 19 | super(context, attrs, defStyleAttr); 20 | mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); 21 | } 22 | 23 | public VibrationSeekBarPreference(Context context, AttributeSet attrs) { 24 | super(context, attrs); 25 | mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); 26 | } 27 | 28 | public VibrationSeekBarPreference(Context context) { 29 | super(context); 30 | mVibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); 31 | } 32 | 33 | @Override 34 | public void onStopTrackingTouch(SeekBar seekBar) { 35 | notifyChanged(); 36 | if (mVibrator.hasVibrator()) { 37 | mVibrator.vibrate(VibrationEffect.createOneShot(15, VibrationEffect.DEFAULT_AMPLITUDE)); 38 | } 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /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_SANITIZE += $(GNSS_SANITIZE) 10 | # activate the following line for debug purposes only, comment out for production 11 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 12 | LOCAL_VENDOR_MODULE := true 13 | LOCAL_MODULE_TAGS := optional 14 | 15 | LOCAL_SHARED_LIBRARIES := \ 16 | liblog \ 17 | libutils \ 18 | libcutils \ 19 | libgps.utils \ 20 | libdl \ 21 | liblog 22 | 23 | LOCAL_SRC_FILES += \ 24 | LocApiBase.cpp \ 25 | LocAdapterBase.cpp \ 26 | ContextBase.cpp \ 27 | LocContext.cpp \ 28 | loc_core_log.cpp \ 29 | data-items/DataItemsFactoryProxy.cpp \ 30 | SystemStatusOsObserver.cpp \ 31 | SystemStatus.cpp 32 | 33 | LOCAL_CFLAGS += \ 34 | -fno-short-enums \ 35 | -D_ANDROID_ 36 | 37 | LOCAL_C_INCLUDES:= \ 38 | $(LOCAL_PATH)/data-items \ 39 | $(LOCAL_PATH)/data-items/common \ 40 | $(LOCAL_PATH)/observer \ 41 | 42 | LOCAL_HEADER_LIBRARIES := \ 43 | libutils_headers \ 44 | libgps.utils_headers \ 45 | libloc_pla_headers \ 46 | liblocation_api_headers 47 | 48 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 49 | 50 | include $(BUILD_SHARED_LIBRARY) 51 | 52 | include $(CLEAR_VARS) 53 | LOCAL_MODULE := libloc_core_headers 54 | LOCAL_EXPORT_C_INCLUDE_DIRS := \ 55 | $(LOCAL_PATH) \ 56 | $(LOCAL_PATH)/data-items \ 57 | $(LOCAL_PATH)/data-items/common \ 58 | $(LOCAL_PATH)/observer 59 | include $(BUILD_HEADER_LIBRARY) 60 | 61 | endif # not BUILD_TINY_ANDROID 62 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 63 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 22 | 24 | 25 | 26 | 27 | true 28 | 29 | 30 | org.codeaurora.ims 31 | 32 | 33 | com.android.service.ims 34 | 35 | -------------------------------------------------------------------------------- /vndk/Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2019 The LineageOS Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | LOCAL_PATH := $(call my-dir) 18 | 19 | include $(LOCAL_PATH)/vndk-ext-libs.mk 20 | 21 | define define-vndk-lib 22 | include $$(CLEAR_VARS) 23 | LOCAL_MODULE := $1.vndk-ext-gen 24 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES 25 | LOCAL_PREBUILT_MODULE_FILE := $$(call intermediates-dir-for,SHARED_LIBRARIES,$1,,,$3,)/$1.so 26 | LOCAL_STRIP_MODULE := false 27 | LOCAL_MULTILIB := $2 28 | LOCAL_MODULE_TAGS := optional 29 | LOCAL_INSTALLED_MODULE_STEM := $$(basename $1).so 30 | LOCAL_MODULE_SUFFIX := .so 31 | LOCAL_VENDOR_MODULE := true 32 | LOCAL_CHECK_ELF_FILES := false 33 | include $$(BUILD_PREBUILT) 34 | endef 35 | 36 | $(foreach lib,$(EXTRA_VENDOR_LIBRARIES_32),\ 37 | $(eval $(call define-vndk-lib,$(lib),32,$(TARGET_2ND_ARCH_VAR_PREFIX)))) 38 | 39 | $(foreach lib,$(EXTRA_VENDOR_LIBRARIES_64),\ 40 | $(eval $(call define-vndk-lib,$(lib),first,))) 41 | 42 | include $(CLEAR_VARS) 43 | LOCAL_MODULE := vndk-ext 44 | LOCAL_MODULE_TAGS := optional 45 | LOCAL_CHECK_ELF_FILES := false 46 | LOCAL_REQUIRED_MODULES := $(addsuffix .vndk-ext-gen,$(EXTRA_VENDOR_LIBRARIES_32) $(EXTRA_VENDOR_LIBRARIES_64)) 47 | include $(BUILD_PHONY_PACKAGE) 48 | -------------------------------------------------------------------------------- /power-libperfmgr/libperfmgr/include/perfmgr/FileNode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 specic language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_LIBPERFMGR_FILENODE_H_ 18 | #define ANDROID_LIBPERFMGR_FILENODE_H_ 19 | 20 | #include 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | #include "perfmgr/Node.h" 27 | 28 | namespace android { 29 | namespace perfmgr { 30 | 31 | // FileNode represents file 32 | class FileNode : public Node { 33 | public: 34 | FileNode(std::string name, std::string node_path, 35 | std::vector req_sorted, std::size_t default_val_index, 36 | bool reset_on_init, bool hold_fd = false); 37 | 38 | std::chrono::milliseconds Update(bool log_error) override; 39 | 40 | bool GetHoldFd() const; 41 | 42 | void DumpToFd(int fd) const override; 43 | 44 | private: 45 | FileNode(const Node& other) = delete; 46 | FileNode& operator=(Node const&) = delete; 47 | 48 | const bool hold_fd_; 49 | const std::chrono::milliseconds warn_timeout_; 50 | android::base::unique_fd fd_; 51 | }; 52 | 53 | } // namespace perfmgr 54 | } // namespace android 55 | 56 | #endif // ANDROID_LIBPERFMGR_FILENODE_H_ 57 | -------------------------------------------------------------------------------- /gps/utils/Android.mk: -------------------------------------------------------------------------------- 1 | ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),) 2 | ifneq ($(BUILD_TINY_ANDROID),true) 3 | #Compile this library only for builds with the latest modem image 4 | 5 | LOCAL_PATH := $(call my-dir) 6 | 7 | include $(CLEAR_VARS) 8 | 9 | 10 | ## Libs 11 | LOCAL_SHARED_LIBRARIES := \ 12 | libdl \ 13 | libutils \ 14 | libcutils \ 15 | liblog \ 16 | libprocessgroup 17 | 18 | LOCAL_SRC_FILES += \ 19 | loc_log.cpp \ 20 | loc_cfg.cpp \ 21 | msg_q.c \ 22 | linked_list.c \ 23 | loc_target.cpp \ 24 | LocHeap.cpp \ 25 | LocTimer.cpp \ 26 | LocThread.cpp \ 27 | MsgTask.cpp \ 28 | loc_misc_utils.cpp \ 29 | loc_nmea.cpp \ 30 | LocIpc.cpp \ 31 | LogBuffer.cpp 32 | 33 | # Flag -std=c++11 is not accepted by compiler when LOCAL_CLANG is set to true 34 | LOCAL_CFLAGS += \ 35 | -fno-short-enums \ 36 | -D_ANDROID_ 37 | 38 | ifeq ($(TARGET_BUILD_VARIANT),user) 39 | LOCAL_CFLAGS += -DTARGET_BUILD_VARIANT_USER 40 | endif 41 | 42 | LOCAL_LDFLAGS += -Wl,--export-dynamic 43 | 44 | ## Includes 45 | LOCAL_HEADER_LIBRARIES := \ 46 | libutils_headers \ 47 | libloc_pla_headers \ 48 | liblocation_api_headers 49 | 50 | LOCAL_MODULE := libgps.utils 51 | LOCAL_SANITIZE += $(GNSS_SANITIZE) 52 | # activate the following line for debug purposes only, comment out for production 53 | #LOCAL_SANITIZE_DIAG += $(GNSS_SANITIZE_DIAG) 54 | LOCAL_VENDOR_MODULE := true 55 | LOCAL_MODULE_TAGS := optional 56 | 57 | LOCAL_PRELINK_MODULE := false 58 | 59 | LOCAL_CFLAGS += $(GNSS_CFLAGS) 60 | 61 | include $(BUILD_SHARED_LIBRARY) 62 | 63 | include $(CLEAR_VARS) 64 | LOCAL_MODULE := libgps.utils_headers 65 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 66 | include $(BUILD_HEADER_LIBRARY) 67 | 68 | endif # not BUILD_TINY_ANDROID 69 | endif # BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE 70 | -------------------------------------------------------------------------------- /configs/privapp-permission/privapp-permissions-qti-product.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /rootdir/bin/init.goodix.sh: -------------------------------------------------------------------------------- 1 | #! /vendor/bin/sh 2 | 3 | # Copyright (c) 2009-2016, 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 met: 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # * Neither the name of The Linux Foundation nor 13 | # the names of its contributors may be used to endorse or promote 14 | # products derived from this software without specific prior written 15 | # permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 21 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 27 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | 30 | if [ ! -f /data/system/users/0/settings_fingerprint.xml ]; then 31 | rm -rf /mnt/vendor/persist/data/finger_* 32 | fi 33 | -------------------------------------------------------------------------------- /DeviceSettings/src/org/lineageos/settings/device/DeviceSettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 The Xiaomi-SDM660 Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License 15 | */ 16 | 17 | package org.lineageos.settings.device; 18 | 19 | import android.app.Activity; 20 | import android.app.Fragment; 21 | import android.os.Bundle; 22 | import android.view.MenuItem; 23 | 24 | public class DeviceSettingsActivity extends Activity { 25 | 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | 30 | getActionBar().setDisplayHomeAsUpEnabled(true); 31 | 32 | Fragment fragment = getFragmentManager().findFragmentById(android.R.id.content); 33 | DeviceSettings deviceSettingsFragment; 34 | if (fragment == null) { 35 | deviceSettingsFragment = new DeviceSettings(); 36 | getFragmentManager().beginTransaction() 37 | .add(android.R.id.content, deviceSettingsFragment) 38 | .commit(); 39 | } 40 | } 41 | 42 | @Override 43 | public boolean onOptionsItemSelected(MenuItem item) { 44 | if (item.getItemId() == android.R.id.home) { 45 | finish(); 46 | return true; 47 | } 48 | return super.onOptionsItemSelected(item); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /biometrics/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2017 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 "android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm660" 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include "BiometricsFingerprint.h" 25 | 26 | using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint; 27 | using android::hardware::biometrics::fingerprint::V2_1::implementation::BiometricsFingerprint; 28 | using android::hardware::configureRpcThreadpool; 29 | using android::hardware::joinRpcThreadpool; 30 | using android::sp; 31 | 32 | int main() { 33 | android::sp bio = BiometricsFingerprint::getInstance(); 34 | 35 | configureRpcThreadpool(1, true /*callerWillJoin*/); 36 | 37 | if (bio != nullptr) { 38 | if (::android::OK != bio->registerAsService()) { 39 | return 1; 40 | } 41 | } else { 42 | ALOGE("Can't create instance of BiometricsFingerprint, nullptr"); 43 | } 44 | 45 | joinRpcThreadpool(); 46 | 47 | return 0; // should never get here 48 | } 49 | -------------------------------------------------------------------------------- /gps/android/1.0/android.hardware.gnss@1.0-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.0::IGnss/default 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /gps/android/1.1/android.hardware.gnss@1.1-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.1::IGnss/default 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /gps/android/utils/battery_listener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, The Linux Foundation. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are 6 | * met: 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above 10 | * copyright notice, this list of conditions and the following 11 | * disclaimer in the documentation and/or other materials provided 12 | * with the distribution. 13 | * * Neither the name of The Linux Foundation nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | typedef void (* battery_status_change_fn_t)(bool); 30 | void loc_extn_battery_properties_listener_init(battery_status_change_fn_t fn); 31 | void loc_extn_battery_properties_listener_deinit(); 32 | bool loc_extn_battery_properties_is_charging(); 33 | -------------------------------------------------------------------------------- /DeviceSettings/res/values-es-rMX/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | Ajustes Device 18 | Ajustes extras de device 19 | 20 | Pantalla 21 | 22 | 23 | Calibrar Color de Pantalla 24 | 25 | Retroalimentación háptica 26 | Fuerza 27 | 28 | 29 | Rendimiento 30 | Ajustes de Rendimiento 31 | Elija su configuración de Rendimiento 32 | Elija su configuración de Rendimiento 33 | 34 | 35 | Rendimiento 36 | Batería 37 | Juego 38 | Balance 39 | Batería Extrema 40 | 41 | -------------------------------------------------------------------------------- /gps/android/1.0/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 18 | #define ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 19 | 20 | 21 | #include 22 | #include 23 | 24 | namespace android { 25 | namespace hardware { 26 | namespace gnss { 27 | namespace V1_0 { 28 | namespace implementation { 29 | 30 | using ::android::hardware::gnss::V1_0::IGnssDebug; 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | using ::android::hardware::hidl_vec; 34 | using ::android::hardware::hidl_string; 35 | using ::android::sp; 36 | 37 | /* Interface for GNSS Debug support. */ 38 | struct Gnss; 39 | struct GnssDebug : public IGnssDebug { 40 | GnssDebug(Gnss* gnss); 41 | ~GnssDebug() {}; 42 | 43 | /* 44 | * Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow. 45 | * These declarations were generated from IGnssDebug.hal. 46 | */ 47 | Return getDebugData(getDebugData_cb _hidl_cb) override; 48 | 49 | private: 50 | Gnss* mGnss = nullptr; 51 | }; 52 | 53 | } // namespace implementation 54 | } // namespace V1_0 55 | } // namespace gnss 56 | } // namespace hardware 57 | } // namespace android 58 | 59 | #endif // ANDROID_HARDWARE_GNSS_V1_0_GNSSDEBUG_H 60 | -------------------------------------------------------------------------------- /gps/android/1.1/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H 18 | #define ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H 19 | 20 | 21 | #include 22 | #include 23 | 24 | namespace android { 25 | namespace hardware { 26 | namespace gnss { 27 | namespace V1_1 { 28 | namespace implementation { 29 | 30 | using ::android::hardware::gnss::V1_0::IGnssDebug; 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | using ::android::hardware::hidl_vec; 34 | using ::android::hardware::hidl_string; 35 | using ::android::sp; 36 | 37 | /* Interface for GNSS Debug support. */ 38 | struct Gnss; 39 | struct GnssDebug : public IGnssDebug { 40 | GnssDebug(Gnss* gnss); 41 | ~GnssDebug() {}; 42 | 43 | /* 44 | * Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow. 45 | * These declarations were generated from IGnssDebug.hal. 46 | */ 47 | Return getDebugData(getDebugData_cb _hidl_cb) override; 48 | 49 | private: 50 | Gnss* mGnss = nullptr; 51 | }; 52 | 53 | } // namespace implementation 54 | } // namespace V1_1 55 | } // namespace gnss 56 | } // namespace hardware 57 | } // namespace android 58 | 59 | #endif // ANDROID_HARDWARE_GNSS_V1_1_GNSSDEBUG_H 60 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipanat/src/ipa_nat_logi.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013, The Linux Foundation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | /*! 30 | @file 31 | IPACM_log.cpp 32 | 33 | @brief 34 | This file implements the IPAM log functionality. 35 | 36 | @Author 37 | Skylar Chang 38 | 39 | */ 40 | #include "ipa_nat_logi.h" 41 | #include 42 | #include 43 | 44 | void log_nat_message(char *msg) 45 | { 46 | return; 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /DeviceDoze/src/com/advanced/settings/doze/DozeTileService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018-2020 The Xiaomi-SDM660 Project 3 | * 4 | * https://github.com/xiaomi-sdm660 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 | package com.advanced.settings.doze; 20 | 21 | import android.annotation.TargetApi; 22 | import android.content.Intent; 23 | import android.service.quicksettings.Tile; 24 | import android.service.quicksettings.TileService; 25 | 26 | import com.advanced.settings.doze.R; 27 | 28 | @TargetApi(24) 29 | public class DozeTileService extends TileService { 30 | @Override 31 | public void onDestroy() { 32 | super.onDestroy(); 33 | } 34 | 35 | @Override 36 | public void onTileAdded() { 37 | super.onTileAdded(); 38 | } 39 | 40 | @Override 41 | public void onTileRemoved() { 42 | super.onTileRemoved(); 43 | } 44 | 45 | @Override 46 | public void onStartListening() { 47 | super.onStartListening(); 48 | } 49 | 50 | @Override 51 | public void onStopListening() { 52 | super.onStopListening(); 53 | } 54 | 55 | @Override 56 | public void onClick() { 57 | super.onClick(); 58 | Intent DeviceDoze = new Intent(this, DozeSettingsActivity.class); 59 | DeviceDoze.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 60 | startActivityAndCollapse(DeviceDoze); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | 25 | 6 26 | 7 27 | 28 | 29 | true 30 | 31 | 32 | true 33 | 34 | 35 | 4 36 | 37 | 38 | 2 39 | 40 | 41 | wifi,bt,dnd,flashlight,rotation,battery,cell,airplane,cast,hotspot,screenrecord,dark 42 | 43 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/ipacm/src/ipacm.rc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2019, 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 | # msm specific files that need to be created on /data 29 | on post-fs-data 30 | mkdir /data/vendor/ipa 0770 radio radio 31 | chmod 0770 /data/vendor/ipa 32 | 33 | service vendor.ipacm /system/vendor/bin/ipacm 34 | class late_start 35 | user radio 36 | group radio inet 37 | writepid /dev/cpuset/system-background/tasks 38 | -------------------------------------------------------------------------------- /gps/android/2.0/android.hardware.gnss@2.0-service-qti.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.hardware.gnss 31 | hwbinder 32 | @1.0::IGnss/gnss_vendor 33 | @1.1::IGnss/default 34 | @2.0::IGnss/default 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /rootdir/bin/init.qcom.early_boot.sh: -------------------------------------------------------------------------------- 1 | #!/vendor/bin/sh 2 | 3 | # Copyright (c) 2012-2013,2016,2018 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 met: 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # * Neither the name of The Linux Foundation nor 13 | # the names of its contributors may be used to endorse or promote 14 | # products derived from this software without specific prior written 15 | # permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 21 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 27 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | 30 | boot_reason=`cat /proc/sys/kernel/boot_reason` 31 | reboot_reason=`getprop ro.boot.alarmboot` 32 | if [ "$boot_reason" = "3" ] || [ "$reboot_reason" = "true" ]; then 33 | setprop ro.vendor.alarm_boot true 34 | else 35 | setprop ro.vendor.alarm_boot false 36 | fi 37 | -------------------------------------------------------------------------------- /framework_manifest.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | 31 | vendor.qti.hardware.radio.atcmdfwd 32 | hwbinder 33 | 1.0 34 | 35 | IAtCmdFwd 36 | AtCmdFwdService 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /DeviceSettings/res/layout/custom_seekbar_preference_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 24 | 25 | 31 | 32 | 38 | 39 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /data-ipa-cfg-mgr/configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_PREREQ([2.65]) 5 | AC_INIT(data-ipa, 1.0.0) 6 | AM_INIT_AUTOMAKE(data-ipa, 1.0.0) 7 | AC_OUTPUT(Makefile ipanat/src/Makefile ipacm/src/Makefile) 8 | AC_CONFIG_SRCDIR([ipanat/src/ipa_nat_drv.c]) 9 | AC_CONFIG_HEADERS([config.h]) 10 | AC_CONFIG_MACRO_DIR([m4]) 11 | 12 | # Checks for programs. 13 | AC_PROG_CC 14 | AC_PROG_LIBTOOL 15 | AC_PROG_CXX 16 | 17 | PKG_CHECK_MODULES([LIBXML], [libxml-2.0]) 18 | AC_SUBST([LIBXML_CFLAGS]) 19 | AC_SUBST([LIBXML_LIBS]) 20 | 21 | # Checks for libraries. 22 | 23 | AC_ARG_WITH(sanitized-headers, 24 | AS_HELP_STRING([--with-sanitized-headers=DIR], 25 | [Specify the location of the sanitized Linux headers]), 26 | [CPPFLAGS="$CPPFLAGS -idirafter $withval"]) 27 | AM_CONDITIONAL(KERNELMODULES, [test -n -eq 0]) 28 | 29 | AC_ARG_WITH([glib], 30 | AC_HELP_STRING([--with-glib], 31 | [enable glib, building HLOS systems which use glib])) 32 | 33 | if (test "x${with_glib}" = "xyes"); then 34 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 35 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 36 | AC_MSG_ERROR(GThread >= 2.16 is required)) 37 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 38 | AC_MSG_ERROR(GLib >= 2.16 is required)) 39 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 40 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 41 | AC_SUBST(GLIB_CFLAGS) 42 | AC_SUBST(GLIB_LIBS) 43 | fi 44 | 45 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 46 | 47 | # Checks for header files. 48 | AC_CHECK_HEADERS([fcntl.h netinet/in.h sys/ioctl.h unistd.h]) 49 | 50 | # Checks for typedefs, structures, and compiler characteristics. 51 | AC_TYPE_OFF_T 52 | 53 | # Checks for library functions. 54 | AC_FUNC_MALLOC 55 | AC_FUNC_MMAP 56 | AC_CHECK_FUNCS([memset munmap]) 57 | 58 | AC_OUTPUT 59 | -------------------------------------------------------------------------------- /power-libperfmgr/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2018 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 | cc_library { 17 | name: "libdisppower-xiaomi_sdm660", 18 | proprietary: true, 19 | srcs: [ 20 | "disp-power/InteractionHandler.cpp", 21 | ], 22 | shared_libs: [ 23 | "libbase", 24 | "libcutils", 25 | "liblog", 26 | "libperfmgr", 27 | "libutils", 28 | ], 29 | } 30 | 31 | cc_library_headers { 32 | name: "xiaomi_sdm660_power_headers", 33 | vendor: true, 34 | export_include_dirs: ["hidl"], 35 | } 36 | 37 | cc_binary { 38 | name: "android.hardware.power@1.3-service.xiaomi_sdm660-libperfmgr", 39 | relative_install_path: "hw", 40 | vintf_fragments: ["hidl/android.hardware.power@1.3-service.xiaomi_sdm660.xml"], 41 | init_rc: ["hidl/android.hardware.power@1.3-service.xiaomi_sdm660-libperfmgr.rc"], 42 | srcs: [ 43 | "hidl/service.cpp", 44 | "hidl/Power.cpp", 45 | "hidl/power-helper.c", 46 | ], 47 | cflags: [ 48 | "-Wall", 49 | "-Werror", 50 | ], 51 | shared_libs: [ 52 | "libbase", 53 | "libhidlbase", 54 | "liblog", 55 | "libutils", 56 | "libcutils", 57 | "android.hardware.power@1.0", 58 | "android.hardware.power@1.1", 59 | "android.hardware.power@1.2", 60 | "android.hardware.power@1.3", 61 | "libdisppower-xiaomi_sdm660", 62 | "libperfmgr", 63 | ], 64 | proprietary: true, 65 | } 66 | -------------------------------------------------------------------------------- /gps/android/2.0/GnssDebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 3 | * Not a Contribution 4 | */ 5 | /* 6 | * Copyright (C) 2016 The Android Open Source Project 7 | * 8 | * Licensed under the Apache License, Version 2.0 (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | #ifndef ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 22 | #define ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 23 | 24 | 25 | #include 26 | #include 27 | 28 | namespace android { 29 | namespace hardware { 30 | namespace gnss { 31 | namespace V2_0 { 32 | namespace implementation { 33 | 34 | using ::android::hardware::gnss::V2_0::IGnssDebug; 35 | using ::android::hardware::Return; 36 | using ::android::hardware::Void; 37 | using ::android::hardware::hidl_vec; 38 | using ::android::hardware::hidl_string; 39 | using ::android::sp; 40 | 41 | /* Interface for GNSS Debug support. */ 42 | struct Gnss; 43 | struct GnssDebug : public IGnssDebug { 44 | GnssDebug(Gnss* gnss); 45 | ~GnssDebug() {}; 46 | 47 | // Methods from ::android::hardware::gnss::V1_0::IGnssDebug follow 48 | Return getDebugData(getDebugData_cb _hidl_cb) override; 49 | // Methods from ::android::hardware::gnss::V2_0::IGnssDebug follow. 50 | Return getDebugData_2_0(getDebugData_2_0_cb _hidl_cb) override; 51 | 52 | private: 53 | Gnss* mGnss = nullptr; 54 | }; 55 | 56 | } // namespace implementation 57 | } // namespace V2_0 58 | } // namespace gnss 59 | } // namespace hardware 60 | } // namespace android 61 | 62 | #endif // ANDROID_HARDWARE_GNSS_V2_0_GNSSDEBUG_H 63 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc004/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 6 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc260/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 3 36 | 37 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values-mcc310-mnc410/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 29 | 30 | 31 | 32 | 35 | 3 36 | 37 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /gps/geofence/configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ(2.61) 2 | AC_INIT([location-geofence], 1.0.0) 3 | AM_INIT_AUTOMAKE([foreign subdir-objects]) 4 | AC_CONFIG_SRCDIR([Makefile.am]) 5 | AC_CONFIG_HEADERS([config.h]) 6 | AC_CONFIG_MACRO_DIR([m4]) 7 | 8 | # Check for programs 9 | AC_PROG_LIBTOOL 10 | AC_PROG_CXX 11 | AC_PROG_CC 12 | AM_PROG_CC_C_O 13 | AC_PROG_AWK 14 | AC_PROG_CPP 15 | AC_PROG_INSTALL 16 | AC_PROG_LN_S 17 | AC_PROG_MAKE_SET 18 | PKG_PROG_PKG_CONFIG 19 | 20 | # Check for libraries 21 | PKG_CHECK_MODULES([GPSUTILS], [gps-utils]) 22 | AC_SUBST([GPSUTILS_CFLAGS]) 23 | AC_SUBST([GPSUTILS_LIBS]) 24 | 25 | PKG_CHECK_MODULES([LOCCORE], [loc-core]) 26 | AC_SUBST([LOCCORE_CFLAGS]) 27 | AC_SUBST([LOCCORE_LIBS]) 28 | 29 | AS_CASE([$host], 30 | [arm*], [ARM=yes], 31 | [ARM=no] 32 | ) 33 | 34 | AC_ARG_WITH([locpla_includes], 35 | AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], 36 | [specify the path to locpla-includes in loc-pla_git.bb]), 37 | [locpla_incdir=$withval], 38 | with_locpla_includes=no) 39 | 40 | if test "x$with_locpla_includes" != "xno"; then 41 | AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") 42 | fi 43 | 44 | AC_ARG_WITH([glib], 45 | AC_HELP_STRING([--with-glib], 46 | [enable glib, building HLOS systems which use glib])) 47 | 48 | if (test "x${with_glib}" = "xyes"); then 49 | AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) 50 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, 51 | AC_MSG_ERROR(GThread >= 2.16 is required)) 52 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, 53 | AC_MSG_ERROR(GLib >= 2.16 is required)) 54 | GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" 55 | GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" 56 | 57 | AC_SUBST(GLIB_CFLAGS) 58 | AC_SUBST(GLIB_LIBS) 59 | fi 60 | 61 | AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") 62 | 63 | AC_SUBST([CFLAGS]) 64 | AC_SUBST([CPPFLAGS]) 65 | AC_SUBST([LIBS]) 66 | 67 | AC_CONFIG_FILES([ \ 68 | Makefile \ 69 | location-geofence.pc 70 | ]) 71 | 72 | AC_OUTPUT 73 | -------------------------------------------------------------------------------- /gps/utils/Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | AM_CFLAGS = -Wundef \ 4 | -MD \ 5 | -Wno-trigraphs \ 6 | -g -O0 \ 7 | -fno-inline \ 8 | -fno-short-enums \ 9 | -fpic \ 10 | -I./ \ 11 | -std=c++14 \ 12 | $(LOCPLA_CFLAGS) 13 | 14 | libgps_utils_la_h_sources = \ 15 | msg_q.h \ 16 | linked_list.h \ 17 | loc_cfg.h \ 18 | loc_log.h \ 19 | loc_target.h \ 20 | loc_timer.h \ 21 | MsgTask.h \ 22 | LocHeap.h \ 23 | LocThread.h \ 24 | LocTimer.h \ 25 | LocIpc.h \ 26 | SkipList.h\ 27 | loc_misc_utils.h \ 28 | loc_nmea.h \ 29 | gps_extended_c.h \ 30 | gps_extended.h \ 31 | loc_gps.h \ 32 | log_util.h \ 33 | LocSharedLock.h \ 34 | LocUnorderedSetMap.h 35 | 36 | libgps_utils_la_c_sources = \ 37 | linked_list.c \ 38 | msg_q.c \ 39 | loc_cfg.cpp \ 40 | loc_log.cpp \ 41 | loc_target.cpp \ 42 | LocHeap.cpp \ 43 | LocTimer.cpp \ 44 | LocThread.cpp \ 45 | LocIpc.cpp \ 46 | LogBuffer.cpp \ 47 | MsgTask.cpp \ 48 | loc_misc_utils.cpp \ 49 | loc_nmea.cpp 50 | 51 | library_includedir = $(pkgincludedir) 52 | 53 | library_include_HEADERS = $(libgps_utils_la_h_sources) 54 | 55 | libgps_utils_la_SOURCES = $(libgps_utils_la_c_sources) 56 | 57 | if USE_GLIB 58 | libgps_utils_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ 59 | libgps_utils_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 60 | libgps_utils_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ 61 | else 62 | libgps_utils_la_CFLAGS = $(AM_CFLAGS) 63 | libgps_utils_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 64 | libgps_utils_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) 65 | endif 66 | 67 | libgps_utils_la_LIBADD = $(CUTILS_LIBS) -ldl 68 | 69 | #Create and Install libraries 70 | lib_LTLIBRARIES = libgps_utils.la 71 | 72 | pkgconfigdir = $(libdir)/pkgconfig 73 | pkgconfig_DATA = gps-utils.pc 74 | EXTRA_DIST = $(pkgconfig_DATA) 75 | -------------------------------------------------------------------------------- /power-libperfmgr/hidl/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2018 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 "android.hardware.power@1.3-service.xiaomi_sdm660-libperfmgr" 18 | 19 | #include 20 | #include 21 | 22 | #include "Power.h" 23 | 24 | using android::OK; 25 | using android::sp; 26 | using android::status_t; 27 | 28 | // libhwbinder: 29 | using android::hardware::configureRpcThreadpool; 30 | using android::hardware::joinRpcThreadpool; 31 | 32 | // Generated HIDL files 33 | using android::hardware::power::V1_3::IPower; 34 | using android::hardware::power::V1_3::implementation::Power; 35 | 36 | int main(int /* argc */, char ** /* argv */) { 37 | ALOGI("Power HAL Service 1.3 for Xiaomi SDM660 is starting."); 38 | 39 | android::sp service = new Power(); 40 | if (service == nullptr) { 41 | ALOGE("Can not create an instance of Power HAL Iface, exiting."); 42 | return 1; 43 | } 44 | android::hardware::setMinSchedulerPolicy(service, SCHED_NORMAL, -20); 45 | configureRpcThreadpool(1, true /*callerWillJoin*/); 46 | 47 | status_t status = service->registerAsService(); 48 | if (status != OK) { 49 | ALOGE("Could not register service for Power HAL Iface (%d), exiting.", status); 50 | return 1; 51 | } 52 | 53 | ALOGI("Power Service is ready"); 54 | joinRpcThreadpool(); 55 | 56 | // In normal operation, we don't expect the thread pool to exit 57 | ALOGE("Power Service is shutting down"); 58 | return 1; 59 | } 60 | -------------------------------------------------------------------------------- /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 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #ifndef _BDROID_BUILDCFG_H 23 | #define _BDROID_BUILDCFG_H 24 | 25 | #include 26 | #pragma push_macro("PROPERTY_VALUE_MAX") 27 | 28 | #include 29 | #include 30 | 31 | static inline const char* BtmGetDefaultName() 32 | { 33 | char product_model[PROPERTY_VALUE_MAX]; 34 | property_get("ro.product.model", product_model, ""); 35 | 36 | if (strstr(product_model, "Mi A2")) 37 | return "Mi A2"; 38 | if (strstr(product_model, "MI 6X")) 39 | return "MI 6X"; 40 | if (strstr(product_model, "MI PAD 4")) 41 | return "MI PAD 4"; 42 | if (strstr(product_model, "MI PAD 4 PLUS")) 43 | return "MI PAD 4 PLUS"; 44 | 45 | // Fallback to ro.product.model 46 | return ""; 47 | } 48 | #undef PROPERTY_VALUE_MAX 49 | 50 | #define BTM_DEF_LOCAL_NAME BtmGetDefaultName() 51 | #define BLUETOOTH_QTI_SW TRUE 52 | // Disables read remote device feature 53 | #define MAX_ACL_CONNECTIONS 16 54 | #define MAX_L2CAP_CHANNELS 32 55 | #define BLE_VND_INCLUDED TRUE 56 | #define GATT_MAX_PHY_CHANNEL 10 57 | // skips conn update at conn completion 58 | #define BT_CLEAN_TURN_ON_DISABLED 1 59 | 60 | #define AVDT_NUM_SEPS 35 61 | #pragma pop_macro("PROPERTY_VALUE_MAX") 62 | 63 | #endif 64 | --------------------------------------------------------------------------------