summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Chen <chenkris@google.com>2020-06-15 22:27:38 +0800
committerKris Chen <chenkris@google.com>2020-06-22 10:00:47 +0800
commit085ba2c766b658a1d40674366253e91fc3d770ca (patch)
treed2cb8bcd64cb373fe9eed4a9e31f6c4b2bdf8743
parent4e3db3acfa3face5bb28757dfb8ba11095b38f93 (diff)
downloadredbull-085ba2c766b658a1d40674366253e91fc3d770ca.tar.gz
Enable prox-palm for B5 devices before PVT stages
Bug: 154675013 Test: The property was set correctly after device booted up. Change-Id: I399888dd2de892349af24b490871d9d0a7d79ec0
-rw-r--r--init.sensors.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/init.sensors.sh b/init.sensors.sh
index b90d0d0d..34917a24 100644
--- a/init.sensors.sh
+++ b/init.sensors.sh
@@ -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