Add not supported using feature 19/58619/1 accepted/tizen/mobile/20160202.115428 accepted/tizen/tv/20160202.115449 accepted/tizen/wearable/20160202.115504 submit/tizen/20160202.082654
authorJihoon Jung <jh8801.jung@samsung.com>
Tue, 2 Feb 2016 08:21:56 +0000 (17:21 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Tue, 2 Feb 2016 08:22:49 +0000 (17:22 +0900)
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
Change-Id: Iaefa4c65b4a6c4f7f216a557883decff9aa0358a

CMakeLists.txt
packaging/capi-network-mtp.spec
src/mtp.c

index eba39c8..a8c6a0b 100755 (executable)
@@ -11,7 +11,7 @@ SET(service "network")
 SET(submodule "mtp")
 
 # for package file
-SET(dependents "dlog glib-2.0 gio-2.0 capi-base-common gio-unix-2.0 sqlite3")
+SET(dependents "dlog glib-2.0 gio-2.0 capi-base-common gio-unix-2.0 sqlite3 capi-system-info")
 SET(pc_dependents "capi-base-common")
 
 SET(fw_name "${project_prefix}-${service}-${submodule}")
index 3bbf9d2..aea3b03 100755 (executable)
@@ -11,6 +11,7 @@ BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(gobject-2.0)
 BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(sqlite3)
 BuildRequires:  python
 Buildrequires:  python-xml
index 3ff4f7d..be028be 100755 (executable)
--- a/src/mtp.c
+++ b/src/mtp.c
@@ -21,6 +21,7 @@
 #include <stdlib.h>
 
 #include <dlog.h>
+#include <system_info.h>
 
 #include "mtp.h"
 #include "mtp_internal.h"
@@ -33,6 +34,8 @@
 #include "mtp_gdbus_storageinfo.h"
 #include "mtp_gdbus_objectinfo.h"
 
+#define MTP_FEATURE "http://tizen.org/feature/network.mtp"
+
 #define MTP_LOCK \
 do { \
        pthread_mutex_lock(&mutex); \
@@ -62,7 +65,11 @@ bool __is_initialized = false;
 
 static bool __is_mtp_supported()
 {
-       return true;
+       bool is_supported_mtp = false;
+
+       system_info_get_platform_bool(MTP_FEATURE, &is_supported_mtp);
+
+       return is_supported_mtp;
 }
 
 static bool __is_mtp_activated()