Change to use new feature of external storage 65/198065/2
authorYoungHun Kim <yh8004.kim@samsung.com>
Fri, 18 Jan 2019 07:37:18 +0000 (16:37 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Fri, 18 Jan 2019 07:43:53 +0000 (16:43 +0900)
Change-Id: I916b07af824c8939ab98b79424b73f8fcb2e2da2

packaging/mused.spec
server/src/muse_server_system.c

index 670c72525543b09fea537c7ea296fad41d330ad8..c3e4893650ac00d1ed0ae718db06d46589437c37 100644 (file)
@@ -1,6 +1,6 @@
 Name:       mused
 Summary:    A multimedia daemon
-Version:    0.3.63
+Version:    0.3.64
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause
index 358aadaf893b830e1aebdb059ab495150366e296..4d952023d97f983853be1808c54485f5479581d6 100644 (file)
@@ -24,6 +24,8 @@
 #include <system_info.h>
 #include <runtime_info.h>
 
+#define MUSE_STORAGE_EXTERNAL_FEATURE          "http://tizen.org/feature/storage.external"
+
 enum muse_poweroff_type {
        MUSE_POWER_OFF_NONE = 0,
        MUSE_POWER_OFF_POPUP,
@@ -362,6 +364,10 @@ int ms_system_get_platform_info(const char *key, bool *value)
 
 void ms_system_subscribe_external_event(ms_system_t *system)
 {
+#ifdef MUSE_USE_EXTERNAL_STORAGE_STATE_CHANGE
+       int ret = MM_ERROR_NONE;
+       bool is_external_storage_enabled;
+#endif
        muse_return_if_fail(system);
 
 #ifdef MUSE_USE_POWER_OFF_STATE_CHANGE
@@ -370,7 +376,8 @@ void ms_system_subscribe_external_event(ms_system_t *system)
 #endif
 
 #ifdef MUSE_USE_EXTERNAL_STORAGE_STATE_CHANGE
-       if (ms_get_instance()->conf->is_watch_external_storage_enabled == TRUE &&
+       ret = system_info_get_platform_bool(MUSE_STORAGE_EXTERNAL_FEATURE, &is_external_storage_enabled);
+       if (ret == MM_ERROR_NONE && is_external_storage_enabled == true &&
                _ms_system_subscribe_external_storage_state_change(system) != MM_ERROR_NONE)
                LOGE("Fail to subscribe external storage state change");
 #endif