From d5bde0109314a1fe17c47788a26cbaf524165785 Mon Sep 17 00:00:00 2001 From: Simo Piiroinen Date: Tue, 26 Jun 2018 15:10:26 +0300 Subject: [PATCH] [config] Leave some sensors enabled by default. JB#41369 Hiding sensors that might be functioning / in use in already supported devices by default easily causes regression unless device specific configuration files are also updated. As false positives should cause only cosmetic issues, do not hide magnetometer, pressure, and rotation sensors by default. Signed-off-by: Simo Piiroinen --- config/20-sensors-default.conf | 28 ++++++++++++++++++++-------- config/60-sensors-DEVICE.conf | 10 +++++++--- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/config/20-sensors-default.conf b/config/20-sensors-default.conf index 201f816c..8a51b5b9 100644 --- a/config/20-sensors-default.conf +++ b/config/20-sensors-default.conf @@ -23,14 +23,26 @@ proximitysensor=Feature_ProximitySensor ; lidsensor=Feature_CoverSensor lidsensor=False -; To avoid revisiting config files for all old ports, the defaults -; added sensors should be set "False" by default here, and to "True" -; in device specific override config as appropriate. +; Some sensors that are in theory supported by sensorfwd do not have +; a suitable hybris adaptors, and thus it makes no sense to list them +; as being available regardless of the hw / android hal status. +tapsensor=False +temperaturesensor=False +; Sensors that have not been available in any officially supported +; devices -> hide by default. humiditysensor=False -magnetometersensor=False -pressuresensor=False -rotationsensor=False stepcountersensor=False -tapsensor=False -temperaturesensor=False + +; To minimize chances of regression, sensors that have been available at +; least in one officially supported device -> do not hide by default. +; (sensor loading should fail, so false positive should cause only +; cosmetic issues on 1st use after bootup) + +magnetometersensor=True +pressuresensor=True +rotationsensor=True + +; To avoid revisiting config files for all old ports in the future, the +; defaults for added sensors should be set "False" by default here, and +; to "True" in device specific override config as appropriate. diff --git a/config/60-sensors-DEVICE.conf b/config/60-sensors-DEVICE.conf index fd8adb9f..0375245b 100644 --- a/config/60-sensors-DEVICE.conf +++ b/config/60-sensors-DEVICE.conf @@ -1,12 +1,16 @@ [available] +; Sensors that are enabled by default. +; -> Disable as appropriate + +;magnetometersensor=False +;pressuresensor=False +;rotationsensor=False + ; Sensors that are disabled by default. ; -> Enable as appropriate ;humiditysensor=True -;magnetometersensor=True -;pressuresensor=True -;rotationsensor=True ;stepcountersensor=True ;tapsensor=True ;temperaturesensor=True