Add RemoveSystemInformation to remove callback 32/301732/1
authorANZ1217 <chihun.jeong@samsung.com>
Wed, 22 Nov 2023 07:22:00 +0000 (16:22 +0900)
committerANZ1217 <chihun.jeong@samsung.com>
Wed, 22 Nov 2023 07:22:00 +0000 (16:22 +0900)
Change-Id: Ic213788d60d14906d865e750333e5c9b57df8bf9

dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/adaptor-impl.h
dali/internal/adaptor/generic/adaptor-impl-generic.cpp
dali/internal/adaptor/tizen-wayland/adaptor-impl-tizen.cpp

index 9e9129a..c64cbdc 100644 (file)
@@ -573,6 +573,8 @@ void Adaptor::Stop()
 
     mState = STOPPED;
 
+    RemoveSystemInformation();
+
     DALI_LOG_RELEASE_INFO("Adaptor::Stop\n");
   }
 }
index 454b81e..279ff14 100644 (file)
@@ -639,6 +639,11 @@ private:
   void SetupSystemInformation();
 
   /**
+   * Remove system information if needs
+   */
+  void RemoveSystemInformation();
+
+  /**
    * Adds a callback to be run when entering an idle state.
    *
    * A callback of the following type should be used:
index 9693b0b..c352ca0 100644 (file)
@@ -47,6 +47,10 @@ void Adaptor::SetupSystemInformation()
 {
 }
 
+void Adaptor::RemoveSystemInformation()
+{
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index a0150ec..3442ca1 100644 (file)
@@ -167,6 +167,15 @@ void Adaptor::SetupSystemInformation()
   free(locale);
 }
 
+void Adaptor::RemoveSystemInformation()
+{
+  if(system_settings_remove_changed_cb(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, OnSystemLanguageChanged) != SYSTEM_SETTINGS_ERROR_NONE)
+  {
+    DALI_LOG_ERROR("DALI system_settings_remove_changed_cb failed.\n");
+    return;
+  }
+}
+
 } // namespace Adaptor
 
 } // namespace Internal