Enable prox-palm for B5 devices before PVT stages

Bug: 154675013
Test: The property was set correctly after device booted up.
Change-Id: I399888dd2de892349af24b490871d9d0a7d79ec0
This commit is contained in:
Kris Chen
2020-06-15 22:27:38 +08:00
parent 4e3db3acfa
commit 085ba2c766

View File

@@ -4,3 +4,14 @@ version=`grep -ao "OEM_IMAGE_VERSION_STRING[ -~]*" \
/vendor/firmware/adsp.b04 | \
sed -e s/OEM_IMAGE_VERSION_STRING=ADSP.version.// -e s/\(.*\).//`
setprop vendor.sys.adsp.firmware.version "$version"
if [ -f /sys/devices/soc0/g_platform_version ]; then
B5_LUNCHBOX_PLATFORM_VERSION="655360"
B5_PVT_PLATFORM_VERSION="655390"
platform_version=`cat /sys/devices/soc0/g_platform_version`
if [ $platform_version -gt $B5_LUNCHBOX_PLATFORM_VERSION ]; then
if [ $platform_version -lt $B5_PVT_PLATFORM_VERSION ]; then
setprop vendor.sensor.proximity_fusion.enabled true
fi
fi
fi