Commit 2d0ed575 authored by spiiroin's avatar spiiroin

[hybrisadaptor] Deal with sensor type aliasing changes. JB#43020

It seems that in later android header versions sensor type values
have been changed from #define constants into enumeration values.
And while previously SENSOR_TYPE_MAGNETIC_FIELD was alias for
SENSOR_TYPE_GEOMAGNETIC_FIELD, now it is the other way around. Which
then has the net effect of: Attempt to provide fallback value for
SENSOR_TYPE_MAGNETIC_FIELD with symbolic name results in compilation
failures.

Use hard-coded fallback values for both SENSOR_TYPE_GEOMAGNETIC_FIELD
and SENSOR_TYPE_MAGNETIC_FIELD to break dependency on what types android
header considers to be aliases vs not.
Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
parent 49247f34
......@@ -47,10 +47,10 @@
#define SENSOR_TYPE_ACCELEROMETER (1)
#endif
#ifndef SENSOR_TYPE_GEOMAGNETIC_FIELD
#define SENSOR_TYPE_GEOMAGNETIC_FIELD (2)
#define SENSOR_TYPE_GEOMAGNETIC_FIELD (2) // alias for SENSOR_TYPE_MAGNETIC_FIELD
#endif
#ifndef SENSOR_TYPE_MAGNETIC_FIELD
#define SENSOR_TYPE_MAGNETIC_FIELD SENSOR_TYPE_GEOMAGNETIC_FIELD
#define SENSOR_TYPE_MAGNETIC_FIELD (2) // alias for SENSOR_TYPE_GEOMAGNETIC_FIELD
#endif
#ifndef SENSOR_TYPE_ORIENTATION
#define SENSOR_TYPE_ORIENTATION (3)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment