Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Jun 26, 2018
1 parent baba7a8 commit d5bde01
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
28 changes: 20 additions & 8 deletions config/20-sensors-default.conf
Expand Up @@ -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.
10 changes: 7 additions & 3 deletions 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
Expand Down

0 comments on commit d5bde01

Please sign in to comment.