[my-place] PlaceRecognitionProvider::isSupported() implementation. 24/82624/1
authorMarcin Masternak <m.masternak@samsung.com>
Thu, 4 Aug 2016 10:09:18 +0000 (12:09 +0200)
committerMarcin Masternak <m.masternak@samsung.com>
Thu, 4 Aug 2016 13:33:48 +0000 (15:33 +0200)
Change-Id: I53e7246cc8b9b54c1ca070e29ec7fbd47a916e1d
Signed-off-by: Marcin Masternak <m.masternak@samsung.com>
src/my-place/PlaceRecognitionProvider.cpp

index 0d434cc..85027dc 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 #include "PlaceRecognitionProvider.h"
+#include <Util.h>
 
 void ctx::PlaceRecognitionProvider::getPrivilege(std::vector<const char*> &privilege)
 {
@@ -62,6 +63,8 @@ int ctx::PlaceRecognitionProvider::write(ctx::Json data, ctx::Json* requestResul
 
 bool ctx::PlaceRecognitionProvider::isSupported()
 {
-       /* TODO: This function should be implemented properly */
-       return true;
+       bool locationSupport = util::getSystemInfoBool("tizen.org/feature/location");
+       bool wifiSupport = util::getSystemInfoBool("tizen.org/feature/network.wifi");
+       _D("locationSupport = %d, wifiSupport = %d", locationSupport, wifiSupport);
+       return locationSupport && wifiSupport;
 }