mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-01-27 18:19:03 +00:00
Merge commit '34f7f32ea4cca137547463132f06cb93dc8d04b3' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master Change-Id: I1f549411c9b9219fae6e602569778ae36c511055
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
subdirs = [
|
||||
"thermal",
|
||||
"vr",
|
||||
"vibrator",
|
||||
"wifi_offload",
|
||||
|
||||
@@ -34,6 +34,7 @@ BOARD_KERNEL_CMDLINE += service_locator.enable=1
|
||||
BOARD_KERNEL_CMDLINE += swiotlb=2048
|
||||
BOARD_KERNEL_CMDLINE += firmware_class.path=/vendor/firmware
|
||||
BOARD_KERNEL_CMDLINE += loop.max_part=7
|
||||
BOARD_KERNEL_CMDLINE += raid=noautodetect
|
||||
|
||||
BOARD_KERNEL_BASE := 0x00000000
|
||||
BOARD_KERNEL_PAGESIZE := 4096
|
||||
@@ -108,6 +109,7 @@ BOARD_QTI_CAMERA_32BIT_ONLY := true
|
||||
CAMERA_DAEMON_NOT_PRESENT := true
|
||||
TARGET_USES_ION := true
|
||||
TARGET_USES_EASEL := true
|
||||
BOARD_USES_EASEL := true
|
||||
|
||||
# GPS
|
||||
TARGET_NO_RPC := true
|
||||
@@ -164,3 +166,5 @@ BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
|
||||
|
||||
# Use mke2fs to create ext4 images
|
||||
TARGET_USES_MKE2FS := true
|
||||
|
||||
BOARD_VNDK_VERSION := current
|
||||
|
||||
@@ -21,9 +21,8 @@
|
||||
|
||||
#include <private/android_filesystem_config.h>
|
||||
|
||||
static const struct fs_path_config android_device_dirs[] = {
|
||||
{ 00771, AID_SYSTEM, AID_SYSTEM, 0, "bt_firmware"},
|
||||
};
|
||||
#define NO_ANDROID_FILESYSTEM_CONFIG_DEVICE_DIRS
|
||||
/* static const struct fs_path_config android_device_dirs[] = { }; */
|
||||
|
||||
/* Rules for files.
|
||||
** These rules are applied based on "first match", so they
|
||||
|
||||
@@ -69,9 +69,9 @@
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="voip_rx" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX">
|
||||
flags="AUDIO_OUTPUT_FLAG_VOIP_RX">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
|
||||
samplingRates="8000,16000,32000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="primary input" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
|
||||
|
||||
@@ -55,5 +55,17 @@
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
|
||||
<hal format="native" optional="false">
|
||||
<name>netutils-wrapper</name>
|
||||
<!--
|
||||
netutils-wrapper should only list a single version x.0.
|
||||
netutils-wrapper next version has less functionalities than
|
||||
previous versions, so unlike a HAL, netutils-wrapper are not
|
||||
backwards compatible. Hence the major version must be bumped for
|
||||
each update.
|
||||
Vendor code should switch to (x+1).0 completely before when the
|
||||
requirement is updated here.
|
||||
-->
|
||||
<version>1.0</version>
|
||||
</hal>
|
||||
</compatibility-matrix>
|
||||
|
||||
@@ -53,8 +53,12 @@
|
||||
|
||||
<exception
|
||||
package="com.verizon.mips.services">
|
||||
<!-- Call -->
|
||||
<permission name="android.permission.PROCESS_OUTGOING_CALLS" fixed="false"/>
|
||||
<!-- Phone -->
|
||||
<permission name="android.permission.READ_PHONE_STATE" fixed="false"/>
|
||||
<!-- SMS -->
|
||||
<permission name="android.permission.RECEIVE_SMS" fixed="false"/>
|
||||
</exception>
|
||||
|
||||
<exception
|
||||
|
||||
94
device.mk
94
device.mk
@@ -21,6 +21,10 @@ PRODUCT_COPY_FILES += \
|
||||
device/google/wahoo/default-permissions.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default-permissions/default-permissions.xml \
|
||||
frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
|
||||
|
||||
# Set the SVN for the targeted MR release
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.vendor.build.svn=4
|
||||
|
||||
# Enforce privapp-permissions whitelist
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.control_privapp_permissions=enforce
|
||||
@@ -67,7 +71,9 @@ PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/init.qcom.devstart.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.devstart.sh \
|
||||
$(LOCAL_PATH)/init.qcom.ipastart.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.qcom.ipastart.sh \
|
||||
$(LOCAL_PATH)/init.insmod.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.insmod.sh \
|
||||
$(LOCAL_PATH)/init.ramoops.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/init.ramoops.sh
|
||||
$(LOCAL_PATH)/init.ramoops.sh:$(TARGET_COPY_OUT_SYSTEM)/bin/init.ramoops.sh \
|
||||
frameworks/native/services/vr/virtual_touchpad/idc/vr-virtual-touchpad-0.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/vr-virtual-touchpad-0.idc \
|
||||
frameworks/native/services/vr/virtual_touchpad/idc/vr-virtual-touchpad-1.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/vr-virtual-touchpad-1.idc
|
||||
|
||||
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
||||
PRODUCT_COPY_FILES += \
|
||||
@@ -156,6 +162,7 @@ PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
|
||||
frameworks/native/data/etc/android.hardware.vr.headtracking-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vr.headtracking.xml \
|
||||
frameworks/native/data/etc/android.hardware.vr.high_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vr.high_performance.xml \
|
||||
frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
|
||||
frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
|
||||
frameworks/native/data/etc/android.hardware.vulkan.version-1_0_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
|
||||
frameworks/native/data/etc/android.hardware.telephony.carrierlock.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.carrierlock.xml \
|
||||
@@ -187,6 +194,10 @@ PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.camera.gzoom.at=0 \
|
||||
persist.camera.llv.fuse=2
|
||||
|
||||
# Enable camera ae saturation stats
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.camera.saturationext=1
|
||||
|
||||
# OEM Unlock reporting
|
||||
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
|
||||
ro.oem_unlock_supported=1
|
||||
@@ -203,6 +214,7 @@ PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.radio.data_ltd_sys_ind=1 \
|
||||
persist.radio.is_wps_enabled=true \
|
||||
persist.radio.videopause.mode=1 \
|
||||
persist.radio.sap_silent_pin=1 \
|
||||
persist.radio.sib16_support=1 \
|
||||
persist.radio.data_con_rprt=true \
|
||||
persist.radio.always_send_plmn=true \
|
||||
@@ -217,6 +229,29 @@ PRODUCT_PROPERTY_OVERRIDES += \
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.vendor.extension_library=libqti-perfd-client.so
|
||||
|
||||
# settings to enable Device Orientation Sensors
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.qti.sensors.dev_ori=true
|
||||
|
||||
# settings to disable unused secondary wakeup
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.qti.sensors.wu=false
|
||||
|
||||
# settings to disable unused algorithms
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.qti.sdk.sensors.gestures=false \
|
||||
ro.qti.sensors.amd=false \
|
||||
ro.qti.sensors.cmc=false \
|
||||
ro.qti.sensors.facing=false \
|
||||
ro.qti.sensors.pedometer=false \
|
||||
ro.qti.sensors.rmd=false \
|
||||
ro.qti.sensors.scrn_ortn=false
|
||||
|
||||
# use SMGR supplied version of step detector and counter
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.qti.sensors.step_counter=false \
|
||||
ro.qti.sensors.step_detector=false
|
||||
|
||||
# camera gyro and laser sensor
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.camera.gyro.android=20 \
|
||||
@@ -344,7 +379,7 @@ PRODUCT_PACKAGES += \
|
||||
|
||||
# Thermal packages
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.thermal@1.0-service.wahoo
|
||||
android.hardware.thermal@1.1-impl-wahoo
|
||||
|
||||
#GNSS HAL
|
||||
PRODUCT_PACKAGES += \
|
||||
@@ -423,10 +458,6 @@ PRODUCT_COPY_FILES += \
|
||||
# PRODUCT_COPY_FILES += \
|
||||
# frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml
|
||||
|
||||
# Thermal packages
|
||||
PRODUCT_PACKAGES += \
|
||||
thermal.default
|
||||
|
||||
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
||||
PRODUCT_PACKAGES += \
|
||||
tinyplay \
|
||||
@@ -499,10 +530,6 @@ $(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/wahoo/fstab.hardware:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(PRODUCT_HARDWARE)
|
||||
|
||||
# For SPN display
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/wahoo/spn-conf.xml:system/etc/spn-conf.xml
|
||||
|
||||
# Provide meaningful APN configuration
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/apns-full-conf.xml:system/etc/apns-conf.xml
|
||||
@@ -530,33 +557,10 @@ PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.frp.pst=/dev/block/platform/soc/1da4000.ufshc/by-name/frp
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.vendor.vndk.version=26.1.0 \
|
||||
ro.vendor.vndk.version=27.1.0 \
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.renderscript@1.0.vndk-sp\
|
||||
android.hardware.graphics.allocator@2.0.vndk-sp\
|
||||
android.hardware.graphics.mapper@2.0.vndk-sp\
|
||||
android.hardware.graphics.common@1.0.vndk-sp\
|
||||
libhwbinder.vndk-sp\
|
||||
libbase.vndk-sp\
|
||||
libcutils.vndk-sp\
|
||||
libhardware.vndk-sp\
|
||||
libhidlbase.vndk-sp\
|
||||
libhidltransport.vndk-sp\
|
||||
libutils.vndk-sp\
|
||||
libc++.vndk-sp\
|
||||
libRS_internal.vndk-sp\
|
||||
libRSDriver.vndk-sp\
|
||||
libRSCpuRef.vndk-sp\
|
||||
libbcinfo.vndk-sp\
|
||||
libblas.vndk-sp\
|
||||
libft2.vndk-sp\
|
||||
libpng.vndk-sp\
|
||||
libcompiler_rt.vndk-sp\
|
||||
libbacktrace.vndk-sp\
|
||||
libunwind.vndk-sp\
|
||||
liblzma.vndk-sp\
|
||||
libz.vndk-sp\
|
||||
# Include vndk/vndk-sp/ll-ndk modules
|
||||
PRODUCT_PACKAGES += vndk_package
|
||||
|
||||
PRODUCT_ENFORCE_RRO_TARGETS := framework-res
|
||||
|
||||
@@ -582,13 +586,9 @@ PRODUCT_PROPERTY_OVERRIDES += \
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.sys.sf.color_saturation=1.1
|
||||
|
||||
# Add minidebug info to the system server to support diagnosing native crashes.
|
||||
ifneq (,$(filter user userdebug, $(TARGET_BUILD_VARIANT)))
|
||||
# System server and some of its services.
|
||||
# Note: we cannot use PRODUCT_SYSTEM_SERVER_JARS, as it has not been expanded at this point.
|
||||
$(call add-product-dex-preopt-module-config,services,--generate-mini-debug-info)
|
||||
$(call add-product-dex-preopt-module-config,wifi-service,--generate-mini-debug-info)
|
||||
endif
|
||||
# Easel device feature
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/wahoo/permissions/com.google.hardware.camera.easel.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.google.hardware.camera.easel.xml
|
||||
|
||||
# QC time-daemon to use persist
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
@@ -603,6 +603,14 @@ PRODUCT_PROPERTY_OVERRIDES += \
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.camera.perfd.enable=true
|
||||
|
||||
# Enable Gcam FD Ensemble
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.camera.gcam.fd.ensemble=1
|
||||
|
||||
# Preopt SystemUI
|
||||
PRODUCT_DEXPREOPT_SPEED_APPS += \
|
||||
SystemUIGoogle
|
||||
|
||||
# audio effects config
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
fmas.hdph_sgain=0
|
||||
|
||||
@@ -182,6 +182,10 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
|
||||
DumpFileToFd(fd, "SoC serial number", "/sys/devices/soc0/serial_number");
|
||||
DumpFileToFd(fd, "CPU present", "/sys/devices/system/cpu/present");
|
||||
DumpFileToFd(fd, "CPU online", "/sys/devices/system/cpu/online");
|
||||
DumpFileToFd(fd, "UFS model", "/sys/block/sda/device/model");
|
||||
DumpFileToFd(fd, "UFS rev", "/sys/block/sda/device/rev");
|
||||
DumpFileToFd(fd, "UFS size", "/sys/block/sda/size");
|
||||
RunCommandToFd(fd, "UFS health", {"/vendor/bin/sh", "-c", "for f in $(find /sys/kernel/debug/ufshcd0 -type f); do if [[ -r $f && -f $f ]]; then echo --- $f; cat $f; fi; done"});
|
||||
DumpFileToFd(fd, "INTERRUPTS", "/proc/interrupts");
|
||||
DumpFileToFd(fd, "RPM Stats", "/d/rpm_stats");
|
||||
DumpFileToFd(fd, "Power Management Stats", "/d/rpm_master_stats");
|
||||
@@ -192,10 +196,13 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
|
||||
RunCommandToFd(fd, "ION HEAPS", {"/vendor/bin/sh", "-c", "for d in $(ls -d /d/ion/*); do for f in $(ls $d); do echo --- $d/$f; cat $d/$f; done; done"});
|
||||
DumpFileToFd(fd, "dmabuf info", "/d/dma_buf/bufinfo");
|
||||
RunCommandToFd(fd, "Temperatures", {"/vendor/bin/sh", "-c", "for f in `ls /sys/class/thermal` ; do type=`cat /sys/class/thermal/$f/type` ; temp=`cat /sys/class/thermal/$f/temp` ; echo \"$type: $temp\" ; done"});
|
||||
DumpFileToFd(fd, "cpu0-1 time-in-state", "/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state");
|
||||
RunCommandToFd(fd, "cpu0-1 cpuidle", {"/vendor/bin/sh", "-c", "for d in $(ls -d /sys/devices/system/cpu/cpu0/cpuidle/state*); do echo \"$d: `cat $d/name` `cat $d/desc` `cat $d/time` `cat $d/usage`\"; done"});
|
||||
DumpFileToFd(fd, "cpu2-3 time-in-state", "/sys/devices/system/cpu/cpu2/cpufreq/stats/time_in_state");
|
||||
RunCommandToFd(fd, "cpu2-3 cpuidle", {"/vendor/bin/sh", "-c", "for d in $(ls -d /sys/devices/system/cpu/cpu2/cpuidle/state*); do echo \"$d: `cat $d/name` `cat $d/desc` `cat $d/time` `cat $d/usage`\"; done"});
|
||||
RunCommandToFd(fd, "Easel debug info", {"/vendor/bin/sh", "-c", "for f in `ls /sys/bus/i2c/devices/9-0008/@(*curr|temperature|vbat|total_power)`; do echo \"$f: `cat $f`\" ; done; file=/sys/devices/virtual/misc/mnh_sm/state; echo \"$file: `cat $file`\""});
|
||||
DumpFileToFd(fd, "cpu0-3 time-in-state", "/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state");
|
||||
RunCommandToFd(fd, "cpu0-3 cpuidle", {"/vendor/bin/sh", "-c", "for d in $(ls -d /sys/devices/system/cpu/cpu0/cpuidle/state*); do echo \"$d: `cat $d/name` `cat $d/desc` `cat $d/time` `cat $d/usage`\"; done"});
|
||||
DumpFileToFd(fd, "cpu4-7 time-in-state", "/sys/devices/system/cpu/cpu4/cpufreq/stats/time_in_state");
|
||||
RunCommandToFd(fd, "cpu4-7 cpuidle", {"/vendor/bin/sh", "-c", "for d in $(ls -d /sys/devices/system/cpu/cpu4/cpuidle/state*); do echo \"$d: `cat $d/name` `cat $d/desc` `cat $d/time` `cat $d/usage`\"; done"});
|
||||
DumpFileToFd(fd, "cpu0-3 thermal limit", "/sys/devices/virtual/thermal/cooling_device0/cur_state");
|
||||
DumpFileToFd(fd, "cpu4-7 thermal limit", "/sys/devices/virtual/thermal/cooling_device1/cur_state");
|
||||
DumpFileToFd(fd, "MDP xlogs", "/data/vendor/display/mdp_xlog");
|
||||
DumpFileToFd(fd, "TCPM logs", "/d/tcpm/usbpd0");
|
||||
DumpFileToFd(fd, "PD Engine", "/d/pd_engine/usbpd0");
|
||||
|
||||
7
gps.conf
7
gps.conf
@@ -17,7 +17,10 @@ ERR_ESTIMATE=0
|
||||
# Europe
|
||||
# NTP_SERVER=europe.pool.ntp.org
|
||||
# North America
|
||||
NTP_SERVER=north-america.pool.ntp.org
|
||||
# NTP_SERVER=north-america.pool.ntp.org
|
||||
|
||||
NTP_SERVER = time.google.com
|
||||
|
||||
# If NTP_SERVER is commented NTP_SERVER=time.izatcloud.net is used
|
||||
|
||||
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
|
||||
@@ -125,4 +128,4 @@ MISSING_PULSE_TIME_DELTA = 900
|
||||
#####################################
|
||||
#Propagation time uncertainty
|
||||
#####################################
|
||||
PROPAGATION_TIME_UNCERTAINTY = 1
|
||||
PROPAGATION_TIME_UNCERTAINTY = 1
|
||||
|
||||
@@ -384,3 +384,17 @@ service cnss_diag_txt /vendor/bin/cnss_diag -s -f -m /data/vendor/wifi/cnss_diag
|
||||
|
||||
on property:debug.htc.ramdump.crash=true
|
||||
write /proc/sysrq-trigger "c"
|
||||
|
||||
on property:sys.logger.bluetooth=true
|
||||
setprop persist.service.bdroid.snooplog true
|
||||
setprop persist.service.bdroid.fwsnoop true
|
||||
|
||||
on property:sys.logger.bluetooth=false
|
||||
setprop persist.service.bdroid.snooplog false
|
||||
setprop persist.service.bdroid.fwsnoop false
|
||||
|
||||
on property:persist.bluetooth.btsnoopenable=true
|
||||
setprop persist.service.bdroid.soclog true
|
||||
|
||||
on property:persist.bluetooth.btsnoopenable=false
|
||||
setprop persist.service.bdroid.soclog false
|
||||
|
||||
@@ -38,6 +38,8 @@ service charger /charger
|
||||
on early-init
|
||||
mount debugfs debugfs /sys/kernel/debug
|
||||
chmod 0755 /sys/kernel/debug
|
||||
# Loading kernel modules in background
|
||||
start insmod_sh
|
||||
|
||||
on init
|
||||
# Disable UFS powersaving
|
||||
@@ -46,8 +48,13 @@ on init
|
||||
write /sys/devices/soc/${ro.boot.bootdevice}/hibern8_on_idle_enable 0
|
||||
write /sys/module/lpm_levels/parameters/sleep_disabled Y
|
||||
|
||||
# Loading kernel modules in background
|
||||
start insmod_sh
|
||||
# QSEE rpmb listener need symlink for bootdevice
|
||||
wait /dev/block/platform/soc/${ro.boot.bootdevice}
|
||||
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
|
||||
|
||||
# start qseecomd early as we mount system/ vendor/ early
|
||||
# vold needs keymaster that needs qseecomd
|
||||
start qseecomd
|
||||
|
||||
# Support legacy paths
|
||||
symlink /sdcard /mnt/sdcard
|
||||
@@ -155,9 +162,6 @@ on init
|
||||
write /proc/sys/vm/page-cluster 0
|
||||
|
||||
on fs
|
||||
wait /dev/block/platform/soc/${ro.boot.bootdevice}
|
||||
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
|
||||
|
||||
mount_all /vendor/etc/fstab.${ro.hardware} --early
|
||||
|
||||
mkdir /persist/data 0700 system system
|
||||
@@ -190,10 +194,6 @@ on fs
|
||||
# Start HW service manager early
|
||||
start hwservicemanager
|
||||
|
||||
# qseecomd needs /dev/block/bootdevice
|
||||
# vold needs keymaster that needs qseecomd
|
||||
start qseecomd
|
||||
|
||||
on late-fs
|
||||
# Start devices by sysfs trigger
|
||||
start devstart_sh
|
||||
@@ -201,7 +201,7 @@ on late-fs
|
||||
start surfaceflinger
|
||||
start bootanim
|
||||
start hwcomposer-2-1
|
||||
start configstore-hal
|
||||
start configstore-hal-1-0
|
||||
start gralloc-2-0
|
||||
|
||||
# Mount RW partitions which need run fsck
|
||||
@@ -230,6 +230,7 @@ on property:sys.user.0.ce_available=true
|
||||
|
||||
on property:sys.ramoops.decrypted=true
|
||||
mount pstore pstore /sys/fs/pstore
|
||||
chown system log /sys/fs/pstore
|
||||
chown system log /sys/fs/pstore/console-ramoops
|
||||
chmod 0440 /sys/fs/pstore/console-ramoops
|
||||
chown system log /sys/fs/pstore/console-ramoops-0
|
||||
@@ -581,6 +582,19 @@ on property:sys.boot_completed=1
|
||||
write /dev/cpuset/application/background/cpus 0-1
|
||||
write /dev/cpuset/application/cpus 0-1,4-5
|
||||
|
||||
# UFS health
|
||||
chmod 755 /sys/kernel/debug/ufshcd0
|
||||
chown 644 /sys/kernel/debug/ufshcd0/err_state
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/power_mode
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/host_regs
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/show_hba
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/dump_device_desc
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/dump_health_desc
|
||||
chmod 755 /sys/kernel/debug/ufshcd0/stats
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/stats/req_stats
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/stats/query_stats
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/stats/err_stats
|
||||
|
||||
on property:init.svc.per_mgr=running
|
||||
start per_proxy
|
||||
|
||||
@@ -608,9 +622,8 @@ service ss_ramdump /vendor/bin/subsystem_ramdump
|
||||
|
||||
on property:persist.sys.ssr.enable_ramdumps=1
|
||||
write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
|
||||
mkdir /data/vendor/ssrdump 761 root system
|
||||
mkdir /data/vendor/ssrdump 771 root system
|
||||
mkdir /data/vendor/ramdump 771 root system
|
||||
mkdir /data/vendor/ramdump/bluetooth 771 root system
|
||||
start ss_ramdump
|
||||
|
||||
on property:persist.sys.ssr.enable_ramdumps=0
|
||||
|
||||
@@ -39,6 +39,7 @@ on boot
|
||||
mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell
|
||||
mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
|
||||
write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
|
||||
write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
|
||||
mkdir /dev/usb-ffs 0775 shell shell
|
||||
mkdir /dev/usb-ffs/adb 0770 shell shell
|
||||
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
|
||||
@@ -50,15 +51,22 @@ on boot
|
||||
setprop sys.usb.configfs 1
|
||||
setprop sys.usb.controller "a800000.dwc3"
|
||||
write /sys/module/libcomposite/parameters/disable_l1_for_hs "y"
|
||||
symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
|
||||
write /config/usb_gadget/g1/functions/gsi.rndis/rndis_wceis 1
|
||||
|
||||
on property:sys.usb.config=none && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/os_desc/use 0
|
||||
|
||||
on property:sys.usb.ffs.mtp.ready=1 && property:sys.usb.config=mtp && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x4ee1
|
||||
write /config/usb_gadget/g1/os_desc/use 1
|
||||
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.ffs.mtp.ready=1 && property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x4ee2
|
||||
write /config/usb_gadget/g1/os_desc/use 1
|
||||
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
|
||||
|
||||
on property:sys.usb.config=rndis && property:sys.usb.configfs=1
|
||||
@@ -74,11 +82,13 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb && property
|
||||
on property:sys.usb.ffs.mtp.ready=1 && property:sys.usb.config=ptp && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x4ee5
|
||||
write /config/usb_gadget/g1/os_desc/use 1
|
||||
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.ffs.mtp.ready=1 && property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
|
||||
write /config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /config/usb_gadget/g1/idProduct 0x4ee6
|
||||
write /config/usb_gadget/g1/os_desc/use 1
|
||||
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
|
||||
|
||||
on property:sys.usb.config=adb && property:sys.usb.configfs=1
|
||||
|
||||
@@ -7,7 +7,11 @@
|
||||
### ... ###
|
||||
#########################################
|
||||
|
||||
cfg_file="/vendor/etc/init.insmod.cfg"
|
||||
if [[ -e "/vendor/etc/init.insmod_charger.cfg" && "$(getprop ro.boot.mode)" == "charger" ]]; then
|
||||
cfg_file="/vendor/etc/init.insmod_charger.cfg"
|
||||
else
|
||||
cfg_file="/vendor/etc/init.insmod.cfg"
|
||||
fi
|
||||
|
||||
if [ -f $cfg_file ]; then
|
||||
while IFS=" " read -r action name
|
||||
|
||||
@@ -19,6 +19,7 @@ include $(CLEAR_VARS)
|
||||
LOCAL_SRC_FILES := lights.c
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
LOCAL_HEADER_LIBRARIES := libhardware_headers
|
||||
LOCAL_SHARED_LIBRARIES := libc libcutils liblog
|
||||
LOCAL_CFLAGS := $(common_flags) \
|
||||
-DLOG_TAG=\"qdlights\" \
|
||||
|
||||
13
manifest.xml
13
manifest.xml
@@ -53,10 +53,19 @@
|
||||
<instance>legacy/0</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.cas</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IMediaCasService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.configstore</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.1</version>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>ISurfaceFlingerConfigs</name>
|
||||
<instance>default</instance>
|
||||
@@ -277,7 +286,7 @@
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.thermal</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<version>1.1</version>
|
||||
<interface>
|
||||
<name>IThermal</name>
|
||||
<instance>default</instance>
|
||||
|
||||
@@ -120,9 +120,10 @@ Only the three quirks included above are recognized at this point:
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Quirk name="requires-loaded-to-idle-after-allocation" />
|
||||
<Limit name="size" min="96x64" max="4096x2160" />
|
||||
<Limit name="size" min="96x64" max="4096x4096" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
|
||||
<Limit name="blocks-per-second" min="1" max="979200" />
|
||||
<Limit name="bitrate" range="1-100000000" />
|
||||
<Limit name="frame-rate" range="1-240" />
|
||||
@@ -156,9 +157,10 @@ Only the three quirks included above are recognized at this point:
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Quirk name="requires-loaded-to-idle-after-allocation" />
|
||||
<Limit name="size" min="96x64" max="3840x2160" />
|
||||
<Limit name="size" min="96x64" max="4096x4096" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-32768" /> <!-- max 4096x2048 -->
|
||||
<Limit name="blocks-per-second" min="1" max="979200" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Limit name="frame-rate" range="1-240" />
|
||||
@@ -168,9 +170,10 @@ Only the three quirks included above are recognized at this point:
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Quirk name="requires-loaded-to-idle-after-allocation" />
|
||||
<Limit name="size" min="162x64" max="4096x2160" />
|
||||
<Limit name="size" min="162x64" max="4096x4096" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
|
||||
<Limit name="blocks-per-second" min="1" max="979200" />
|
||||
<Limit name="bitrate" range="1-100000000" />
|
||||
<Limit name="frame-rate" range="1-240" />
|
||||
@@ -182,9 +185,10 @@ Only the three quirks included above are recognized at this point:
|
||||
<MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="64x64" max="4096x2160" />
|
||||
<Limit name="size" min="64x64" max="4096x4096" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
|
||||
<Limit name="blocks-per-second" min="1" max="1958400" />
|
||||
<Limit name="bitrate" range="1-100000000" />
|
||||
<Feature name="adaptive-playback" />
|
||||
@@ -193,9 +197,10 @@ Only the three quirks included above are recognized at this point:
|
||||
<MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="64x64" max="4096x2160" />
|
||||
<Limit name="size" min="64x64" max="4096x4096" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
|
||||
<Limit name="blocks-per-second" min="1" max="1958400" />
|
||||
<Limit name="bitrate" range="1-100000000" />
|
||||
<Limit name="frame-rate" range="1-240" />
|
||||
@@ -229,9 +234,10 @@ Only the three quirks included above are recognized at this point:
|
||||
<MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="64x64" max="3840x2160" />
|
||||
<Limit name="size" min="64x64" max="4096x4096" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-32768" /> <!-- max 4096x2048 -->
|
||||
<Limit name="blocks-per-second" min="1" max="979200" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Limit name="frame-rate" range="1-240" />
|
||||
@@ -241,9 +247,10 @@ Only the three quirks included above are recognized at this point:
|
||||
<MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="64x64" max="3840x2160" />
|
||||
<Limit name="size" min="64x64" max="4096x4096" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-32768" /> <!-- max 4096x2048 -->
|
||||
<Limit name="blocks-per-second" min="1" max="979200" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Limit name="frame-rate" range="1-240" />
|
||||
@@ -253,9 +260,10 @@ Only the three quirks included above are recognized at this point:
|
||||
<MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="64x64" max="3840x2160" />
|
||||
<Limit name="size" min="64x64" max="4096x4096" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-32768" /> <!-- max 4096x2048 -->
|
||||
<Limit name="blocks-per-second" min="1" max="979200" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Limit name="frame-rate" range="1-240" />
|
||||
@@ -266,9 +274,10 @@ Only the three quirks included above are recognized at this point:
|
||||
<MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="64x64" max="4096x2160" />
|
||||
<Limit name="size" min="64x64" max="4096x4096" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
|
||||
<Limit name="blocks-per-second" min="1" max="1958400" />
|
||||
<Limit name="bitrate" range="1-100000000" />
|
||||
<Limit name="frame-rate" range="1-240" />
|
||||
@@ -278,9 +287,10 @@ Only the three quirks included above are recognized at this point:
|
||||
<MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="64x64" max="4096x2160" />
|
||||
<Limit name="size" min="64x64" max="4096x4096" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-34560" /> <!-- max 4096x2160 -->
|
||||
<Limit name="blocks-per-second" min="1" max="1958400" />
|
||||
<Limit name="bitrate" range="1-100000000" />
|
||||
<Limit name="frame-rate" range="1-240" />
|
||||
|
||||
@@ -14,183 +14,138 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!-- Generated file for wahoo using measurements between OPD1.170523.002 and OPD1.170724.002 -->
|
||||
<!-- Generated file for wahoo using measurements between OPM1.170815.001 and OPM1.170912.002 -->
|
||||
<MediaCodecs>
|
||||
<!-- Measurements between OPD1.170804.003 and OPM1.170908.002 -->
|
||||
<Encoders>
|
||||
<MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" update="true">
|
||||
<Limit name="measured-frame-rate-176x144" range="402-402" /> <!-- N=524 v98%=1.6 -->
|
||||
<!-- measured 96%:261-505 med:397/398 FLAKY(mn=98.0 < 199 - 796) -->
|
||||
<Limit name="measured-frame-rate-352x288" range="398-398" /> <!-- N=528 v96%=1.4 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="390-390" /> <!-- N=228 v98%=1.2 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="416-424" /> <!-- N=228 v98%=1.2 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
|
||||
<!-- measured 96%:276-523 med:421/420 FLAKY(mn=111.0 < 210 - 840) -->
|
||||
<Limit name="measured-frame-rate-320x240" range="420-420" /> <!-- N=530 v96%=1.4 -->
|
||||
<!-- measured 96%:113-195 med:166/165 FLAKY(mn=37.0 < 83 - 330) -->
|
||||
<Limit name="measured-frame-rate-720x480" range="165-165" /> <!-- N=500 v96%=1.3 -->
|
||||
<!-- measured 96%:74-92 med:88/89 FLAKY(mn=29.6 < 45 - 178) -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="89-89" /> <!-- N=528 v96%=1.1 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="32-32" /> <!-- N=206 v98%=1.6 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="427-431" /> <!-- N=228 v98%=1.2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="168-168" /> <!-- N=228 v98%=1.2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="88-88" /> <!-- N=226 v98%=1.1 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="31-31" /> <!-- N=228 v98%=1.2 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true">
|
||||
<!-- measured 97%:249-536 med:433/434 FLAKY(mn=111.8 < 217 - 868) -->
|
||||
<Limit name="measured-frame-rate-320x240" range="434-434" /> <!-- N=526 v97%=1.5 -->
|
||||
<!-- measured 96%:101-199 med:176/176 FLAKY(mn=35.7 < 88 - 352) -->
|
||||
<Limit name="measured-frame-rate-720x480" range="176-176" /> <!-- N=498 v96%=1.4 -->
|
||||
<!-- measured 96%:94-132 med:125/125 FLAKY(mn=27.3 < 63 - 250) -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="125-125" /> <!-- N=530 v96%=1.2 -->
|
||||
<!-- measured 93%:31-62 med:53/53 FLAKY(mn=16.3 < 27 - 106) -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="53-53" /> <!-- N=256 v93%=1.4 -->
|
||||
<!-- measured 90%:6-25 med:18/19 FLAKY(mn=3.8 < 6 - 40) -->
|
||||
<Limit name="measured-frame-rate-3840x2160" range="12-20" /> <!-- N=214 v90%=2.0 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="444-452" /> <!-- N=228 v98%=1.2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="176-176" /> <!-- N=228 v98%=1.2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="124-125" /> <!-- N=228 v98%=1.1 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="52-52" /> <!-- N=228 v98%=1.2 -->
|
||||
<Limit name="measured-frame-rate-3840x2160" range="21-21" /> <!-- N=228 v98%=1.3 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" update="true">
|
||||
<Limit name="measured-frame-rate-176x144" range="397-397" /> <!-- N=526 v98%=1.5 -->
|
||||
<!-- measured 96%:250-459 med:375/377 FLAKY(mn=112.6 < 189 - 754) -->
|
||||
<Limit name="measured-frame-rate-352x288" range="377-377" /> <!-- N=528 v96%=1.4 -->
|
||||
<!-- measured 98%:73-258 med:219/215 FLAKY(mn=69.7 < 73 - 430) -->
|
||||
<Limit name="measured-frame-rate-640x480" range="145-215" /> <!-- N=450 v98%=1.9 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="384-384" /> <!-- N=228 v98%=1.2 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="387-399" /> <!-- N=228 v98%=1.2 -->
|
||||
<!-- measured 98%:80-244 med:217/209 FLAKY(mn=73.3 < 80 - 418) -->
|
||||
<Limit name="measured-frame-rate-640x480" range="146-209" /> <!-- TWEAKED N=228 v98%=1.7 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" update="true">
|
||||
<!-- measured 98%:159-498 med:340/340 FLAKY(mn=124.8 < 159 - 680) -->
|
||||
<Limit name="measured-frame-rate-320x180" range="318-340" /> <!-- N=528 v98%=1.8 -->
|
||||
<!-- measured 96%:194-319 med:275/278 FLAKY(mn=83.4 < 139 - 556) -->
|
||||
<Limit name="measured-frame-rate-640x360" range="278-278" /> <!-- N=530 v96%=1.3 -->
|
||||
<!-- measured 97%:62-92 med:87/87 FLAKY(mn=30.4 < 44 - 174) -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="87-87" /> <!-- N=530 v97%=1.2 -->
|
||||
<!-- measured 98%:17-47 med:33/33 FLAKY(mn=15.4 < 17 - 66) -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="33-33" /> <!-- N=206 v98%=1.7 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="335-335" /> <!-- N=228 v98%=1.2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="262-267" /> <!-- N=228 v98%=1.2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="82-82" /> <!-- N=228 v98%=1.1 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="32-32" /> <!-- N=228 v98%=1.3 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
|
||||
<!-- measured 98%:104-832 med:361/361 FLAKY(mn=90.6 < 104 - 832 < mx=981.7) RG.VARIANCE:2.0 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="207-416" /> <!-- N=424 v98%=2.8 -->
|
||||
<!-- measured 98%:179-448 med:322/323 FLAKY(mn=143.6 < 161 - 646) -->
|
||||
<Limit name="measured-frame-rate-176x144" range="287-323" /> <!-- TWEAKED N=228 v98%=1.6 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
|
||||
<!-- measured 98%:84-343 med:245/231 FLAKY(mn=80.7 < 84 - 476) variance:2.0 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="168-238" /> <!-- N=216 -->
|
||||
<!-- measured 98%:22-119 med:105/105 FLAKY(mn=20.0 < 24 - 210) variance:2.3 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="48-105" /> <!-- N=214 -->
|
||||
<!-- measured 98%:11-73 med:61/61 FLAKY(mn=10.6 < 14 - 122) variance:2.6 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="28-61" /> <!-- N=214 -->
|
||||
<!-- measured 98%:6-38 med:29/29 FLAKY(mn=5.9 < 7 - 58) variance:2.5 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="14-29" /> <!-- N=216 -->
|
||||
<!-- measured 97%:215-350 med:304/304 FLAKY(mn=83.7 < 152 - 608) -->
|
||||
<Limit name="measured-frame-rate-320x240" range="167-304" /> <!-- TWEAKED N=224 v97%=1.3 -->
|
||||
<!-- measured 98%:71-122 med:110/110 FLAKY(mn=46.8 < 55 - 220) -->
|
||||
<Limit name="measured-frame-rate-720x480" range="93-110" /> <!-- TWEAKED N=228 v98%=1.3 -->
|
||||
<!-- measured 98%:50-73 med:64/64 FLAKY(mn=24.1 < 32 - 128) -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="48-64" /> <!-- TWEAKED N=226 v98%=1.2 -->
|
||||
<!-- measured 98%:21-37 med:29/29 FLAKY(mn=12.1 < 15 - 58) -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="24-29" /> <!-- TWEAKED N=228 v98%=1.3 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
|
||||
<!-- measured 97%:109-879 med:375/372 FLAKY(mn=91.9 < 109 - 880 < mx=1052.6) RG.VARIANCE:2.0 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="217-440" /> <!-- N=436 v97%=2.8 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="341-341" /> <!-- N=228 v98%=1.4 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
|
||||
<!-- measured 98%:25-145 med:65/65 FLAKY(mn=24.4 < 25 - 146 < mx=146.7) variance:2.4 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="49-73" /> <!-- N=216 -->
|
||||
<!-- measured 98%:13-64 med:41/41 variance:2.2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="26-41" /> <!-- N=214 -->
|
||||
<!-- measured 98%:6-38 med:36/36 FLAKY(mn=5.7 < 9 - 72) variance:2.5 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="17-36" /> <!-- N=216 -->
|
||||
<!-- measured 98%:3-25 med:22/22 FLAKY(mn=3.5 < 5 - 44) variance:2.7 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="10-22" /> <!-- N=216 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="73-73" /> <!-- N=228 v98%=1.4 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="45-45" /> <!-- N=226 v98%=1.2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="36-36" /> <!-- N=228 v98%=1.1 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="23-23" /> <!-- N=228 v98%=1.1 -->
|
||||
</MediaCodec>
|
||||
<!-- Measurements between OPM1.170809.002 and OPM1.170908.002 -->
|
||||
<MediaCodec name="OMX.google.vp9.encoder" type="video/x-vnd.on2.vp9" update="true">
|
||||
<Limit name="measured-frame-rate-320x180" range="205-205" /> <!-- N=102 v98%=1.0 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="68-68" /> <!-- N=102 v98%=1.0 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="17-17" /> <!-- N=102 v98%=1.1 -->
|
||||
</MediaCodec>
|
||||
</Encoders>
|
||||
<Decoders>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" update="true">
|
||||
<!-- measured 98%:153-856 med:652/649 FLAKY(mn=0.5 < 153 - 1298) variance:2.4 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="306-649" /> <!-- N=284 -->
|
||||
<!-- measured 98%:271-837 med:582/585 FLAKY(mn=141.4 < 271 - 1170) -->
|
||||
<Limit name="measured-frame-rate-352x288" range="541-585" /> <!-- N=286 v98%=1.8 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="505-507" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="470-472" /> <!-- N=162 v98%=1.3 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
|
||||
<!-- measured 98%:111-586 med:341/341 FLAKY(mn=83.0 < 111 - 682) variance:2.3 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="222-341" /> <!-- N=126 -->
|
||||
<!-- measured 98%:102-448 med:306/306 variance:2.1 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="203-306" /> <!-- N=138 -->
|
||||
<!-- measured 98%:96-346 med:252/253 FLAKY(mn=33.1 < 96 - 506) -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="192-253" /> <!-- N=134 v98%=1.9 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="153-153" /> <!-- N=122 v98%=1.5 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="342-342" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="303-303" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="247-247" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="148-148" /> <!-- N=162 v98%=1.2 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" update="true">
|
||||
<!-- measured 98%:101-589 med:338/337 FLAKY(mn=90.5 < 101 - 674) variance:2.4 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="202-337" /> <!-- N=136 -->
|
||||
<!-- measured 98%:106-526 med:327/326 FLAKY(mn=95.5 < 106 - 652) variance:2.2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="211-326" /> <!-- N=134 -->
|
||||
<!-- measured 98%:109-463 med:316/316 FLAKY(mn=68.4 < 109 - 632) variance:2.1 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="217-316" /> <!-- N=144 -->
|
||||
<!-- measured 98%:115-394 med:270/270 FLAKY(mn=100.2 < 115 - 540) -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="229-270" /> <!-- N=276 v98%=1.9 -->
|
||||
<!-- measured 98%:101-270 med:259/259 FLAKY(mn=99.8 < 101 - 518) -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="202-259" /> <!-- N=126 v98%=1.6 -->
|
||||
<!-- measured 98%:33-71 med:71/71 FLAKY(mn=31.3 < 33 - 142) -->
|
||||
<Limit name="measured-frame-rate-3840x2160" range="66-71" /> <!-- N=122 v98%=1.5 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="346-346" /> <!-- N=162 v98%=1.4 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="326-326" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="311-311" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="267-267" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="258-258" /> <!-- N=162 v98%=1.0 -->
|
||||
<Limit name="measured-frame-rate-3840x2160" range="71-71" /> <!-- N=162 v98%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" update="true">
|
||||
<!-- measured 98%:246-913 med:573/571 FLAKY(mn=145.5 < 246 - 1142) -->
|
||||
<Limit name="measured-frame-rate-176x144" range="491-571" /> <!-- N=288 v98%=1.9 -->
|
||||
<!-- measured 97%:181-504 med:313/313 FLAKY(mn=105.3 < 157 - 626) -->
|
||||
<Limit name="measured-frame-rate-480x360" range="313-313" /> <!-- N=184 v97%=1.7 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="459-459" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-480x360" range="433-434" /> <!-- N=164 v98%=1.4 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" update="true">
|
||||
<!-- measured 98%:109-802 med:417/416 variance:2.7 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="217-416" /> <!-- N=140 -->
|
||||
<!-- measured 98%:108-700 med:423/424 FLAKY(mn=107.2 < 108 - 848) variance:2.5 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="215-424" /> <!-- N=142 -->
|
||||
<!-- measured 98%:105-457 med:313/313 FLAKY(mn=37.4 < 105 - 626) variance:2.1 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="210-313" /> <!-- N=130 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="146-151" /> <!-- N=126 v98%=1.5 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="418-419" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="414-414" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="309-309" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="145-145" /> <!-- N=162 v98%=1.2 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" update="true">
|
||||
<!-- measured 96%:79-635 med:115/205 FLAKY(mn=55.3 < 71 - 620 < mx=647.7) RG.VARIANCE:2.0 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="141-310" /> <!-- N=204 v96%=2.8 -->
|
||||
<!-- measured 95%:69-508 med:351/351 FLAKY(mn=54.5 < 80 - 702) variance:2.7 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="160-351" /> <!-- N=150 -->
|
||||
<!-- measured 93%:82-408 med:114/162 FLAKY(mn=47.6 < 69 - 454) variance:2.2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="138-227" /> <!-- N=202 -->
|
||||
<!-- measured 93%:72-245 med:109/123 FLAKY(mn=0.5 < 62 - 298) -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="123-149" /> <!-- N=200 v93%=1.8 -->
|
||||
<Limit name="measured-frame-rate-3840x2160" range="45-48" /> <!-- N=122 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="342-342" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="335-335" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="271-271" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="153-153" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-3840x2160" range="36-36" /> <!-- N=162 v98%=1.3 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
|
||||
<!-- measured 95%:141-1135 med:164/169 FLAKY(85 - 742 < mx=1244.4) RG.VARIANCE:2.0 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="169-371" /> <!-- N=138 v95%=2.8 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="150-150" /> <!-- N=162 v98%=1.3 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
|
||||
<!-- measured 98%:96-619 med:166/166 FLAKY(83 - 620 < mx=634.1) variance:2.5 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="166-310" /> <!-- N=122 -->
|
||||
<!-- measured 98%:44-185 med:59/59 variance:2.0 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="59-93" /> <!-- N=124 -->
|
||||
<!-- measured 98%:15-68 med:29/28 FLAKY(14 - 68 < mx=68.4) variance:2.1 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="28-34" /> <!-- N=144 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="12-16" /> <!-- N=142 v98%=2.0 -->
|
||||
<!-- measured 98%:130-275 med:158/158 FLAKY(79 - 316 < mx=637.8) -->
|
||||
<Limit name="measured-frame-rate-320x240" range="158-319" /> <!-- TWEAKED N=161 v98%=1.5 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="56-56" /> <!-- N=162 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="28-28" /> <!-- N=162 v98%=1.5 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="15-15" /> <!-- N=162 v98%=1.5 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
|
||||
<!-- measured 98%:141-766 med:624/626 FLAKY(mn=128.0 < 143 - 1252) variance:2.3 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="285-626" /> <!-- N=131 -->
|
||||
<!-- measured 98%:62-353 med:243/243 FLAKY(mn=0.3 < 56 - 486) variance:2.4 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="111-243" /> <!-- N=150 -->
|
||||
<!-- measured 98%:56-306 med:211/209 variance:2.3 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="95-209" /> <!-- N=144 -->
|
||||
<!-- measured 90%:20-112 med:89/88 FLAKY(mn=0.4 < 20 - 176) variance:2.4 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="40-88" /> <!-- N=154 -->
|
||||
<!-- measured 98%:1-65 med:51/51 FLAKY(mn=0.4 < 12 - 102) RG.VARIANCE:4.5 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="24-51" /> <!-- N=152 v98%=9.6 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="631-631" /> <!-- N=158 v98%=1.2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="250-250" /> <!-- N=153 v98%=1.2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="218-218" /> <!-- N=154 v98%=1.3 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="102-103" /> <!-- N=159 v98%=1.3 -->
|
||||
<!-- measured 98%:43-66 med:60/60 FLAKY(mn=0.0 < 30 - 120) -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="60-60" /> <!-- N=160 v98%=1.2 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" update="true">
|
||||
<!-- measured 98%:165-1003 med:195/200 FLAKY(100 - 880 < mx=1438.8) variance:2.5 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="200-440" /> <!-- N=140 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="177-177" /> <!-- N=162 v98%=1.4 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
|
||||
<!-- measured 90%:332-1316 med:577/573 FLAKY(mn=146.5 < 287 - 1474) -->
|
||||
<Limit name="measured-frame-rate-320x180" range="573-737" /> <!-- N=132 v90%=2.0 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="238-409" /> <!-- N=126 v98%=1.8 -->
|
||||
<!-- measured 98%:32-95 med:94/94 FLAKY(mn=31.4 < 32 - 188) -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="64-94" /> <!-- N=122 v98%=1.7 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="22-37" /> <!-- N=132 v98%=1.6 -->
|
||||
<!-- measured 98%:432-1070 med:504/505 FLAKY(252 - 1070 < mx=1079.9) -->
|
||||
<Limit name="measured-frame-rate-320x180" range="504-540" /> <!-- TWEAKED N=162 v98%=1.6 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="415-415" /> <!-- N=162 v98%=1.1 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="95-95" /> <!-- N=162 v98%=1.1 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="37-37" /> <!-- N=162 v98%=1.1 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
|
||||
<!-- measured 98%:232-1000 med:668/653 FLAKY(mn=144.8 < 224 - 1330) variance:2.1 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="448-665" /> <!-- N=122 -->
|
||||
<!-- measured 98%:78-425 med:395/395 FLAKY(mn=74.4 < 90 - 790) variance:2.3 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="180-395" /> <!-- N=254 -->
|
||||
<!-- measured 98%:22-120 med:112/111 FLAKY(mn=22.3 < 26 - 222) variance:2.3 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="51-111" /> <!-- N=136 -->
|
||||
<!-- measured 98%:14-71 med:67/67 FLAKY(mn=13.9 < 16 - 134) variance:2.2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="31-67" /> <!-- N=132 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="468-470" /> <!-- N=162 v98%=1.4 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="377-379" /> <!-- N=162 v98%=1.1 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="113-113" /> <!-- N=162 v98%=1.1 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="68-68" /> <!-- N=162 v98%=1.1 -->
|
||||
</MediaCodec>
|
||||
</Decoders>
|
||||
</MediaCodecs>
|
||||
|
||||
@@ -199,9 +199,11 @@
|
||||
<bool translatable="false" name="config_wifi_background_scan_support">true</bool>
|
||||
|
||||
<!-- Integer thresholds, do not connect to APs with RSSI lower than these values -->
|
||||
<integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz">-77</integer>
|
||||
<integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz">-80</integer>
|
||||
|
||||
<integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_5GHz">-77</integer>
|
||||
<integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_24GHz">-80</integer>
|
||||
<!-- Integer thresholds for low network score, should be somewhat less than the entry threshholds -->
|
||||
<integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz">-80</integer>
|
||||
<integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz">-83</integer>
|
||||
|
||||
<!-- Vibrator pattern for feedback about a long screen/key press -->
|
||||
<integer-array name="config_longPressVibePattern">
|
||||
@@ -216,7 +218,7 @@
|
||||
|
||||
<!-- Boolean indicating whether or not to revert to default country code when cellular
|
||||
radio is unable to find any MCC information to infer wifi country code from -->
|
||||
<bool translatable="false" name="config_wifi_revert_country_code_on_cellular_loss">true</bool>
|
||||
<bool translatable="false" name="config_wifi_revert_country_code_on_cellular_loss">false</bool>
|
||||
|
||||
<!-- Boolean indicating whether or not wifi should turn off when emergency call is made -->
|
||||
<bool translatable="false" name="config_wifi_turn_off_during_emergency_call">true</bool>
|
||||
@@ -345,5 +347,5 @@
|
||||
<bool name="config_supportAudioSourceUnprocessed">true</bool>
|
||||
|
||||
<!-- Colon separated list of package names that should be granted DND access -->
|
||||
<string name="config_defaultDndAccessPackages" translatable="false">com.google.android.GoogleCamera:com.google.intelligence.sense:com.google.android.apps.location.context.activity.zen</string>
|
||||
<string name="config_defaultDndAccessPackages" translatable="false">com.google.android.GoogleCamera:com.google.intelligence.sense</string>
|
||||
</resources>
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
disable_scan_offload=1
|
||||
p2p_no_group_iface=1
|
||||
|
||||
5
permissions/com.google.hardware.camera.easel.xml
Normal file
5
permissions/com.google.hardware.camera.easel.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Feature for devices with hardware acceleration. -->
|
||||
<permissions>
|
||||
<feature name="com.google.hardware.camera.easel" />
|
||||
</permissions>
|
||||
@@ -29,7 +29,8 @@
|
||||
|
||||
#define LOG_TAG "QCOM PowerHAL"
|
||||
|
||||
#include <cutils/log.h>
|
||||
#include <unistd.h>
|
||||
#include <log/log.h>
|
||||
#include <libxml/parser.h>
|
||||
#include "powerhintparser.h"
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "utils.h"
|
||||
#include "list.h"
|
||||
|
||||
2
sec_config
Normal file → Executable file
2
sec_config
Normal file → Executable file
@@ -296,7 +296,7 @@
|
||||
/* PDC */
|
||||
36:4294967295:1001
|
||||
/* SAR */
|
||||
17:4294967295:1001
|
||||
17:4294967295:1001:1006:1047
|
||||
/* RFRPE */
|
||||
41:4294967295:1001
|
||||
/*UIM*/
|
||||
|
||||
39
sepolicy/vendor/certs/tango.x509.pem
vendored
39
sepolicy/vendor/certs/tango.x509.pem
vendored
@@ -1,20 +1,23 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDWjCCAkKgAwIBAgIEUlNYsDANBgkqhkiG9w0BAQUFADBvMRAwDgYDVQQGEwdV
|
||||
bmtub3duMRAwDgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMREwDwYD
|
||||
VQQKEwhNb3Rvcm9sYTERMA8GA1UECxMIVHJhaWxtaXgxETAPBgNVBAMTCFRyYWls
|
||||
bWl4MB4XDTEzMTAwODAwNTgyNFoXDTQxMDIyMzAwNTgyNFowbzEQMA4GA1UEBhMH
|
||||
VW5rbm93bjEQMA4GA1UECBMHVW5rbm93bjEQMA4GA1UEBxMHVW5rbm93bjERMA8G
|
||||
A1UEChMITW90b3JvbGExETAPBgNVBAsTCFRyYWlsbWl4MREwDwYDVQQDEwhUcmFp
|
||||
bG1peDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKQBftL+C3I6JiLF
|
||||
utgzqfQ5YHNpL8Vjov8RbKTeYbyNSDMB+knby2wuiGgcSWMYokD7uhR2ysPtyv52
|
||||
CM9O8MWXelgJ3mdxLh4WzcWzELXW529J08FKpgcM5579/EpSdQQlh1WHlnTAoNdm
|
||||
xsgWJQMM0CR+/0puIkc1W6GM3cOfS9KNeL/08wfjxRVeFMpyM6DhHMbDxVuNYq57
|
||||
mm3xTAMSmsxEveYsZDjNnZgYZDVJoCnWlpT+1KivzYFxp+1pstk7I76WlwqIqCoz
|
||||
nT3NTVj9h9kvQcd4IgDe+UEygdPa1cAMO4wYdFlGDQKqZjIYvnAy1Qi1JqoeyEr+
|
||||
8ggpr2UCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAjpKzuYGq3tICtYZSXbuUmJbj
|
||||
dIsFRivWxCP25TQ/Csv+tiOijHsU3HNbNXvn8EamkyRi/LoQy7ThoDYhFaQJFaYb
|
||||
wU4mgdoGxj5rH6URlH/qPmWP6nuM2NQBt0VLwh/MWaXm8u0WY5Tzfd/mRwwc+UMM
|
||||
9TJhuQxaf42gjnyQO+d/eBves7lL23vDPFCP8okQ3aAzsg5lDFQ6nT+91TXvMpCx
|
||||
zIurNhce+i2M8tX0IkHmqkEKGBfTdoeUkOVH7Lnac30D5P6daGJrt6PBpWUa8OMC
|
||||
5VdKhy+DE9cQFE8qG+lDZxg56PqZdWG1pyUotFViUAYkA16Ct5363yLWWYid6g==
|
||||
MIIDwTCCAqmgAwIBAgIJAIiYMxDYi32/MA0GCSqGSIb3DQEBBQUAMHcxCzAJBgNV
|
||||
BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBW
|
||||
aWV3MRQwEgYDVQQKDAtHb29nbGUgSW5jLjEQMA4GA1UECwwHQW5kcm9pZDETMBEG
|
||||
A1UEAwwKdGFuZ29fY29yZTAeFw0xNjA0MjYxOTQ2MzFaFw00MzA5MTIxOTQ2MzFa
|
||||
MHcxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1N
|
||||
b3VudGFpbiBWaWV3MRQwEgYDVQQKDAtHb29nbGUgSW5jLjEQMA4GA1UECwwHQW5k
|
||||
cm9pZDETMBEGA1UEAwwKdGFuZ29fY29yZTCCASIwDQYJKoZIhvcNAQEBBQADggEP
|
||||
ADCCAQoCggEBALHvNZUE1ftQMM1yYhTarT+9PAsb+Jy6diZpFnwC52Q35wfiFzPN
|
||||
M8pFj9FfJAmYhQQ7pFksk0ZRvIJ+iEho6zMBIvWucKSAGvIAhfWvd4+E6Dg65cm1
|
||||
rpEnINBICJI2/R2xafGPzFSztmHNqdXPi6vnAnk7mA2CjLLzDfDEVCUfzt/LIHTk
|
||||
Z6Oq5F6zmWnC2Ur9Qg8uHaaZm23k1oGKVCEPlIzi7fgY/u9iWOjOfpCgNSMoekta
|
||||
Ffv0CI0Rme/HJN+56whJDaTIlwOHXH7exhCbqnzUhyge/OMmxfqTPqHsM361KZzE
|
||||
GA3/WqRNDo0a56L/q/mZuQC7kU61RYBhu58CAwEAAaNQME4wHQYDVR0OBBYEFNG2
|
||||
YNmsPzJxXM3M+D9i+J4Mqk8RMB8GA1UdIwQYMBaAFNG2YNmsPzJxXM3M+D9i+J4M
|
||||
qk8RMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAGg4Fd5AvTU8JFgb
|
||||
fGtetaO8sfQ+J/0nJwIYnguUA5VsZr8wy68smzPr8mL3jF5YM7VWP4osUowgwCWT
|
||||
LB2D5w6qNoPlBmm959yAD0zU7CbpKAxIR+xQnIYbcc0KcdJ48crvipHveKPqPpDt
|
||||
kaj6EY6FLna1klP2ywuplh+6pvT8aILxLBzh0V6yT0aX6gPoIlMQqLVjbfk+CW9p
|
||||
/z9j2N+j8ej++hYu1SEmBaLzt0hICmKsNMilR/Wi/3vGBvNbvBiyVJm/uTWbejL1
|
||||
cltUoPDxyH+lQ+WQXqZholbnCl0Ct0xrhiPeLhJ+8eGvSxQw4Wt2E14AcrSwG25j
|
||||
zKHDydw=
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
1
sepolicy/vendor/device.te
vendored
1
sepolicy/vendor/device.te
vendored
@@ -23,5 +23,6 @@ type smd_device, dev_type;
|
||||
type spcom_device, dev_type;
|
||||
type ssd_block_device, dev_type;
|
||||
type ssr_device, dev_type;
|
||||
type thermal_device, dev_type;
|
||||
type wlan_device, dev_type;
|
||||
type xbl_block_device, dev_type;
|
||||
|
||||
2
sepolicy/vendor/easelservice_app.te
vendored
2
sepolicy/vendor/easelservice_app.te
vendored
@@ -6,3 +6,5 @@ allow easelservice_app app_api_service:service_manager find;
|
||||
allow easelservice_app surfaceflinger_service:service_manager find;
|
||||
# Access to mnh_sm driver
|
||||
allow easelservice_app easel_device:chr_file { read write ioctl open };
|
||||
# Access to keychain for kernel based authentication
|
||||
allow easelservice_app kernel:key search;
|
||||
1
sepolicy/vendor/file.te
vendored
1
sepolicy/vendor/file.te
vendored
@@ -26,6 +26,7 @@ type debugfs_usb, debugfs_type, fs_type;
|
||||
type debugfs_wlan, debugfs_type, fs_type;
|
||||
type debugfs_mdp, debugfs_type, fs_type;
|
||||
type debugfs_icnss, debugfs_type, fs_type;
|
||||
type debugfs_ufs, debugfs_type, fs_type;
|
||||
|
||||
# /proc
|
||||
type proc_wifi_dbg, fs_type;
|
||||
|
||||
7
sepolicy/vendor/file_contexts
vendored
7
sepolicy/vendor/file_contexts
vendored
@@ -24,6 +24,7 @@
|
||||
/dev/sdsprpc-smd u:object_r:dsp_device:s0
|
||||
/dev/wcd-dsp-glink u:object_r:audio_device:s0
|
||||
/dev/wcd_dsp0_control u:object_r:audio_device:s0
|
||||
/dev/msm_thermal_query u:object_r:thermal_device:s0
|
||||
/dev/msm_.* u:object_r:audio_device:s0
|
||||
/dev/avtimer u:object_r:avtimer_device:s0
|
||||
/dev/subsys_.* u:object_r:ssr_device:s0
|
||||
@@ -184,6 +185,7 @@
|
||||
/vendor/bin/hw/android\.hardware\.keymaster@3\.0-service-qti u:object_r:hal_keymaster_qti_exec:s0
|
||||
/vendor/bin/hw/android\.hardware\.gatekeeper@1\.0-service-qti u:object_r:hal_gatekeeper_qti_exec:s0
|
||||
/vendor/bin/hw/android\.hardware\.gnss@1\.0-service-qti u:object_r:hal_gnss_qti_exec:s0
|
||||
/vendor/bin/hw/android\.hardware\.neuralnetworks@1\.0-service-hvx u:object_r:hal_neuralnetworks_hvx_exec:s0
|
||||
|
||||
###############################################
|
||||
# same-process HAL files and their dependencies
|
||||
@@ -229,6 +231,11 @@
|
||||
/vendor/lib(64)?/libadsprpc\.so u:object_r:same_process_hal_file:s0
|
||||
/vendor/lib/dsp/fastrpc_shell_0 u:object_r:hexagon_halide_file:s0
|
||||
|
||||
# Hexagon DSP lib to extract image features
|
||||
/vendor/lib/rfsa/adsp/libexternal_dog_skel\.so u:object_r:same_process_hal_file:s0
|
||||
/vendor/lib/rfsa/adsp/libdspCV_skel\.so u:object_r:same_process_hal_file:s0
|
||||
/vendor/lib/rfsa/adsp/libapps_mem_heap\.so u:object_r:same_process_hal_file:s0
|
||||
|
||||
# thermal sysfs files
|
||||
/sys/class/thermal(/.*)? u:object_r:sysfs_thermal:s0
|
||||
|
||||
|
||||
2
sepolicy/vendor/genfs_contexts
vendored
2
sepolicy/vendor/genfs_contexts
vendored
@@ -48,6 +48,7 @@ genfscon sysfs /module/tcp_cubic/parameters u:object
|
||||
genfscon sysfs /module/diagchar/parameters/timestamp_switch u:object_r:sysfs_timestamp_switch:s0
|
||||
genfscon sysfs /devices/virtual/graphics/fb0 u:object_r:sysfs_graphics:s0
|
||||
genfscon sysfs /devices/virtual/graphics/fb1 u:object_r:sysfs_graphics:s0
|
||||
genfscon sysfs /devices/virtual/misc/mnh_sm u:object_r:sysfs_easel:s0
|
||||
genfscon sysfs /devices/soc/8c0000.qcom,msm-cam u:object_r:sysfs_camera:s0
|
||||
genfscon sysfs /devices/soc0 u:object_r:sysfs_soc:s0
|
||||
genfscon sysfs /devices/soc/caa0000.qcom,jpeg u:object_r:sysfs_camera:s0
|
||||
@@ -85,3 +86,4 @@ genfscon debugfs /msm_ipc_router u:object_r:debugfs_ipc:s0
|
||||
genfscon debugfs /mdp u:object_r:debugfs_mdp:s0
|
||||
genfscon debugfs /rmt_storage u:object_r:debugfs_rmt_storage:s0
|
||||
genfscon debugfs /icnss u:object_r:debugfs_icnss:s0
|
||||
genfscon debugfs /ufshcd0 u:object_r:debugfs_ufs:s0
|
||||
|
||||
4
sepolicy/vendor/hal_camera_default.te
vendored
4
sepolicy/vendor/hal_camera_default.te
vendored
@@ -7,12 +7,14 @@ allow hal_camera_default qdisplay_service:service_manager { find };
|
||||
allow hal_camera_default hal_graphics_mapper_hwservice:hwservice_manager find;
|
||||
allow hal_camera_default hal_graphics_allocator_hwservice:hwservice_manager find;
|
||||
|
||||
hal_client_domain(hal_camera_default, hal_configstore)
|
||||
binder_call(hal_camera_default, hal_graphics_composer)
|
||||
binder_call(hal_camera_default, system_server)
|
||||
binder_call(hal_camera_default, hal_graphics_allocator)
|
||||
|
||||
# For interfacing with PowerHAL
|
||||
# For interfacing with PowerHAL and ThermalHAL
|
||||
hal_client_domain(hal_camera_default, hal_power)
|
||||
hal_client_domain(hal_camera_default, hal_thermal)
|
||||
|
||||
# For camera team debugging
|
||||
userdebug_or_eng(`
|
||||
|
||||
2
sepolicy/vendor/hal_cas_default.te
vendored
Normal file
2
sepolicy/vendor/hal_cas_default.te
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Allow CAS HAL to use vendor-binder service
|
||||
vndbinder_use(hal_cas_default);
|
||||
7
sepolicy/vendor/hal_dumpstate_impl.te
vendored
7
sepolicy/vendor/hal_dumpstate_impl.te
vendored
@@ -34,6 +34,7 @@ r_dir_file(hal_dumpstate_impl, sysfs_rmtfs)
|
||||
r_dir_file(hal_dumpstate_impl, sysfs_msm_subsys)
|
||||
r_dir_file(hal_dumpstate_impl, sysfs_soc)
|
||||
r_dir_file(hal_dumpstate_impl, sysfs_thermal)
|
||||
r_dir_file(hal_dumpstate_impl, sysfs_easel)
|
||||
|
||||
allow hal_dumpstate_impl debugfs_ion:dir r_dir_perms;
|
||||
allow hal_dumpstate_impl debugfs_ion:file r_file_perms;
|
||||
@@ -44,6 +45,8 @@ allow hal_dumpstate_impl debugfs_icnss:dir r_dir_perms;
|
||||
allow hal_dumpstate_impl debugfs_icnss:file r_file_perms;
|
||||
allow hal_dumpstate_impl debugfs_ipc:file r_file_perms;
|
||||
allow hal_dumpstate_impl proc_stat:file r_file_perms;
|
||||
allow hal_dumpstate_impl debugfs_ufs:dir r_dir_perms;
|
||||
allow hal_dumpstate_impl debugfs_ufs:file r_file_perms;
|
||||
|
||||
# Access to files for dumping
|
||||
allow hal_dumpstate_impl sysfs:dir r_dir_perms;
|
||||
@@ -58,3 +61,7 @@ allow hal_dumpstate_impl display_vendor_data_file:file r_file_perms;
|
||||
# Access to touch firmware info
|
||||
allow hal_dumpstate_impl sysfs_touch:dir r_dir_perms;
|
||||
allow hal_dumpstate_impl sysfs_touch:file rw_file_perms;
|
||||
|
||||
# Access to UFS info
|
||||
allow hal_dumpstate_impl sysfs_scsi_devices_0000:dir r_dir_perms;
|
||||
allow hal_dumpstate_impl sysfs_scsi_devices_0000:file r_file_perms;
|
||||
|
||||
8
sepolicy/vendor/hal_neuralnetworks_hvx.te
vendored
Normal file
8
sepolicy/vendor/hal_neuralnetworks_hvx.te
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
type hal_neuralnetworks_hvx, domain;
|
||||
hal_server_domain(hal_neuralnetworks_hvx, hal_neuralnetworks)
|
||||
|
||||
type hal_neuralnetworks_hvx_exec, exec_type, vendor_file_type, file_type;
|
||||
init_daemon_domain(hal_neuralnetworks_hvx)
|
||||
|
||||
allow hal_neuralnetworks_hvx ion_device:chr_file { read open ioctl };
|
||||
allow hal_neuralnetworks_hvx qdsp_device:chr_file { read open ioctl };
|
||||
4
sepolicy/vendor/hal_thermal_default.te
vendored
4
sepolicy/vendor/hal_thermal_default.te
vendored
@@ -1,4 +0,0 @@
|
||||
allow hal_thermal_default sysfs_thermal:dir { open read search };
|
||||
allow hal_thermal_default sysfs_thermal:file { getattr open read };
|
||||
allow hal_thermal_default sysfs_thermal:lnk_file read;
|
||||
allow hal_thermal_default proc_stat:file { getattr open read };
|
||||
1
sepolicy/vendor/logger_app.te
vendored
1
sepolicy/vendor/logger_app.te
vendored
@@ -18,4 +18,5 @@ userdebug_or_eng(`
|
||||
|
||||
set_prop(logger_app, cnss_diag_prop)
|
||||
set_prop(logger_app, modem_diag_prop)
|
||||
set_prop(logger_app, bluetooth_log_prop)
|
||||
')
|
||||
|
||||
1
sepolicy/vendor/property.te
vendored
1
sepolicy/vendor/property.te
vendored
@@ -14,3 +14,4 @@ type modem_diag_prop, property_type;
|
||||
type tel_mon_prop, property_type;
|
||||
type sys_time_prop, property_type;
|
||||
type atfwd_start_prop, property_type;
|
||||
type bluetooth_log_prop, property_type;
|
||||
|
||||
1
sepolicy/vendor/property_contexts
vendored
1
sepolicy/vendor/property_contexts
vendored
@@ -24,3 +24,4 @@ sys.modem.diag. u:object_r:modem_diag_prop:s0
|
||||
persist.radio.enable_tel_mon u:object_r:tel_mon_prop:s0
|
||||
sys.time.set u:object_r:sys_time_prop:s0
|
||||
persist.radio.atfwd.start u:object_r:atfwd_start_prop:s0
|
||||
sys.logger.bluetooth u:object_r:bluetooth_log_prop:s0
|
||||
|
||||
4
sepolicy/vendor/system_app.te
vendored
4
sepolicy/vendor/system_app.te
vendored
@@ -2,6 +2,10 @@
|
||||
# userdebug and eng devices
|
||||
userdebug_or_eng(`set_prop(system_app, tel_mon_prop)')
|
||||
|
||||
# Needed by Settings app's CameraHalHdrplusPreferenceController, available only on a subset of
|
||||
# userdebug and eng devices
|
||||
userdebug_or_eng(`set_prop(system_app, camera_prop)')
|
||||
|
||||
# read regulatory info
|
||||
allow system_app elabel_data_file:dir r_dir_perms;
|
||||
allow system_app elabel_data_file:file r_file_perms;
|
||||
|
||||
21
sepolicy/vendor/tango_core.te
vendored
21
sepolicy/vendor/tango_core.te
vendored
@@ -1,20 +1,19 @@
|
||||
type tango_core, domain;
|
||||
type tango_core, domain, coredomain;
|
||||
|
||||
app_domain(tango_core)
|
||||
#from system/sepolicy/private/untrusted_app.te
|
||||
untrusted_app_domain(tango_core)
|
||||
net_domain(tango_core)
|
||||
bluetooth_domain(tango_core)
|
||||
|
||||
#from system/sepolicy/private/untrusted_app.te
|
||||
allow tango_core system_server:udp_socket { connect getattr read recvfrom sendto write };
|
||||
|
||||
#calibration files
|
||||
allow tango_core persist_file:dir search;
|
||||
allow tango_core persist_sensors_file:dir search;
|
||||
allow tango_core persist_sensors_file:file { getattr open read };
|
||||
allow tango_core shell_data_file:dir search;
|
||||
allow tango_core shell_data_file:file { open read };
|
||||
allow tango_core qdsp_device:chr_file { ioctl open read };
|
||||
allow tango_core vendor_file:file { getattr open read };
|
||||
|
||||
allow tango_core app_api_service:service_manager find;
|
||||
allow tango_core surfaceflinger_service:service_manager find;
|
||||
allow tango_core cameraserver_service:service_manager find;
|
||||
allow tango_core audioserver_service:service_manager find;
|
||||
allow tango_core mediaserver_service:service_manager find;
|
||||
|
||||
# Allow access to necessary vendor libraries to execute Hexagon code
|
||||
allow tango_core hexagon_halide_file:file { execute read open getattr };
|
||||
allow tango_core qdsp_device:chr_file { ioctl open read };
|
||||
|
||||
7
sepolicy/vendor/thermal-engine.te
vendored
7
sepolicy/vendor/thermal-engine.te
vendored
@@ -14,10 +14,15 @@ allow thermal-engine sysfs_soc:dir search;
|
||||
allow thermal-engine sysfs_soc:file r_file_perms;
|
||||
allow thermal-engine sysfs_thermal:dir r_dir_perms;
|
||||
allow thermal-engine sysfs_thermal:file rw_file_perms;
|
||||
allow thermal-engine sysfs_thermal:lnk_file read;
|
||||
allow thermal-engine sysfs_rmtfs:dir search;
|
||||
allow thermal-engine sysfs_rmtfs:file r_file_perms;
|
||||
# to read /proc/stat
|
||||
allow thermal-engine proc_stat:file { getattr open read };
|
||||
# IThermal Thermal HAL
|
||||
hal_server_domain(thermal-engine, hal_thermal)
|
||||
|
||||
allow thermal-engine audio_device:chr_file rw_file_perms;
|
||||
allow thermal-engine thermal_device:chr_file rw_file_perms;
|
||||
|
||||
r_dir_file(thermal-engine, sysfs_leds)
|
||||
r_dir_file(thermal-engine, sysfs_msm_subsys)
|
||||
|
||||
7
sepolicy/vendor/wcnss_filter.te
vendored
7
sepolicy/vendor/wcnss_filter.te
vendored
@@ -10,9 +10,12 @@ allow wcnss_filter hci_attach_dev:chr_file rw_file_perms;
|
||||
|
||||
userdebug_or_eng(`
|
||||
allow wcnss_filter diag_device:chr_file rw_file_perms;
|
||||
allow wcnss_filter ramdump_vendor_data_file:dir create_dir_perms;
|
||||
allow wcnss_filter ramdump_vendor_data_file:file create_file_perms;
|
||||
allow wcnss_filter ramdump_vendor_data_file:dir w_dir_perms;
|
||||
allow wcnss_filter ramdump_vendor_data_file:file { create w_file_perms };
|
||||
allow wcnss_filter sysfs_timestamp_switch:file r_file_perms;
|
||||
r_dir_file(wcnss_filter, debugfs_ipc)
|
||||
r_dir_file(wcnss_filter, sysfs_diag)
|
||||
set_prop(wcnss_filter, ssr_prop)
|
||||
')
|
||||
|
||||
#allow wakelock
|
||||
|
||||
83
spn-conf.xml
83
spn-conf.xml
@@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<spnOverrides>
|
||||
<spnOverride numeric="23430" spn="EE"/>
|
||||
<spnOverride numeric="23433" spn="EE"/>
|
||||
<spnOverride numeric="26202" spn="Vodafone"/>
|
||||
<spnOverride numeric="310004" spn="Verizon"/>
|
||||
<spnOverride numeric="302370" spn="Fido"/>
|
||||
<spnOverride numeric="310120" spn="Sprint"/>
|
||||
<spnOverride numeric="310150" spn="AT&T"/>
|
||||
<spnOverride numeric="310160" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310200" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310210" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310220" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310230" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310240" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310250" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310260" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310270" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310300" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310310" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310490" spn="T-Mobile USA"/>
|
||||
<spnOverride numeric="310530" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310560" spn="AT&T"/>
|
||||
<spnOverride numeric="310580" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310590" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310640" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310660" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310680" spn="AT&T"/>
|
||||
<spnOverride numeric="310800" spn="T-Mobile"/>
|
||||
<spnOverride numeric="310980" spn="AT&T"/>
|
||||
<spnOverride numeric="311180" spn="AT&T"/>
|
||||
<spnOverride numeric="311480" spn="Verizon"/>
|
||||
<spnOverride numeric="40402" spn="airtel"/>
|
||||
<spnOverride numeric="40403" spn="airtel"/>
|
||||
<spnOverride numeric="40410" spn="airtel"/>
|
||||
<spnOverride numeric="40416" spn="airtel"/>
|
||||
<spnOverride numeric="40431" spn="airtel"/>
|
||||
<spnOverride numeric="40440" spn="airtel"/>
|
||||
<spnOverride numeric="40445" spn="airtel"/>
|
||||
<spnOverride numeric="40449" spn="airtel"/>
|
||||
<spnOverride numeric="40490" spn="airtel"/>
|
||||
<spnOverride numeric="40492" spn="airtel"/>
|
||||
<spnOverride numeric="40493" spn="airtel"/>
|
||||
<spnOverride numeric="40494" spn="airtel"/>
|
||||
<spnOverride numeric="40495" spn="airtel"/>
|
||||
<spnOverride numeric="40496" spn="airtel"/>
|
||||
<spnOverride numeric="40497" spn="airtel"/>
|
||||
<spnOverride numeric="40498" spn="airtel"/>
|
||||
<spnOverride numeric="40551" spn="airtel"/>
|
||||
<spnOverride numeric="40552" spn="airtel"/>
|
||||
<spnOverride numeric="40553" spn="airtel"/>
|
||||
<spnOverride numeric="40554" spn="airtel"/>
|
||||
<spnOverride numeric="40555" spn="airtel"/>
|
||||
<spnOverride numeric="40556" spn="airtel"/>
|
||||
<spnOverride numeric="405840" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405854" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405855" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405856" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405857" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405858" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405859" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405860" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405861" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405862" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405863" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405864" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405865" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405866" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405867" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405868" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405869" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405870" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405871" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405872" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405873" spn="JIO 4G"/>
|
||||
<spnOverride numeric="405874" spn="JIO 4G"/>
|
||||
<spnOverride numeric="42507" spn="HOT mobile"/>
|
||||
<spnOverride numeric="42508" spn="Golan Telecom"/>
|
||||
<spnOverride numeric="42510" spn="Orange-IL"/>
|
||||
<spnOverride numeric="42514" spn="YouPhone"/>
|
||||
<spnOverride numeric="42515" spn="Home Cellular"/>
|
||||
<spnOverride numeric="42516" spn="Rami Levy"/>
|
||||
</spnOverrides>
|
||||
20
system.prop
20
system.prop
@@ -35,7 +35,6 @@ persist.mm.enable.prefetch=true
|
||||
|
||||
# Additional buffers shared between Camera and Video
|
||||
vendor.vidc.enc.dcvs.extra-buff-count=2
|
||||
vendor.vidc.enc.disable.pq=1
|
||||
|
||||
# system props for the data netmgrd
|
||||
persist.data.netmgrd.qos.enable=true
|
||||
@@ -50,23 +49,8 @@ telephony.lteOnCdmaDevice=1
|
||||
# Simulate sdcard on /data/media
|
||||
persist.fuse_sdcard=true
|
||||
|
||||
# settings to enable Device Orientation Sensors
|
||||
ro.qti.sensors.dev_ori=true
|
||||
|
||||
# settings to disable sensors not needed
|
||||
# all secondary wakeup
|
||||
ro.qti.sensors.wu=false
|
||||
# unused algorithms
|
||||
ro.qti.sdk.sensors.gestures=false
|
||||
ro.qti.sensors.amd=false
|
||||
ro.qti.sensors.cmc=false
|
||||
ro.qti.sensors.facing=false
|
||||
ro.qti.sensors.pedometer=false
|
||||
ro.qti.sensors.rmd=false
|
||||
ro.qti.sensors.scrn_ortn=false
|
||||
# use SMGR supplied verison
|
||||
ro.qti.sensors.step_counter=false
|
||||
ro.qti.sensors.step_detector=false
|
||||
# sensor properties are moved to device.mk
|
||||
#
|
||||
|
||||
#system prop for RmNet Data
|
||||
persist.rmnet.data.enable=true
|
||||
|
||||
20
thermal/Android.bp
Normal file
20
thermal/Android.bp
Normal file
@@ -0,0 +1,20 @@
|
||||
cc_library_shared {
|
||||
name: "android.hardware.thermal@1.1-wahoo",
|
||||
defaults: ["hidl_defaults"],
|
||||
owner: "qcom",
|
||||
vendor: true,
|
||||
relative_install_path: "hw",
|
||||
srcs: [
|
||||
"Thermal.cpp",
|
||||
"thermal-helper.cpp",
|
||||
],
|
||||
export_include_dirs: ["."],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libhidlbase",
|
||||
"libhidltransport",
|
||||
"libutils",
|
||||
"android.hardware.thermal@1.0",
|
||||
"android.hardware.thermal@1.1",
|
||||
],
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
#
|
||||
# Copyright 2017 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
LOCAL_MODULE_OWNER := qcom
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_MODULE := android.hardware.thermal@1.0-service.wahoo
|
||||
LOCAL_INIT_RC := android.hardware.thermal@1.0-service.wahoo.rc
|
||||
LOCAL_SRC_FILES := service.cpp Thermal.cpp thermal-helper.cpp
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libhidlbase \
|
||||
libhidltransport \
|
||||
libutils \
|
||||
libbase \
|
||||
android.hardware.thermal@1.0 \
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
@@ -25,11 +25,29 @@
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace thermal {
|
||||
namespace V1_0 {
|
||||
namespace V1_1 {
|
||||
namespace implementation {
|
||||
|
||||
Thermal::Thermal() : enabled(initThermal()) {}
|
||||
|
||||
namespace {
|
||||
|
||||
// Saves the IThermalCallback client object registered from the
|
||||
// framework for sending thermal events to the framework thermal event bus.
|
||||
sp<IThermalCallback> gThermalCallback;
|
||||
|
||||
struct ThermalDeathRecipient : hidl_death_recipient {
|
||||
virtual void serviceDied(
|
||||
uint64_t cookie __unused, const wp<IBase>& who __unused) {
|
||||
gThermalCallback = nullptr;
|
||||
LOG(ERROR) << "IThermalCallback HIDL service died";
|
||||
}
|
||||
};
|
||||
|
||||
sp<ThermalDeathRecipient> gThermalCallbackDied = nullptr;
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
// Methods from ::android::hardware::thermal::V1_0::IThermal follow.
|
||||
Return<void> Thermal::getTemperatures(getTemperatures_cb _hidl_cb) {
|
||||
ThermalStatus status;
|
||||
@@ -112,8 +130,54 @@ Return<void> Thermal::getCoolingDevices(getCoolingDevices_cb _hidl_cb) {
|
||||
return Void();
|
||||
}
|
||||
|
||||
// Methods from ::android::hardware::thermal::V1_1::IThermal follow.
|
||||
|
||||
Return<void> Thermal::registerThermalCallback(
|
||||
const sp<IThermalCallback>& callback) {
|
||||
gThermalCallback = callback;
|
||||
|
||||
if (gThermalCallback != nullptr) {
|
||||
if (gThermalCallbackDied == nullptr)
|
||||
gThermalCallbackDied = new ThermalDeathRecipient();
|
||||
|
||||
if (gThermalCallbackDied != nullptr)
|
||||
gThermalCallback->linkToDeath(
|
||||
gThermalCallbackDied, 0x451F /* cookie, unused */);
|
||||
LOG(INFO) << "ThermalCallback registered";
|
||||
} else {
|
||||
LOG(INFO) << "ThermalCallback unregistered";
|
||||
}
|
||||
return Void();
|
||||
}
|
||||
|
||||
// Local functions used internally by thermal-engine follow.
|
||||
|
||||
std::string Thermal::getSkinSensorType() {
|
||||
return getTargetSkinSensorType();
|
||||
}
|
||||
|
||||
void Thermal::notifyThrottling(
|
||||
bool isThrottling, const Temperature& temperature) {
|
||||
if (gThermalCallback != nullptr) {
|
||||
Return<void> ret =
|
||||
gThermalCallback->notifyThrottling(isThrottling, temperature);
|
||||
if (!ret.isOk()) {
|
||||
if (ret.isDeadObject()) {
|
||||
gThermalCallback = nullptr;
|
||||
LOG(WARNING) << "Dropped throttling event, ThermalCallback died";
|
||||
} else {
|
||||
LOG(WARNING) <<
|
||||
"Failed to send throttling event to ThermalCallback";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOG(WARNING) <<
|
||||
"Dropped throttling event, no ThermalCallback registered";
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace V1_1
|
||||
} // namespace thermal
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
|
||||
@@ -13,45 +13,56 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifndef ANDROID_HARDWARE_THERMAL_V1_0_WAHOO_THERMAL_H
|
||||
#define ANDROID_HARDWARE_THERMAL_V1_0_WAHOO_THERMAL_H
|
||||
#ifndef ANDROID_HARDWARE_THERMAL_V1_1_WAHOO_THERMAL_H
|
||||
#define ANDROID_HARDWARE_THERMAL_V1_1_WAHOO_THERMAL_H
|
||||
|
||||
#include <android/hardware/thermal/1.0/IThermal.h>
|
||||
#include <android/hardware/thermal/1.1/IThermal.h>
|
||||
#include <android/hardware/thermal/1.1/IThermalCallback.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <hidl/MQDescriptor.h>
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace thermal {
|
||||
namespace V1_0 {
|
||||
namespace V1_1 {
|
||||
namespace implementation {
|
||||
|
||||
using ::android::hardware::thermal::V1_0::CoolingDevice;
|
||||
using ::android::hardware::thermal::V1_0::CpuUsage;
|
||||
using ::android::hardware::thermal::V1_0::IThermal;
|
||||
using ::android::hardware::thermal::V1_0::Temperature;
|
||||
using ::android::hardware::thermal::V1_0::ThermalStatus;
|
||||
using ::android::hardware::thermal::V1_0::ThermalStatusCode;
|
||||
using ::android::hardware::thermal::V1_1::IThermal;
|
||||
using ::android::hardware::thermal::V1_1::IThermalCallback;
|
||||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
using ::android::hardware::hidl_vec;
|
||||
using ::android::hardware::hidl_string;
|
||||
using ::android::hardware::hidl_death_recipient;
|
||||
using ::android::hidl::base::V1_0::IBase;
|
||||
using ::android::sp;
|
||||
|
||||
struct Thermal : public IThermal {
|
||||
// Local functions used internally by thermal-engine follow.
|
||||
std::string getSkinSensorType();
|
||||
void notifyThrottling(bool isThrottling, const Temperature& temperature);
|
||||
Thermal();
|
||||
// Methods from ::android::hardware::thermal::V1_0::IThermal follow.
|
||||
Return<void> getTemperatures(getTemperatures_cb _hidl_cb) override;
|
||||
Return<void> getCpuUsages(getCpuUsages_cb _hidl_cb) override;
|
||||
Return<void> getCoolingDevices(getCoolingDevices_cb _hidl_cb) override;
|
||||
// Methods from ::android::hardware::thermal::V1_1::IThermal follow.
|
||||
Return<void> registerThermalCallback(
|
||||
const sp<IThermalCallback>& callback) override;
|
||||
|
||||
private:
|
||||
bool enabled;
|
||||
};
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace V1_1
|
||||
} // namespace thermal
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
|
||||
#endif // ANDROID_HARDWARE_THERMAL_V1_0_WAHOO_THERMAL_H
|
||||
#endif // ANDROID_HARDWARE_THERMAL_V1_1_WAHOO_THERMAL_H
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
service thermal-hal-1-0 /vendor/bin/hw/android.hardware.thermal@1.0-service.wahoo
|
||||
class hal
|
||||
user nobody
|
||||
group nobody
|
||||
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2017 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <hidl/HidlTransportSupport.h>
|
||||
#include "Thermal.h"
|
||||
|
||||
using android::sp;
|
||||
using android::status_t;
|
||||
using android::OK;
|
||||
|
||||
// libhwbinder:
|
||||
using android::hardware::configureRpcThreadpool;
|
||||
using android::hardware::joinRpcThreadpool;
|
||||
|
||||
// Generated HIDL files
|
||||
using android::hardware::thermal::V1_0::IThermal;
|
||||
using android::hardware::thermal::V1_0::implementation::Thermal;
|
||||
|
||||
int main() {
|
||||
|
||||
status_t status;
|
||||
android::sp<IThermal> service = nullptr;
|
||||
|
||||
LOG(INFO) << "Thermal HAL Service 1.0 is starting";
|
||||
|
||||
service = new Thermal();
|
||||
if (service == nullptr) {
|
||||
LOG(ERROR) << "Can not create an instance of Thermal HAL Iface, exiting";
|
||||
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
configureRpcThreadpool(1, true /*callerWillJoin*/);
|
||||
|
||||
status = service->registerAsService();
|
||||
if (status != OK) {
|
||||
LOG(ERROR) << "Could not register service for Thermal HAL Iface (" << status << ")";
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
LOG(INFO) << "Thermal Service is ready";
|
||||
joinRpcThreadpool();
|
||||
// Should not pass this line
|
||||
|
||||
shutdown:
|
||||
// In normal operation, we don't expect the thread pool to exit
|
||||
LOG(ERROR) << "Thermal Service is shutting down";
|
||||
return 1;
|
||||
}
|
||||
@@ -30,10 +30,13 @@
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace thermal {
|
||||
namespace V1_0 {
|
||||
namespace V1_1 {
|
||||
namespace implementation {
|
||||
|
||||
using ::android::hardware::thermal::V1_0::TemperatureType;
|
||||
|
||||
static unsigned int gSkinSensorNum;
|
||||
static std::string gSkinSensorType;
|
||||
static unsigned int gTsensOffset;
|
||||
static unsigned int gSkinThrottlingThreshold;
|
||||
static unsigned int gSkinShutdownThreshold;
|
||||
@@ -49,6 +52,7 @@ bool initThermal() {
|
||||
if (hardware == "walleye") {
|
||||
LOG(ERROR) << "Initialization on Walleye";
|
||||
gSkinSensorNum = kWalleyeSkinSensorNum;
|
||||
gSkinSensorType = kWalleyeSkinSensorType;
|
||||
gTsensOffset = kWalleyeTsensOffset;
|
||||
gSkinThrottlingThreshold = kWalleyeSkinThrottlingThreshold;
|
||||
gSkinShutdownThreshold = kWalleyeSkinShutdownThreshold;
|
||||
@@ -58,6 +62,7 @@ bool initThermal() {
|
||||
if (rev == "rev_a" || rev == "rev_b") {
|
||||
LOG(ERROR) << "Initialization on Taimen pre revision C";
|
||||
gSkinSensorNum = kTaimenRabSkinSensorNum;
|
||||
gSkinSensorType = kTaimenRabSkinSensorType;
|
||||
gTsensOffset = kTaimenRabTsensOffset;
|
||||
gSkinThrottlingThreshold = kTaimenRabSkinThrottlingThreshold;
|
||||
gSkinShutdownThreshold = kTaimenRabSkinShutdownThreshold;
|
||||
@@ -65,6 +70,7 @@ bool initThermal() {
|
||||
} else {
|
||||
LOG(ERROR) << "Initialization on Taimen revision C and later";
|
||||
gSkinSensorNum = kTaimenRcSkinSensorNum;
|
||||
gSkinSensorType = kTaimenRcSkinSensorType;
|
||||
gTsensOffset = kTaimenRcTsensOffset;
|
||||
gSkinThrottlingThreshold = kTaimenRcSkinThrottlingThreshold;
|
||||
gSkinShutdownThreshold = kTaimenRcSkinShutdownThreshold;
|
||||
@@ -286,8 +292,12 @@ ssize_t fillCpuUsages(hidl_vec<CpuUsage> *cpuUsages) {
|
||||
return kCpuNum;
|
||||
}
|
||||
|
||||
std::string getTargetSkinSensorType() {
|
||||
return gSkinSensorType;
|
||||
}
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace V1_1
|
||||
} // namespace thermal
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
#ifndef __THERMAL_HELPER_H__
|
||||
#define __THERMAL_HELPER_H__
|
||||
|
||||
#include <android/hardware/thermal/1.0/IThermal.h>
|
||||
#include <android/hardware/thermal/1.1/IThermal.h>
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace thermal {
|
||||
namespace V1_0 {
|
||||
namespace V1_1 {
|
||||
namespace implementation {
|
||||
|
||||
using ::android::hardware::thermal::V1_0::CpuUsage;
|
||||
@@ -47,18 +47,21 @@ constexpr const char *kCpuOnlineFileFormat = "/sys/devices/system/cpu/cpu%d/onli
|
||||
|
||||
// thermal-engine.conf
|
||||
constexpr unsigned int kWalleyeSkinSensorNum = 9;
|
||||
constexpr auto kWalleyeSkinSensorType = "back_therm";
|
||||
constexpr unsigned int kWalleyeTsensOffset = 11;
|
||||
constexpr unsigned int kWalleyeSkinThrottlingThreshold = 40;
|
||||
constexpr unsigned int kWalleyeSkinShutdownThreshold = 56;
|
||||
constexpr unsigned int kWalleyeVrThrottledBelowMin = 52;
|
||||
|
||||
constexpr unsigned int kTaimenRabSkinSensorNum = 8;
|
||||
constexpr auto kTaimenRabSkinSensorType = "bd_therm";
|
||||
constexpr unsigned int kTaimenRabTsensOffset = 9;
|
||||
constexpr unsigned int kTaimenRabSkinThrottlingThreshold = 49;
|
||||
constexpr unsigned int kTaimenRabSkinShutdownThreshold = 66;
|
||||
constexpr unsigned int kTaimenRabVrThrottledBelowMin = 62;
|
||||
|
||||
constexpr unsigned int kTaimenRcSkinSensorNum = 8;
|
||||
constexpr auto kTaimenRcSkinSensorType = "bd_therm2";
|
||||
constexpr unsigned int kTaimenRcTsensOffset = 9;
|
||||
constexpr unsigned int kTaimenRcSkinThrottlingThreshold = 38;
|
||||
constexpr unsigned int kTaimenRcSkinShutdownThreshold = 54;
|
||||
@@ -90,9 +93,10 @@ constexpr unsigned int kBatteryShutdownThreshold = 60;
|
||||
bool initThermal();
|
||||
ssize_t fillTemperatures(hidl_vec<Temperature> *temperatures);
|
||||
ssize_t fillCpuUsages(hidl_vec<CpuUsage> *cpuUsages);
|
||||
std::string getTargetSkinSensorType();
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace V1_1
|
||||
} // namespace thermal
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
|
||||
31
usb/Usb.cpp
31
usb/Usb.cpp
@@ -182,12 +182,12 @@ bool switchMode(const hidl_string &portName,
|
||||
|
||||
if (ret != EOF) {
|
||||
struct timespec to;
|
||||
struct timeval tp;
|
||||
struct timespec now;
|
||||
|
||||
wait_again:
|
||||
gettimeofday(&tp, NULL);
|
||||
to.tv_sec = tp.tv_sec + PORT_TYPE_TIMEOUT;
|
||||
to.tv_nsec = tp.tv_usec * 1000;;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
to.tv_sec = now.tv_sec + PORT_TYPE_TIMEOUT;
|
||||
to.tv_nsec = now.tv_nsec;
|
||||
|
||||
int err = pthread_cond_timedwait(&usb->mPartnerCV, &usb->mPartnerLock, &to);
|
||||
// There are no uevent signals which implies role swap timed out.
|
||||
@@ -212,6 +212,29 @@ wait_again:
|
||||
return roleSwitch;
|
||||
}
|
||||
|
||||
Usb::Usb()
|
||||
: mLock(PTHREAD_MUTEX_INITIALIZER),
|
||||
mRoleSwitchLock(PTHREAD_MUTEX_INITIALIZER),
|
||||
mPartnerLock(PTHREAD_MUTEX_INITIALIZER),
|
||||
mPartnerUp(false) {
|
||||
pthread_condattr_t attr;
|
||||
if (pthread_condattr_init(&attr)) {
|
||||
ALOGE("pthread_condattr_init failed: %s", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
if (pthread_condattr_setclock(&attr, CLOCK_MONOTONIC)) {
|
||||
ALOGE("pthread_condattr_setclock failed: %s", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
if (pthread_cond_init(&mPartnerCV, &attr)) {
|
||||
ALOGE("pthread_cond_init failed: %s", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
if (pthread_condattr_destroy(&attr)) {
|
||||
ALOGE("pthread_condattr_destroy failed: %s", strerror(errno));
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Return<void> Usb::switchRole(const hidl_string &portName,
|
||||
|
||||
10
usb/Usb.h
10
usb/Usb.h
@@ -40,6 +40,8 @@ using ::android::hardware::Void;
|
||||
using ::android::sp;
|
||||
|
||||
struct Usb : public IUsb {
|
||||
Usb();
|
||||
|
||||
Return<void> switchRole(const hidl_string& portName, const PortRole& role) override;
|
||||
Return<void> setCallback(const sp<V1_0::IUsbCallback>& callback) override;
|
||||
Return<void> queryPortStatus() override;
|
||||
@@ -47,13 +49,13 @@ struct Usb : public IUsb {
|
||||
|
||||
sp<V1_0::IUsbCallback> mCallback_1_0;
|
||||
// Protects mCallback variable
|
||||
pthread_mutex_t mLock = PTHREAD_MUTEX_INITIALIZER;
|
||||
pthread_mutex_t mLock;
|
||||
// Protects roleSwitch operation
|
||||
pthread_mutex_t mRoleSwitchLock = PTHREAD_MUTEX_INITIALIZER;
|
||||
pthread_mutex_t mRoleSwitchLock;
|
||||
// Threads waiting for the partner to come back wait here
|
||||
pthread_cond_t mPartnerCV = PTHREAD_COND_INITIALIZER;
|
||||
pthread_cond_t mPartnerCV;
|
||||
// lock protecting mPartnerCV
|
||||
pthread_mutex_t mPartnerLock = PTHREAD_MUTEX_INITIALIZER;
|
||||
pthread_mutex_t mPartnerLock;
|
||||
// Variable to signal partner coming back online after type switch
|
||||
bool mPartnerUp;
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
ifneq ($(filter muskie walleye taimen, $(TARGET_DEVICE)),)
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
VNDK_SP_LIBRARIES := \
|
||||
ifndef BOARD_VNDK_VERSION
|
||||
VNDK_SP_LIBRARIES += \
|
||||
android.hardware.renderscript@1.0\
|
||||
android.hardware.graphics.allocator@2.0\
|
||||
android.hardware.graphics.mapper@2.0\
|
||||
@@ -10,21 +11,25 @@ VNDK_SP_LIBRARIES := \
|
||||
libbase\
|
||||
libcutils\
|
||||
libhardware\
|
||||
libhidlbase\
|
||||
libhidltransport\
|
||||
libutils\
|
||||
libc++\
|
||||
libbacktrace\
|
||||
libunwind\
|
||||
libunwindstack\
|
||||
liblzma\
|
||||
libhidlbase\
|
||||
libhidltransport\
|
||||
libz\
|
||||
libbcinfo\
|
||||
libblas\
|
||||
libcompiler_rt\
|
||||
libRS_internal\
|
||||
libRSDriver\
|
||||
libRSCpuRef\
|
||||
libbcinfo\
|
||||
libblas\
|
||||
libft2\
|
||||
libpng\
|
||||
libcompiler_rt\
|
||||
libbacktrace\
|
||||
libunwind\
|
||||
liblzma\
|
||||
|
||||
endif
|
||||
|
||||
define add-vndk-sp-lib
|
||||
include $$(CLEAR_VARS)
|
||||
|
||||
@@ -22,8 +22,9 @@ cc_library_static {
|
||||
"offload_server.cpp",
|
||||
"chre_interface_factory.cpp",
|
||||
"offload_status_util.cpp",
|
||||
"offload_utils.cpp",
|
||||
],
|
||||
cflags: ["-Wall", "-Wextra"],
|
||||
cflags: ["-Wall", "-Wextra", "-Werror"],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libhidlbase",
|
||||
@@ -33,7 +34,8 @@ cc_library_static {
|
||||
"android.hardware.wifi.offload@1.0",
|
||||
],
|
||||
whole_static_libs: [
|
||||
"chre_client"
|
||||
"chre_client",
|
||||
"wifi_offload_types",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -45,6 +47,7 @@ cc_binary {
|
||||
cflags: ["-Wall", "-Wextra"],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libcutils",
|
||||
"libhidlbase",
|
||||
"libhidltransport",
|
||||
"liblog",
|
||||
@@ -67,6 +70,9 @@ cc_test {
|
||||
"test/mock_chre_interface.cpp",
|
||||
"test/offload_server_test.cpp",
|
||||
"test/chre_interface_test.cpp",
|
||||
"test/offload_utils_test.cpp",
|
||||
"test/offload_hal_test_constants.cpp",
|
||||
"test/offload_hal_test_utils.cpp",
|
||||
],
|
||||
local_include_dirs: [
|
||||
"test",
|
||||
@@ -74,6 +80,7 @@ cc_test {
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libcutils",
|
||||
"libhidlbase",
|
||||
"libhidltransport",
|
||||
"libutils",
|
||||
@@ -85,5 +92,8 @@ cc_test {
|
||||
"libgtest",
|
||||
"android.hardware.wifi.offload@1.0-lib",
|
||||
],
|
||||
whole_static_libs: [
|
||||
"wifi_offload_types",
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class HidlDeathHandler : public android::hardware::hidl_death_recipient {
|
||||
|
||||
// Death notification for callbacks.
|
||||
void serviceDied(uint64_t cookie,
|
||||
const android::wp<android::hidl::base::V1_0::IBase> &who) override {
|
||||
const android::wp<android::hidl::base::V1_0::IBase>& /* who */) override {
|
||||
cb_.clear();
|
||||
cb_function_(cookie);
|
||||
}
|
||||
|
||||
@@ -142,6 +142,9 @@ void ChreInterface::reportConnectionEvent(ChreInterfaceCallbacks::ConnectionEven
|
||||
switch (event) {
|
||||
case ChreInterfaceCallbacks::ConnectionEvent::CONNECTED:
|
||||
connectionStatus = true;
|
||||
if (!getHubInfo() || !getNanoAppList()) {
|
||||
LOG(WARNING) << "Unable to get platform and nano app info";
|
||||
}
|
||||
break;
|
||||
case ChreInterfaceCallbacks::ConnectionEvent::DISCONNECTED:
|
||||
case ChreInterfaceCallbacks::ConnectionEvent::CONNECTION_ABORT:
|
||||
@@ -181,6 +184,29 @@ void ChreInterface::handleMessage(uint32_t messageType, const void* messageData,
|
||||
mServerCallbacks->handleMessage(messageType, message);
|
||||
}
|
||||
|
||||
bool ChreInterface::getHubInfo() {
|
||||
LOG(VERBOSE) << "getHubInfo";
|
||||
|
||||
FlatBufferBuilder builder(chre_constants::kHubInfoRequestBufLen);
|
||||
HostProtocolHost::encodeHubInfoRequest(builder);
|
||||
if (!mClient.sendMessage(builder.GetBufferPointer(), builder.GetSize())) {
|
||||
LOG(WARNING) << "Failed to send Hub Info request";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChreInterface::getNanoAppList() {
|
||||
LOG(VERBOSE) << "getNanoAppList";
|
||||
FlatBufferBuilder builder(chre_constants::kNanoAppListRequestBufLen);
|
||||
HostProtocolHost::encodeNanoappListRequest(builder);
|
||||
|
||||
if (!mClient.sendMessage(builder.GetBufferPointer(), builder.GetSize())) {
|
||||
LOG(WARNING) << "Unable to send Nano app List request";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace offload
|
||||
|
||||
@@ -51,6 +51,10 @@ class SocketCallbacks
|
||||
void handleUnloadNanoappResponse(const ::chre::fbs::UnloadNanoappResponseT& response) override;
|
||||
|
||||
private:
|
||||
/* Requests Hub Information, returns true if Hub Info request was sent */
|
||||
bool getHubInfo();
|
||||
/* Request list of Nano apps, returns true if Nano app List request was sent */
|
||||
bool getNanoAppList();
|
||||
ChreInterface* mParent;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
#include "offload_server.h"
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <chre/apps/wifi_offload/flatbuffers_serialization.h>
|
||||
#include <chre/apps/wifi_offload/host_message_types.h>
|
||||
|
||||
#include "offload_status_util.h"
|
||||
#include "offload_utils.h"
|
||||
|
||||
using namespace android::hardware::wifi::offload::V1_0::implementation::chre_constants;
|
||||
using android::hardware::wifi::offload::V1_0::OffloadStatus;
|
||||
|
||||
namespace {
|
||||
constexpr auto kScanStatsTimeout = std::chrono::milliseconds(500);
|
||||
}
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
@@ -21,44 +31,121 @@ OffloadServer::OffloadServer(ChreInterfaceFactory* factory)
|
||||
|
||||
OffloadStatus OffloadServer::configureScans(const ScanParam& param, const ScanFilter& filter) {
|
||||
LOG(INFO) << "configureScans";
|
||||
if (!mChreInterface->isConnected()) {
|
||||
return createOffloadStatus(OffloadStatusCode::NO_CONNECTION,
|
||||
"Not connected to hardware implementation");
|
||||
}
|
||||
wifi_offload::ScanConfig scanConfig;
|
||||
if (!offload_utils::ToChreScanConfig(param, filter, &scanConfig)) {
|
||||
return createOffloadStatus(OffloadStatusCode::ERROR,
|
||||
"Unable to convert scan configuration");
|
||||
}
|
||||
uint8_t buffer[kMaxMessageLen];
|
||||
size_t result_size = wifi_offload::fbs::Serialize(scanConfig, buffer, kMaxMessageLen);
|
||||
if (result_size <= 0) {
|
||||
return createOffloadStatus(OffloadStatusCode::ERROR, "Scan config serialization failed");
|
||||
}
|
||||
std::vector<uint8_t> message(buffer, buffer + result_size);
|
||||
if (!mChreInterface->sendCommandToApp(wifi_offload::HostMessageType::HOST_CMD_CONFIG_SCANS,
|
||||
message)) {
|
||||
return createOffloadStatus(OffloadStatusCode::ERROR, "Unable to send config message");
|
||||
}
|
||||
return createOffloadStatus(OffloadStatusCode::OK);
|
||||
}
|
||||
|
||||
std::pair<OffloadStatus, ScanStats> OffloadServer::getScanStats() {
|
||||
LOG(INFO) << "getScanStats";
|
||||
OffloadStatus status = createOffloadStatus(OffloadStatusCode::OK);
|
||||
return std::make_pair(status, mScanStats);
|
||||
mScanStatsStatus = createOffloadStatus(OffloadStatusCode::OK);
|
||||
if (!mChreInterface->isConnected()) {
|
||||
return {createOffloadStatus(OffloadStatusCode::NO_CONNECTION, "Unable to send scan stats"),
|
||||
{}};
|
||||
}
|
||||
if (!mChreInterface->sendCommandToApp(wifi_offload::HostMessageType::HOST_CMD_GET_SCAN_STATS,
|
||||
{})) {
|
||||
return {createOffloadStatus(OffloadStatusCode::ERROR, "Unable to send scan stats command"),
|
||||
{}};
|
||||
}
|
||||
LOG(VERBOSE) << "Sent getScanStats command";
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mScanStatsLock);
|
||||
auto timeout_status = mScanStatsCond.wait_for(lock, kScanStatsTimeout);
|
||||
if (timeout_status == std::cv_status::timeout) {
|
||||
std::lock_guard<std::mutex> lock(mOffloadLock);
|
||||
LOG(WARNING) << "Timeout waiting for scan stats";
|
||||
return {createOffloadStatus(OffloadStatusCode::TIMEOUT, "Scan stats not received"), {}};
|
||||
}
|
||||
}
|
||||
return std::make_pair(mScanStatsStatus, mScanStats);
|
||||
}
|
||||
|
||||
OffloadStatus OffloadServer::subscribeScanResults(uint32_t delayMs) {
|
||||
LOG(INFO) << "subscribeScanResults with delay:" << delayMs;
|
||||
if (!mChreInterface->isConnected()) {
|
||||
return createOffloadStatus(OffloadStatusCode::NO_CONNECTION, "Not connected to hardware");
|
||||
}
|
||||
uint32_t* buffer = &delayMs;
|
||||
std::vector<uint8_t> message(reinterpret_cast<uint8_t*>(buffer),
|
||||
reinterpret_cast<uint8_t*>(buffer) + kSubscriptionDelayMsBufLen);
|
||||
if (!mChreInterface->sendCommandToApp(
|
||||
wifi_offload::HostMessageType::HOST_CMD_SUBSCRIBE_SCAN_RESULTS, message)) {
|
||||
return createOffloadStatus(OffloadStatusCode::ERROR, "Unable to request scans");
|
||||
}
|
||||
return createOffloadStatus(OffloadStatusCode::OK);
|
||||
}
|
||||
|
||||
void OffloadServer::resetNanoApp() {
|
||||
LOG(INFO) << "resetting Nano app";
|
||||
if (!mChreInterface->isConnected()) {
|
||||
LOG(WARNING) << "Unable to reset nano app, not connected";
|
||||
return;
|
||||
}
|
||||
if (!mChreInterface->sendCommandToApp(wifi_offload::HostMessageType::HOST_CMD_RESET, {})) {
|
||||
LOG(ERROR) << "Unable to send Reset command to Nano app";
|
||||
}
|
||||
}
|
||||
|
||||
bool OffloadServer::unsubscribeScanResults() {
|
||||
LOG(INFO) << "unsubscribeScanResults";
|
||||
if (!mChreInterface->isConnected()) {
|
||||
LOG(WARNING) << "Failed to send unsubscribe scan results message";
|
||||
return false;
|
||||
}
|
||||
if (!mChreInterface->sendCommandToApp(
|
||||
wifi_offload::HostMessageType::HOST_CMD_UNSUBSCRIBE_SCAN_RESULTS, {})) {
|
||||
LOG(WARNING) << "Failed to send unsubscribe scan results message";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OffloadServer::setEventCallback(const sp<IOffloadCallback>& cb) {
|
||||
LOG(INFO) << "Set Event callback";
|
||||
bool result = false;
|
||||
if (cb != nullptr) {
|
||||
mEventCallback = cb;
|
||||
result = true;
|
||||
} else {
|
||||
LOG(WARNING) << "Invalid callback object";
|
||||
if (cb == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return result;
|
||||
std::lock_guard<std::mutex> lock(mOffloadLock);
|
||||
mEventCallback = cb;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OffloadServer::clearEventCallback() {
|
||||
std::lock_guard<std::mutex> lock(mOffloadLock);
|
||||
if (mEventCallback != nullptr) {
|
||||
mEventCallback.clear();
|
||||
}
|
||||
LOG(INFO) << "Event callback cleared";
|
||||
}
|
||||
|
||||
void OffloadServer::invokeErrorCallbackAndResetIfNeeded(const OffloadStatus& status) {
|
||||
if (status.code != OffloadStatusCode::OK) {
|
||||
resetNanoApp();
|
||||
}
|
||||
std::lock_guard<std::mutex> lock(mOffloadLock);
|
||||
if (mEventCallback != nullptr) {
|
||||
mEventCallback->onError(status);
|
||||
}
|
||||
}
|
||||
|
||||
ChreInterfaceCallbacksImpl::ChreInterfaceCallbacksImpl(OffloadServer* server) : mServer(server) {
|
||||
}
|
||||
|
||||
@@ -67,12 +154,89 @@ ChreInterfaceCallbacksImpl::~ChreInterfaceCallbacksImpl() {
|
||||
|
||||
void ChreInterfaceCallbacksImpl::handleConnectionEvents(
|
||||
ChreInterfaceCallbacks::ConnectionEvent event) {
|
||||
LOG(VERBOSE) << "Connection event received " << (int)event;
|
||||
switch (event) {
|
||||
case ChreInterfaceCallbacks::ConnectionEvent::DISCONNECTED:
|
||||
case ChreInterfaceCallbacks::ConnectionEvent::CONNECTION_ABORT: {
|
||||
LOG(ERROR) << "Connection to socket lost";
|
||||
mServer->invokeErrorCallbackAndResetIfNeeded(
|
||||
createOffloadStatus(OffloadStatusCode::NO_CONNECTION, "Connection to socket lost"));
|
||||
} break;
|
||||
case ChreInterfaceCallbacks::ConnectionEvent::CONNECTED: {
|
||||
LOG(INFO) << "Connected to socket";
|
||||
mServer->invokeErrorCallbackAndResetIfNeeded(
|
||||
createOffloadStatus(OffloadStatusCode::OK));
|
||||
} break;
|
||||
default:
|
||||
LOG(WARNING) << "Invalid connection event received " << (int)event;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OffloadServer::handleScanResult(const std::vector<uint8_t>& message) {
|
||||
std::vector<wifi_offload::ScanResult> scanResults;
|
||||
std::vector<ScanResult> hidlScanResults;
|
||||
std::string errorMessage;
|
||||
if (!wifi_offload::fbs::Deserialize((uint8_t*)message.data(), message.size(), &scanResults)) {
|
||||
invokeErrorCallbackAndResetIfNeeded(
|
||||
createOffloadStatus(OffloadStatusCode::ERROR, "Cannot deserialize scan results"));
|
||||
return;
|
||||
}
|
||||
if (!offload_utils::ToHidlScanResults(scanResults, &hidlScanResults)) {
|
||||
invokeErrorCallbackAndResetIfNeeded(createOffloadStatus(
|
||||
OffloadStatusCode::ERROR, "Cannot convert scan results to HIDL format"));
|
||||
return;
|
||||
}
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mOffloadLock);
|
||||
if (mEventCallback != nullptr) {
|
||||
mEventCallback->onScanResult(hidlScanResults);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OffloadServer::handleScanStats(const std::vector<uint8_t>& message) {
|
||||
std::lock_guard<std::mutex> lock(mScanStatsLock);
|
||||
wifi_offload::ScanStats stats;
|
||||
OffloadStatus status;
|
||||
// Deserialize scan stats
|
||||
status = createOffloadStatus(OffloadStatusCode::OK);
|
||||
LOG(VERBOSE) << "Received scan stats";
|
||||
if (!wifi_offload::fbs::Deserialize((uint8_t*)message.data(), message.size(), &stats)) {
|
||||
status = createOffloadStatus(OffloadStatusCode::ERROR, "Cannot deserailize scan stats");
|
||||
} else if (!offload_utils::ToHidlScanStats(stats, &mScanStats)) {
|
||||
status = createOffloadStatus(OffloadStatusCode::ERROR,
|
||||
"Cannot convert Scan stats to HIDL format");
|
||||
}
|
||||
mScanStatsStatus = status;
|
||||
mScanStatsCond.notify_all();
|
||||
}
|
||||
|
||||
void ChreInterfaceCallbacksImpl::handleMessage(uint32_t messageType,
|
||||
const std::vector<uint8_t>& message) {
|
||||
LOG(VERBOSE) << "Message from Nano app " << messageType;
|
||||
switch (messageType) {
|
||||
case wifi_offload::HostMessageType::HOST_MSG_SCAN_RESULTS: {
|
||||
LOG(INFO) << "Received scan results";
|
||||
mServer->handleScanResult(message);
|
||||
} break;
|
||||
case wifi_offload::HostMessageType::HOST_MSG_SCAN_STATS:
|
||||
LOG(VERBOSE) << "Received scan stats from Nano app";
|
||||
mServer->handleScanStats(message);
|
||||
break;
|
||||
case wifi_offload::HostMessageType::HOST_MSG_ERROR:
|
||||
LOG(VERBOSE) << "Received error message from Nano app";
|
||||
{
|
||||
std::string errorMessage;
|
||||
if (offload_utils::ToHidlErrorMessage(message[0], &errorMessage)) {
|
||||
mServer->invokeErrorCallbackAndResetIfNeeded(
|
||||
createOffloadStatus(OffloadStatusCode::ERROR, errorMessage));
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG(WARNING) << "Unknown message received" << messageType;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
|
||||
@@ -41,7 +41,18 @@ class OffloadServer {
|
||||
void clearEventCallback();
|
||||
|
||||
private:
|
||||
void invokeErrorCallbackAndResetIfNeeded(
|
||||
const android::hardware::wifi::offload::V1_0::OffloadStatus& status);
|
||||
void handleScanResult(const std::vector<uint8_t>& message);
|
||||
void handleScanStats(const std::vector<uint8_t>& message);
|
||||
void resetNanoApp();
|
||||
|
||||
ScanStats mScanStats;
|
||||
std::mutex mScanStatsLock;
|
||||
std::condition_variable mScanStatsCond;
|
||||
std::mutex mOffloadLock;
|
||||
OffloadStatus mScanStatsStatus;
|
||||
|
||||
std::unique_ptr<ChreInterfaceCallbacksImpl> mChreInterfaceCallbacks;
|
||||
std::unique_ptr<ChreInterface> mChreInterface;
|
||||
sp<IOffloadCallback> mEventCallback;
|
||||
|
||||
285
wifi_offload/offload_utils.cpp
Normal file
285
wifi_offload/offload_utils.cpp
Normal file
@@ -0,0 +1,285 @@
|
||||
/*
|
||||
* Copyright (C) 2016, The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "offload_utils.h"
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <chre/apps/wifi_offload/error_codes.h>
|
||||
|
||||
namespace {
|
||||
|
||||
bool ToHidlRecordName(const wifi_offload::RpcLogRecord::RpcLogRecordType& chreRecordType,
|
||||
android::hardware::wifi::offload::V1_0::RecordName* hidlRecordName) {
|
||||
bool result = true;
|
||||
switch (chreRecordType) {
|
||||
case wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_INIT:
|
||||
*hidlRecordName = android::hardware::wifi::offload::V1_0::RecordName::CMD_INT;
|
||||
break;
|
||||
case wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_CONFIG_SCANS:
|
||||
*hidlRecordName = android::hardware::wifi::offload::V1_0::RecordName::CMD_CONFIG_SCANS;
|
||||
break;
|
||||
case wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_SUBSCRIBE_SCAN_RESULTS:
|
||||
*hidlRecordName =
|
||||
android::hardware::wifi::offload::V1_0::RecordName::CMD_SUBSCRIBE_SCAN_RESULTS;
|
||||
break;
|
||||
case wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_UNSUBSCRIBE_SCAN_RESULTS:
|
||||
*hidlRecordName =
|
||||
android::hardware::wifi::offload::V1_0::RecordName::CMD_UNSUBSCRIBE_SCAN_RESULTS;
|
||||
break;
|
||||
case wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_GET_SCAN_STATS:
|
||||
*hidlRecordName =
|
||||
android::hardware::wifi::offload::V1_0::RecordName::CMD_GET_SCAN_STATS;
|
||||
break;
|
||||
case wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_RESET:
|
||||
*hidlRecordName = android::hardware::wifi::offload::V1_0::RecordName::CMD_RESET;
|
||||
break;
|
||||
case wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_RECVD_SCAN_RESULT_ASYNC:
|
||||
*hidlRecordName =
|
||||
android::hardware::wifi::offload::V1_0::RecordName::EVENT_RECVD_SCAN_RESULT_ASYNC;
|
||||
break;
|
||||
case wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_RECVD_SCAN_RESULT:
|
||||
*hidlRecordName =
|
||||
android::hardware::wifi::offload::V1_0::RecordName::EVENT_RECVD_SCAN_RESULT;
|
||||
break;
|
||||
case wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_SENT_SCAN_RESULT:
|
||||
*hidlRecordName =
|
||||
android::hardware::wifi::offload::V1_0::RecordName::EVENT_SENT_SCAN_RESULT;
|
||||
break;
|
||||
case wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_SENT_ABORT:
|
||||
*hidlRecordName = android::hardware::wifi::offload::V1_0::RecordName::EVENT_SENT_ABORT;
|
||||
break;
|
||||
case wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_SENT_ERROR:
|
||||
*hidlRecordName = android::hardware::wifi::offload::V1_0::RecordName::EVENT_SENT_ERROR;
|
||||
break;
|
||||
case wifi_offload::RpcLogRecord::RpcLogRecordType::REQ_SCAN:
|
||||
*hidlRecordName = android::hardware::wifi::offload::V1_0::RecordName::REQ_SCAN;
|
||||
break;
|
||||
default:
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
uint8_t ToChreSecurityMode(uint8_t hidlSecurityMode) {
|
||||
uint8_t chreSecurityMode = 0;
|
||||
if (hidlSecurityMode & android::hardware::wifi::offload::V1_0::SecurityMode::OPEN) {
|
||||
chreSecurityMode |= wifi_offload::SecurityMode::OPEN;
|
||||
}
|
||||
if (hidlSecurityMode & android::hardware::wifi::offload::V1_0::SecurityMode::WEP) {
|
||||
chreSecurityMode |= wifi_offload::SecurityMode::WEP;
|
||||
}
|
||||
if (hidlSecurityMode & android::hardware::wifi::offload::V1_0::SecurityMode::PSK) {
|
||||
chreSecurityMode |= wifi_offload::SecurityMode::PSK;
|
||||
}
|
||||
if (hidlSecurityMode & android::hardware::wifi::offload::V1_0::SecurityMode::EAP) {
|
||||
chreSecurityMode |= wifi_offload::SecurityMode::EAP;
|
||||
}
|
||||
return chreSecurityMode;
|
||||
}
|
||||
|
||||
uint8_t ToHidlSecurityMode(uint8_t chreSecurityMode) {
|
||||
uint8_t hidlSecurityMode = 0;
|
||||
if (chreSecurityMode & wifi_offload::SecurityMode::OPEN) {
|
||||
hidlSecurityMode |= android::hardware::wifi::offload::V1_0::SecurityMode::OPEN;
|
||||
}
|
||||
if (chreSecurityMode & wifi_offload::SecurityMode::WEP) {
|
||||
hidlSecurityMode |= android::hardware::wifi::offload::V1_0::SecurityMode::WEP;
|
||||
}
|
||||
if (chreSecurityMode & wifi_offload::SecurityMode::PSK) {
|
||||
hidlSecurityMode |= android::hardware::wifi::offload::V1_0::SecurityMode::PSK;
|
||||
}
|
||||
if (chreSecurityMode & wifi_offload::SecurityMode::EAP) {
|
||||
hidlSecurityMode |= android::hardware::wifi::offload::V1_0::SecurityMode::EAP;
|
||||
}
|
||||
return hidlSecurityMode;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace wifi {
|
||||
namespace offload {
|
||||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
namespace offload_utils {
|
||||
|
||||
bool ToHidlScanResult(const wifi_offload::ScanResult& chreScanResult, ScanResult* hidlScanResult) {
|
||||
if (hidlScanResult == nullptr) {
|
||||
return false;
|
||||
}
|
||||
hidlScanResult->tsf = chreScanResult.tsf_;
|
||||
hidlScanResult->capability = chreScanResult.capability_;
|
||||
hidlScanResult->rssi = chreScanResult.rssi_dbm_;
|
||||
hidlScanResult->frequency = chreScanResult.frequency_scanned_mhz_;
|
||||
memcpy(&hidlScanResult->bssid[0], &chreScanResult.bssid_[0],
|
||||
wifi_offload::ScanResult::kBssidSize);
|
||||
chreWifiSsidListItem chreWifiSsid;
|
||||
chreScanResult.ssid_.ToChreWifiSsidListItem(&chreWifiSsid);
|
||||
std::vector<uint8_t> ssid;
|
||||
for (size_t i = 0; i < chreWifiSsid.ssidLen; i++) {
|
||||
ssid.push_back(chreWifiSsid.ssid[i]);
|
||||
}
|
||||
hidlScanResult->networkInfo.ssid = ssid;
|
||||
hidlScanResult->networkInfo.flags = ToHidlSecurityMode(chreScanResult.security_modes_);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ToHidlScanResults(const std::vector<wifi_offload::ScanResult>& chreScanResults,
|
||||
std::vector<ScanResult>* hidlScanResults) {
|
||||
LOG(VERBOSE) << "ScanResults from CHRE, size=" << chreScanResults.size();
|
||||
for (const auto& scan_result_from_nano_app : chreScanResults) {
|
||||
ScanResult hidl_scan_result;
|
||||
if (!ToHidlScanResult(scan_result_from_nano_app, &hidl_scan_result)) {
|
||||
return false;
|
||||
}
|
||||
hidlScanResults->push_back(hidl_scan_result);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ToHidlScanStats(const wifi_offload::ScanStats& chreScanStats, ScanStats* hidlScanStats) {
|
||||
hidlScanStats->subscriptionDurationMs = chreScanStats.last_subscription_duration_ms_;
|
||||
hidlScanStats->numScansRequestedByWifi = chreScanStats.num_scans_requested_by_nanoapp_;
|
||||
hidlScanStats->numScansServicedByWifi = chreScanStats.num_scans_serviced_by_hardware_;
|
||||
hidlScanStats->numScansServicedbyCache = chreScanStats.num_scans_serviced_by_cache_;
|
||||
std::vector<ScanRecord> hidlScanRecords;
|
||||
for (const auto& chreScanRecord : chreScanStats.scan_records_) {
|
||||
ScanRecord hidlScanRecord;
|
||||
hidlScanRecord.durationMs = chreScanRecord.time_spent_scanning_ms_;
|
||||
hidlScanRecord.numChannelsScanned = chreScanRecord.num_channels_scanned_;
|
||||
hidlScanRecord.numEntriesAggregated = chreScanRecord.num_entries_aggregated_;
|
||||
hidlScanRecords.push_back(hidlScanRecord);
|
||||
}
|
||||
hidlScanStats->scanRecord = hidlScanRecords;
|
||||
std::vector<LogRecord> logRecords;
|
||||
for (const auto& chreLogRecord : chreScanStats.rpc_log_records_) {
|
||||
LogRecord logRecord;
|
||||
if (!ToHidlRecordName(chreLogRecord.record_type_, &logRecord.recordName)) {
|
||||
return false;
|
||||
}
|
||||
logRecord.logTimeMs = chreLogRecord.timestamp_chre_ms_;
|
||||
logRecords.push_back(logRecord);
|
||||
}
|
||||
hidlScanStats->logRecord = logRecords;
|
||||
for (size_t i = 0; i < hidlScanStats->histogramChannelsScanned.elementCount(); i++) {
|
||||
hidlScanStats->histogramChannelsScanned[i] =
|
||||
chreScanStats.channel_histogram_.GetChannelScanCount(i);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ToChreScanConfig(const ScanParam& param, const ScanFilter& filter,
|
||||
wifi_offload::ScanConfig* scanConfig) {
|
||||
scanConfig->scan_params_.disconnected_mode_scan_interval_ms_ =
|
||||
param.disconnectedModeScanIntervalMs;
|
||||
for (const auto& ssid : param.ssidList) {
|
||||
wifi_offload::Ssid chreSsid;
|
||||
chreSsid.SetData(ssid.data(), ssid.size());
|
||||
scanConfig->scan_params_.ssids_to_scan_.push_back(chreSsid);
|
||||
}
|
||||
for (const auto& freq : param.frequencyList) {
|
||||
scanConfig->scan_params_.frequencies_to_scan_mhz_.push_back(freq);
|
||||
}
|
||||
scanConfig->scan_filter_.min_rssi_threshold_dbm_ = filter.rssiThreshold;
|
||||
for (const auto& nwInfo : filter.preferredNetworkInfoList) {
|
||||
wifi_offload::PreferredNetwork chreNwInfo;
|
||||
chreNwInfo.security_modes_ = ToChreSecurityMode(nwInfo.flags);
|
||||
chreNwInfo.ssid_.SetData(nwInfo.ssid.data(), nwInfo.ssid.size());
|
||||
scanConfig->scan_filter_.networks_to_match_.push_back(std::move(chreNwInfo));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ToHidlErrorMessage(uint32_t errorCode, std::string* errorMessage) {
|
||||
bool reportError = true;
|
||||
switch (errorCode) {
|
||||
case wifi_offload::ErrorCode::FAILED_TO_ALLOCATE_MESSAGE_BUFFER:
|
||||
*errorMessage = "Failed to allocate message buffer";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::FAILED_TO_SERIALIZE_MESSAGE:
|
||||
*errorMessage = "Failed to serialize message";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::FAILED_TO_SEND_MESSAGE:
|
||||
*errorMessage = "Failed to send message";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::FAILED_TO_DESERIALIZE_SCAN_CONFIG:
|
||||
*errorMessage = "Failed to deserialize scan config";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::INVALID_SUBSCRIBE_MESSAGE_SIZE:
|
||||
*errorMessage = "Invalid subscribe message size";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::SCAN_CONFIG_NOT_INITIALIZED:
|
||||
*errorMessage = "Scan config not initialized";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::UNSPECIFIED_HOST_ENDPOINT:
|
||||
*errorMessage = "Unspecified host end point";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::FAILED_TO_SEND_SCAN_RESULTS:
|
||||
*errorMessage = "Failed to send scan results";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::FAILED_TO_SEND_SCAN_STATS:
|
||||
*errorMessage = "Failed to send scan stats";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::ONDEMAND_SCAN_NOT_SUPPORTED:
|
||||
*errorMessage = "On demand scans not supported";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::FAILED_TO_SEND_ONDEMAND_SCAN_REQUEST:
|
||||
*errorMessage = "Failed to send on demand scan request";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::FAILED_TO_SEND_ONDEMAND_SCAN_REQUEST_ASYNC:
|
||||
*errorMessage = "Failed to send on demand scan request async";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::OUT_OF_ORDER_SCAN_RESULTS:
|
||||
*errorMessage = "Out of order scan results";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::INCOMPLETE_SCAN_RESULTS_BEFORE_SCAN_REQUEST:
|
||||
*errorMessage = "Incomplete scan results before scan request";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::FAILED_TO_SET_SCAN_TIMER:
|
||||
*errorMessage = "Failed to set scan timer";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::SCAN_MONITORING_NOT_SUPPORTED:
|
||||
*errorMessage = "Scan Monitoring not supported";
|
||||
break;
|
||||
case wifi_offload::ErrorCode::FAILED_TO_START_SCAN_MONITORING:
|
||||
*errorMessage = "Failed to start scan monitoring";
|
||||
reportError = false;
|
||||
break;
|
||||
case wifi_offload::ErrorCode::FAILED_TO_STOP_SCAN_MONITORING:
|
||||
*errorMessage = "Failed to stop scan monitoring";
|
||||
reportError = false;
|
||||
break;
|
||||
case wifi_offload::ErrorCode::FAILED_TO_CONFIGURE_SCAN_MONITORING_ASYNC:
|
||||
*errorMessage = "Failed to configure scan monitoring async";
|
||||
reportError = false;
|
||||
break;
|
||||
default:
|
||||
*errorMessage = "Invalid error code";
|
||||
reportError = false;
|
||||
break;
|
||||
}
|
||||
return reportError;
|
||||
}
|
||||
|
||||
} // namespace offload_utils
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace offload
|
||||
} // namespace wifi
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
30
wifi_offload/offload_utils.h
Normal file
30
wifi_offload/offload_utils.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef WIFI_OFFLOAD_SERVER_UTILS_H_
|
||||
#define WIFI_OFFLOAD_SERVER_UTILS_H_
|
||||
|
||||
#include <android/hardware/wifi/offload/1.0/IOffload.h>
|
||||
#include <chre/apps/wifi_offload/flatbuffers_serialization.h>
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace wifi {
|
||||
namespace offload {
|
||||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
namespace offload_utils {
|
||||
|
||||
bool ToHidlScanResults(const std::vector<wifi_offload::ScanResult>& chreScanResults,
|
||||
std::vector<ScanResult>* hidlScanResults);
|
||||
bool ToHidlScanStats(const wifi_offload::ScanStats& chreScanStats, ScanStats* hildScanStats);
|
||||
bool ToChreScanConfig(const ScanParam& param, const ScanFilter& filter,
|
||||
wifi_offload::ScanConfig* scanConfig);
|
||||
bool ToHidlErrorMessage(uint32_t errorCode, std::string* errorMessage);
|
||||
|
||||
} // namespace offload_utils
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace offload
|
||||
} // namespace wifi
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
|
||||
#endif // WIFI_OFFLOAD_SERVER_UTILS_H_
|
||||
91
wifi_offload/test/offload_hal_test_constants.cpp
Normal file
91
wifi_offload/test/offload_hal_test_constants.cpp
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Copyright (C) 2017 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include "offload_hal_test_constants.h"
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace wifi {
|
||||
namespace offload {
|
||||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
namespace offload_hal_test_constants {
|
||||
|
||||
const uint8_t kSsid1[] = {'G', 'o', 'o', 'g', 'l', 'e'};
|
||||
const size_t kSsid1_size = sizeof(kSsid1);
|
||||
const uint8_t kSsid2[] = {'X', 'f', 'i', 'n', 'i', 't', 'y'};
|
||||
const size_t kSsid2_size = sizeof(kSsid2);
|
||||
const uint8_t kBssid[6] = {0x12, 0xef, 0xa1, 0x2c, 0x97, 0x8b};
|
||||
const int16_t kRssi = -60;
|
||||
const int16_t kRssiThreshold = -76;
|
||||
const uint32_t kFrequency1 = 2412;
|
||||
const uint32_t kFrequency2 = 2437;
|
||||
const uint8_t kBssidSize = 6;
|
||||
const uint64_t kTsf = 0;
|
||||
const uint16_t kCapability = 0;
|
||||
const uint8_t kNetworkFlags = 0;
|
||||
const uint32_t kDisconnectedModeScanIntervalMs = 5000;
|
||||
const uint64_t kSubscriptionDurationMs = 10000;
|
||||
const uint64_t kScanDurationMs[2] = {2000, 500};
|
||||
const uint32_t kNumChannelsScanned[] = {1, 2};
|
||||
const uint8_t kChannelNotScanned = 0;
|
||||
const uint32_t kDefaultNumScansRequestedByWifi = 2;
|
||||
const uint32_t kDefaultNumScansServicedByWifi = 2;
|
||||
const uint64_t kScanDurationTotalMs = 2000;
|
||||
const uint32_t kNumChannelsTotalScanned = 3;
|
||||
const uint32_t kNumChannelsInHistogram = 256;
|
||||
const uint8_t kTestChannels[] = {1, 6, 11};
|
||||
const uint32_t kNumTimesChannelScanned[] = {1, 1, 255};
|
||||
const uint32_t kSystemStartTime = 32164;
|
||||
const uint32_t kIncrementBetweenEvents = 10;
|
||||
const size_t kRecordLength = 8;
|
||||
const size_t kInvalidRecordLength = 4;
|
||||
|
||||
const wifi_offload::RpcLogRecord::RpcLogRecordType kChreRecordTypeList[] = {
|
||||
wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_INIT,
|
||||
wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_CONFIG_SCANS,
|
||||
wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_SUBSCRIBE_SCAN_RESULTS,
|
||||
wifi_offload::RpcLogRecord::RpcLogRecordType::REQ_SCAN,
|
||||
wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_RECVD_SCAN_RESULT,
|
||||
wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_SENT_SCAN_RESULT,
|
||||
wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_UNSUBSCRIBE_SCAN_RESULTS,
|
||||
wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_GET_SCAN_STATS,
|
||||
};
|
||||
|
||||
const wifi_offload::RpcLogRecord::RpcLogRecordType kInvalidChreRecordTypeLog[] = {
|
||||
wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_LAST_ITEM,
|
||||
wifi_offload::RpcLogRecord::RpcLogRecordType::REQ_LAST_ITEM,
|
||||
wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_RECVD_LAST_ITEM,
|
||||
wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_SENT_LAST_ITEM,
|
||||
};
|
||||
|
||||
const android::hardware::wifi::offload::V1_0::RecordName kHidlRecordNameList[] = {
|
||||
android::hardware::wifi::offload::V1_0::RecordName::CMD_INT,
|
||||
android::hardware::wifi::offload::V1_0::RecordName::CMD_CONFIG_SCANS,
|
||||
android::hardware::wifi::offload::V1_0::RecordName::CMD_SUBSCRIBE_SCAN_RESULTS,
|
||||
android::hardware::wifi::offload::V1_0::RecordName::REQ_SCAN,
|
||||
android::hardware::wifi::offload::V1_0::RecordName::EVENT_RECVD_SCAN_RESULT,
|
||||
android::hardware::wifi::offload::V1_0::RecordName::EVENT_SENT_SCAN_RESULT,
|
||||
android::hardware::wifi::offload::V1_0::RecordName::CMD_UNSUBSCRIBE_SCAN_RESULTS,
|
||||
android::hardware::wifi::offload::V1_0::RecordName::CMD_GET_SCAN_STATS,
|
||||
};
|
||||
|
||||
} // namespace offload_hal_test_constants
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace offload
|
||||
} // namespace wifi
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
74
wifi_offload/test/offload_hal_test_constants.h
Normal file
74
wifi_offload/test/offload_hal_test_constants.h
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright (C) 2017 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef OFFLOAD_HAL_TEST_CONSTANTS_
|
||||
#define OFFLOAD_HAL_TEST_CONSTANTS_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "offload_utils.h"
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace wifi {
|
||||
namespace offload {
|
||||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
namespace offload_hal_test_constants {
|
||||
|
||||
extern const uint8_t kSsid1[];
|
||||
extern const size_t kSsid1_size;
|
||||
extern const uint8_t kSsid2[];
|
||||
extern const size_t kSsid2_size;
|
||||
extern const uint8_t kBssid[6];
|
||||
extern const int16_t kRssi;
|
||||
extern const int16_t kRssiThreshold;
|
||||
extern const uint32_t kFrequency1;
|
||||
extern const uint32_t kFrequency2;
|
||||
extern const uint8_t kBssidSize;
|
||||
extern const uint64_t kTsf;
|
||||
extern const uint16_t kCapability;
|
||||
extern const uint8_t kNetworkFlags;
|
||||
extern const uint32_t kDisconnectedModeScanIntervalMs;
|
||||
extern const uint64_t kSubscriptionDurationMs;
|
||||
extern const uint64_t kScanDurationMs[2];
|
||||
extern const uint32_t kNumChannelsScanned[];
|
||||
extern const uint8_t kChannelNotScanned;
|
||||
extern const uint32_t kDefaultNumScansRequestedByWifi;
|
||||
extern const uint32_t kDefaultNumScansServicedByWifi;
|
||||
extern const uint64_t kScanDurationTotalMs;
|
||||
extern const uint32_t kNumChannelsTotalScanned;
|
||||
extern const uint32_t kNumChannelsInHistogram;
|
||||
extern const uint64_t kDeathCode;
|
||||
extern const uint8_t kTestChannels[];
|
||||
extern const uint32_t kNumTimesChannelScanned[];
|
||||
extern const uint32_t kSystemStartTime;
|
||||
extern const uint32_t kIncrementBetweenEvents;
|
||||
extern const size_t kRecordLength;
|
||||
extern const size_t kInvalidRecordLength;
|
||||
extern const wifi_offload::RpcLogRecord::RpcLogRecordType kChreRecordTypeList[];
|
||||
extern const wifi_offload::RpcLogRecord::RpcLogRecordType kInvalidChreRecordTypeLog[];
|
||||
extern const android::hardware::wifi::offload::V1_0::RecordName kHidlRecordNameList[];
|
||||
|
||||
} // namespace offload_hal_test_constants
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace offload
|
||||
} // namespace wifi
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
|
||||
#endif // OFFLOAD_HAL_TEST_CONSTANTS_
|
||||
200
wifi_offload/test/offload_hal_test_utils.cpp
Normal file
200
wifi_offload/test/offload_hal_test_utils.cpp
Normal file
@@ -0,0 +1,200 @@
|
||||
/*
|
||||
* Copyright (C) 2017 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include "offload_hal_test_utils.h"
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace wifi {
|
||||
namespace offload {
|
||||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
namespace offload_hal_test_utils {
|
||||
|
||||
using namespace offload_hal_test_constants;
|
||||
|
||||
void createChreScanResultsForTest(std::vector<wifi_offload::ScanResult>* chreScanResults) {
|
||||
wifi_offload::ScanResult chreScanResult;
|
||||
chreScanResult.security_modes_ = kNetworkFlags;
|
||||
chreScanResult.capability_ = kCapability;
|
||||
chreScanResult.frequency_scanned_mhz_ = kFrequency1;
|
||||
chreScanResult.rssi_dbm_ = kRssi;
|
||||
chreScanResult.tsf_ = kTsf;
|
||||
chreScanResult.ssid_.SetData(&kSsid1[0], kSsid1_size);
|
||||
memcpy(&chreScanResult.bssid_[0], &kBssid[0], kBssidSize);
|
||||
chreScanResults->push_back(chreScanResult);
|
||||
}
|
||||
|
||||
void createChreScanStatsForTest(wifi_offload::ScanStats* chreScanStats) {
|
||||
chreScanStats->num_scans_requested_by_nanoapp_ = kDefaultNumScansRequestedByWifi;
|
||||
chreScanStats->num_scans_serviced_by_hardware_ = kDefaultNumScansServicedByWifi;
|
||||
chreScanStats->num_scans_serviced_by_cache_ =
|
||||
(kDefaultNumScansRequestedByWifi - kDefaultNumScansServicedByWifi);
|
||||
for (size_t j = 0; j < kNumChannelsScanned[0] + kNumChannelsScanned[1]; j++) {
|
||||
chreScanStats->channel_histogram_.IncrementScanCountForChannelForTest(
|
||||
kTestChannels[j], static_cast<uint32_t>(kNumTimesChannelScanned[j]));
|
||||
}
|
||||
chreScanStats->last_subscription_duration_ms_ = kSubscriptionDurationMs;
|
||||
wifi_offload::ScanRecord scanRecord1;
|
||||
scanRecord1.time_spent_scanning_ms_ = kScanDurationMs[0];
|
||||
scanRecord1.num_channels_scanned_ = kNumChannelsScanned[0];
|
||||
scanRecord1.num_entries_aggregated_ = 1;
|
||||
chreScanStats->scan_records_.push_back(scanRecord1);
|
||||
wifi_offload::ScanRecord scanRecord2;
|
||||
scanRecord2.time_spent_scanning_ms_ = kScanDurationMs[1];
|
||||
scanRecord2.num_channels_scanned_ = kNumChannelsScanned[1];
|
||||
scanRecord2.num_entries_aggregated_ = 1;
|
||||
chreScanStats->scan_records_.push_back(scanRecord2);
|
||||
|
||||
for (size_t i = 0; i < kRecordLength; i++) {
|
||||
wifi_offload::RpcLogRecord logRecord;
|
||||
logRecord.record_type_ = kChreRecordTypeList[i];
|
||||
logRecord.timestamp_chre_ms_ = kSystemStartTime + i * kIncrementBetweenEvents;
|
||||
chreScanStats->rpc_log_records_.push_back(logRecord);
|
||||
}
|
||||
}
|
||||
|
||||
void createHidlScanFilterForTest(ScanFilter* scanFilter) {
|
||||
std::vector<NetworkInfo> nw_info_list;
|
||||
NetworkInfo nwInfo1;
|
||||
std::vector<uint8_t> ssid1(kSsid1, kSsid1 + kSsid1_size);
|
||||
nwInfo1.ssid = ssid1;
|
||||
nwInfo1.flags = kNetworkFlags;
|
||||
NetworkInfo nwInfo2;
|
||||
std::vector<uint8_t> ssid2(kSsid2, kSsid2 + kSsid2_size);
|
||||
nwInfo2.ssid = ssid2;
|
||||
nwInfo2.flags = kNetworkFlags;
|
||||
nw_info_list.push_back(nwInfo1);
|
||||
nw_info_list.push_back(nwInfo2);
|
||||
scanFilter->preferredNetworkInfoList = nw_info_list;
|
||||
scanFilter->rssiThreshold = kRssiThreshold;
|
||||
}
|
||||
|
||||
void createHidlScanParamForTest(ScanParam* scanParam) {
|
||||
scanParam->disconnectedModeScanIntervalMs = kDisconnectedModeScanIntervalMs;
|
||||
std::vector<uint32_t> frequencyList{kFrequency1, kFrequency2};
|
||||
scanParam->frequencyList = frequencyList;
|
||||
std::vector<hidl_vec<uint8_t>> ssidList;
|
||||
std::vector<uint8_t> ssid1(kSsid1, kSsid1 + kSsid1_size);
|
||||
std::vector<uint8_t> ssid2(kSsid2, kSsid2 + kSsid2_size);
|
||||
ssidList.push_back(ssid1);
|
||||
ssidList.push_back(ssid2);
|
||||
scanParam->ssidList = ssidList;
|
||||
}
|
||||
|
||||
void createChreScanConfigForTest(wifi_offload::ScanConfig* scanConfig) {
|
||||
scanConfig->scan_params_.disconnected_mode_scan_interval_ms_ = kDisconnectedModeScanIntervalMs;
|
||||
wifi_offload::Ssid chreSsid1;
|
||||
chreSsid1.SetData(&kSsid1[0], kSsid1_size);
|
||||
wifi_offload::Ssid chreSsid2;
|
||||
chreSsid2.SetData(&kSsid2[0], kSsid2_size);
|
||||
scanConfig->scan_params_.ssids_to_scan_.push_back(chreSsid1);
|
||||
scanConfig->scan_params_.ssids_to_scan_.push_back(chreSsid2);
|
||||
scanConfig->scan_params_.frequencies_to_scan_mhz_.push_back(kFrequency1);
|
||||
scanConfig->scan_params_.frequencies_to_scan_mhz_.push_back(kFrequency2);
|
||||
scanConfig->scan_filter_.min_rssi_threshold_dbm_ = kRssiThreshold;
|
||||
wifi_offload::PreferredNetwork chreNwInfo1;
|
||||
chreNwInfo1.security_modes_ = kNetworkFlags;
|
||||
chreNwInfo1.ssid_.SetData(&kSsid1[0], kSsid1_size);
|
||||
scanConfig->scan_filter_.networks_to_match_.push_back(std::move(chreNwInfo1));
|
||||
wifi_offload::PreferredNetwork chreNwInfo2;
|
||||
chreNwInfo2.security_modes_ = kNetworkFlags;
|
||||
chreNwInfo2.ssid_.SetData(&kSsid2[0], kSsid2_size);
|
||||
scanConfig->scan_filter_.networks_to_match_.push_back(std::move(chreNwInfo2));
|
||||
}
|
||||
|
||||
bool validateScanResult(const std::vector<ScanResult>& hidlScanResultsTest,
|
||||
const std::vector<wifi_offload::ScanResult> chreScanResults) {
|
||||
if (hidlScanResultsTest.size() != chreScanResults.size())
|
||||
return false;
|
||||
uint32_t i = 0;
|
||||
for (const auto& hidlScanResult : hidlScanResultsTest) {
|
||||
if (hidlScanResult.tsf != chreScanResults[i].tsf_)
|
||||
return false;
|
||||
if (hidlScanResult.rssi != chreScanResults[i].rssi_dbm_)
|
||||
return false;
|
||||
if (hidlScanResult.capability != chreScanResults[i].capability_)
|
||||
return false;
|
||||
if (hidlScanResult.frequency != chreScanResults[i].frequency_scanned_mhz_)
|
||||
return false;
|
||||
for (int j = 0; j < kBssidSize; j++) {
|
||||
if (hidlScanResult.bssid[j] != chreScanResults[i].bssid_[j])
|
||||
return false;
|
||||
}
|
||||
chreWifiSsidListItem chreWifiSsid;
|
||||
chreScanResults[i].ssid_.ToChreWifiSsidListItem(&chreWifiSsid);
|
||||
for (size_t k = 0; k < chreWifiSsid.ssidLen; k++) {
|
||||
if (hidlScanResult.networkInfo.ssid[k] != chreWifiSsid.ssid[k])
|
||||
return false;
|
||||
}
|
||||
if (hidlScanResult.networkInfo.flags != kNetworkFlags) {
|
||||
return false;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool validateScanStats(const ScanStats& hidlScanStats,
|
||||
const wifi_offload::ScanStats& chreScanStats) {
|
||||
if (hidlScanStats.subscriptionDurationMs != chreScanStats.last_subscription_duration_ms_)
|
||||
return false;
|
||||
if (hidlScanStats.numScansRequestedByWifi != chreScanStats.num_scans_requested_by_nanoapp_)
|
||||
return false;
|
||||
if (hidlScanStats.numScansServicedByWifi != chreScanStats.num_scans_serviced_by_hardware_)
|
||||
return false;
|
||||
if (hidlScanStats.numScansServicedbyCache != chreScanStats.num_scans_serviced_by_cache_)
|
||||
return false;
|
||||
for (uint32_t i = 0; i < kNumChannelsInHistogram; i++) {
|
||||
if (hidlScanStats.histogramChannelsScanned[i] !=
|
||||
chreScanStats.channel_histogram_.GetChannelScanCount(i)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hidlScanStats.scanRecord.size() != chreScanStats.scan_records_.size())
|
||||
return false;
|
||||
uint32_t i = 0;
|
||||
for (const auto& scanRecord : hidlScanStats.scanRecord) {
|
||||
if (scanRecord.durationMs != chreScanStats.scan_records_[i].time_spent_scanning_ms_)
|
||||
return false;
|
||||
if (scanRecord.numChannelsScanned != chreScanStats.scan_records_[i].num_channels_scanned_)
|
||||
return false;
|
||||
if (scanRecord.numEntriesAggregated !=
|
||||
chreScanStats.scan_records_[i].num_entries_aggregated_)
|
||||
return false;
|
||||
i++;
|
||||
}
|
||||
if (hidlScanStats.logRecord.size() != chreScanStats.rpc_log_records_.size())
|
||||
return false;
|
||||
i = 0;
|
||||
|
||||
for (const auto& logRecord : hidlScanStats.logRecord) {
|
||||
if (logRecord.recordName != kHidlRecordNameList[i]) {
|
||||
return false;
|
||||
}
|
||||
if (logRecord.logTimeMs != chreScanStats.rpc_log_records_[i].timestamp_chre_ms_)
|
||||
return false;
|
||||
i++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace offload_hal_test_utils
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace offload
|
||||
} // namespace wifi
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
47
wifi_offload/test/offload_hal_test_utils.h
Normal file
47
wifi_offload/test/offload_hal_test_utils.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (C) 2017 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef OFFLOAD_HAL_TEST_UTILS_
|
||||
#define OFFLOAD_HAL_TEST_UTILS_
|
||||
|
||||
#include "offload_hal_test_constants.h"
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace wifi {
|
||||
namespace offload {
|
||||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
namespace offload_hal_test_utils {
|
||||
|
||||
void createChreScanResultsForTest(std::vector<wifi_offload::ScanResult>* chreScanResults);
|
||||
void createChreScanStatsForTest(wifi_offload::ScanStats* chreScanStats);
|
||||
void createHidlScanFilterForTest(ScanFilter* scanFilter);
|
||||
void createHidlScanParamForTest(ScanParam* scanParam);
|
||||
void createChreScanConfigForTest(wifi_offload::ScanConfig* scanConfig);
|
||||
bool validateScanResult(const std::vector<ScanResult>& hidlScanResultsTest,
|
||||
const std::vector<wifi_offload::ScanResult> chreScanResults);
|
||||
bool validateScanStats(const ScanStats& hidlScanStats,
|
||||
const wifi_offload::ScanStats& chreScanStats);
|
||||
} // namespace offload_hal_test_utils
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace offload
|
||||
} // namespace wifi
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
|
||||
#endif // OFFLOAD_HAL_TEST_UTILS_
|
||||
73
wifi_offload/test/offload_utils_test.cpp
Normal file
73
wifi_offload/test/offload_utils_test.cpp
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (C) 2016, The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include "offload_hal_test_utils.h"
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace wifi {
|
||||
namespace offload {
|
||||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
|
||||
using namespace offload_hal_test_constants;
|
||||
|
||||
class OffloadUtilsTest : public ::testing::Test {
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(OffloadUtilsTest, ConvertScanResultToHidlTest) {
|
||||
std::vector<ScanResult> hidlScanResultsTest;
|
||||
std::vector<wifi_offload::ScanResult> chreScanResultsTest;
|
||||
offload_hal_test_utils::createChreScanResultsForTest(&chreScanResultsTest);
|
||||
EXPECT_TRUE(offload_utils::ToHidlScanResults(chreScanResultsTest, &hidlScanResultsTest));
|
||||
EXPECT_TRUE(
|
||||
offload_hal_test_utils::validateScanResult(hidlScanResultsTest, chreScanResultsTest));
|
||||
}
|
||||
|
||||
TEST_F(OffloadUtilsTest, ConvertScanStatsToHidlTest) {
|
||||
ScanStats hidlScanStatsTest;
|
||||
wifi_offload::ScanStats chreScanStatsTest;
|
||||
offload_hal_test_utils::createChreScanStatsForTest(&chreScanStatsTest);
|
||||
EXPECT_TRUE(offload_utils::ToHidlScanStats(chreScanStatsTest, &hidlScanStatsTest));
|
||||
EXPECT_TRUE(offload_hal_test_utils::validateScanStats(hidlScanStatsTest, chreScanStatsTest));
|
||||
}
|
||||
|
||||
TEST_F(OffloadUtilsTest, ConvertScanConfigToChreTest) {
|
||||
wifi_offload::ScanConfig scanConfigTest;
|
||||
wifi_offload::ScanConfig scanConfig;
|
||||
ScanParam scanParamTest;
|
||||
ScanFilter scanFilterTest;
|
||||
offload_hal_test_utils::createHidlScanParamForTest(&scanParamTest);
|
||||
offload_hal_test_utils::createHidlScanFilterForTest(&scanFilterTest);
|
||||
offload_hal_test_utils::createChreScanConfigForTest(&scanConfig);
|
||||
EXPECT_TRUE(offload_utils::ToChreScanConfig(scanParamTest, scanFilterTest, &scanConfigTest));
|
||||
EXPECT_TRUE(scanConfig == scanConfigTest);
|
||||
}
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace offload
|
||||
} // namespace wifi
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
@@ -35,5 +35,5 @@ adb wait-for-device
|
||||
adb remount
|
||||
adb sync
|
||||
|
||||
adb shell /data/nativetest/wifi-offload-service-unit-tests/wifi-offload-service-unit-tests
|
||||
adb shell /data/nativetest64/wifi-offload-service-unit-tests/wifi-offload-service-unit-tests
|
||||
adb shell /data/nativetest/vendor/wifi-offload-service-unit-tests/wifi-offload-service-unit-tests
|
||||
adb shell /data/nativetest64/vendor/wifi-offload-service-unit-tests/wifi-offload-service-unit-tests
|
||||
|
||||
Reference in New Issue
Block a user