sensor-hal-sensorhub: fix the bug caused by static member variable 34/59234/5
authorkibak.yoon <kibak.yoon@samsung.com>
Thu, 11 Feb 2016 14:19:25 +0000 (23:19 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Fri, 12 Feb 2016 02:13:16 +0000 (11:13 +0900)
commit86df2261ae83cfcc2cad4d64bb133dc529c9e0ec
treee87663b9d211665e9d1adc9bbc6348c60461ad20
parent7a056fbe59803ce3f45bfcad1868165f4754d1d3
sensor-hal-sensorhub: fix the bug caused by static member variable

- static member variable has to be declared for using it.
  strangely std::vector variable is always okay regardless of a compile
  order if it is declared once anywhere. but std::map is not okay.
  dlopen() invokes the segmentation error when std::map variable is used.
  but if compile file order is changed, it doesn't have problem....
- because the problem about initializing static member variable, it is
  issued. so this patch just changes manager/controller to singleton class
  for removing the code that use static variables.
- now it is fixed.

Change-Id: I84777861e5afc374a2ceecbd4d420a90c8f2c1ef
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/sensorhub/sensorhub.cpp
src/sensorhub/sensorhub_controller.cpp
src/sensorhub/sensorhub_controller.h
src/sensorhub/sensorhub_manager.cpp
src/sensorhub/sensorhub_manager.h
src/sensorhub/wristup.cpp