From: Chih-Wei Huang Date: Mon, 4 Jun 2018 15:22:27 +0000 (+0800) Subject: init.sh: allow HAS_SENSORS to override all cases X-Git-Tag: android-x86-7.1-r3~35 X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fdevice-generic-common.git;a=commitdiff_plain;h=d20445a06c691bf6bb76a461c82648019e191067 init.sh: allow HAS_SENSORS to override all cases HAS_SENSORS in cmdline was introduced in commit f356d114 to override the default has_sensors variable. However, it only take effects if the sensors type is not kbd. This is not my original idea. The change allows HAS_SENSORS to override the default value no matter what the sensors type is. --- diff --git a/init.sh b/init.sh index ccd1058..2228775 100644 --- a/init.sh +++ b/init.sh @@ -284,11 +284,11 @@ function init_hal_sensors() hal_sensors=hdaps has_sensors=true elif [ "$hal_sensors" != "kbd" ]; then - has_sensors=${HAS_SENSORS:-true} + has_sensors=true fi set_property ro.hardware.sensors $hal_sensors - set_property config.override_forced_orient $has_sensors + set_property config.override_forced_orient ${HAS_SENSORS:-$has_sensors} } function create_pointercal()