[Tizen] change from system_settings_set_changed_cb to system_settings_add_changed_cb. 10/223810/1
authorJoogab Yun <joogab.yun@samsung.com>
Wed, 29 Jan 2020 02:19:01 +0000 (11:19 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Tue, 4 Feb 2020 06:38:08 +0000 (15:38 +0900)
because system_settings_set_changed_cb can only register one callback per process.
If other app registers the system_settings_set_changed_cb callback, DALi cannot use this callback.

Change-Id: Ia1af0daaf8fd95106bb50cc10e64e4d2d90e7ba7

dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/adaptor-impl.h
dali/internal/adaptor/generic/adaptor-impl-generic.cpp [changed mode: 0755->0644]
dali/internal/adaptor/tizen-wayland/adaptor-impl-tizen.cpp

index 689c913..695688f 100755 (executable)
@@ -334,9 +334,6 @@ Adaptor::~Adaptor()
   // Ensure stop status
   Stop();
 
-  // reset SystemInformation
-  ResetSystemInformation();
-
   // set to NULL first as we do not want any access to Adaptor as it is being destroyed.
   gThreadLocalAdaptor = NULL;
 
index aa7dce5..fd39a3a 100755 (executable)
@@ -602,11 +602,6 @@ private:
   void SetupSystemInformation();
 
   /**
-   * Reset up system information if needs
-   */
-  void ResetSystemInformation();
-
-  /**
    * Adds a callback to be run when entering an idle state.
    *
    * A callback of the following type should be used:
old mode 100755 (executable)
new mode 100644 (file)
index 2329059..1b05919
@@ -45,12 +45,6 @@ void Adaptor::SetupSystemInformation()
 {
 }
 
-void Adaptor::ResetSystemInformation()
-{
-}
-
-
-
 } // namespace Adaptor
 
 } // namespace Internal
index 8daa681..fb0cddd 100755 (executable)
@@ -21,7 +21,6 @@
 // EXTERNAL INCLUDES
 #include <app_common.h>
 #include <system_settings.h>
-#include <vconf.h>
 
 #ifdef APPCORE_WATCH_AVAILABLE
 #include <screen_connector_provider.h>
@@ -46,7 +45,7 @@ namespace Adaptor
 namespace
 {
 
-static void OnSystemLanguageChanged( keynode_t *key, void* data )
+static void OnSystemLanguageChanged( system_settings_key_e key, void* data )
 {
   char* locale = NULL;
   if( system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale ) != SYSTEM_SETTINGS_ERROR_NONE ||
@@ -127,9 +126,9 @@ void Adaptor::SurfaceInitialized()
 
 void Adaptor::SetupSystemInformation()
 {
-  if( vconf_notify_key_changed( VCONFKEY_LANGSET, OnSystemLanguageChanged, this ) < 0)
+  if( system_settings_add_changed_cb( SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, OnSystemLanguageChanged, this ) != SYSTEM_SETTINGS_ERROR_NONE )
   {
-    DALI_LOG_ERROR( "DALI system_settings_set_changed_cb failed.\n" );
+    DALI_LOG_ERROR( "DALI system_settings_add_changed_cb failed.\n" );
     return;
   }
 
@@ -147,11 +146,6 @@ void Adaptor::SetupSystemInformation()
 
 }
 
-void Adaptor::ResetSystemInformation()
-{
-  vconf_ignore_key_changed( VCONFKEY_LANGSET, OnSystemLanguageChanged );
-}
-
 } // namespace Adaptor
 
 } // namespace Internal