From 6159e5458a9f6fed4920b3e31745dd9d9fff7655 Mon Sep 17 00:00:00 2001 From: ANZ1217 Date: Wed, 22 Nov 2023 16:22:00 +0900 Subject: [PATCH] Add RemoveSystemInformation to remove callback Change-Id: Ic213788d60d14906d865e750333e5c9b57df8bf9 --- dali/internal/adaptor/common/adaptor-impl.cpp | 2 ++ dali/internal/adaptor/common/adaptor-impl.h | 5 +++++ dali/internal/adaptor/generic/adaptor-impl-generic.cpp | 4 ++++ dali/internal/adaptor/tizen-wayland/adaptor-impl-tizen.cpp | 9 +++++++++ 4 files changed, 20 insertions(+) diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp index 9e9129a..c64cbdc 100644 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -573,6 +573,8 @@ void Adaptor::Stop() mState = STOPPED; + RemoveSystemInformation(); + DALI_LOG_RELEASE_INFO("Adaptor::Stop\n"); } } diff --git a/dali/internal/adaptor/common/adaptor-impl.h b/dali/internal/adaptor/common/adaptor-impl.h index 454b81e..279ff14 100644 --- a/dali/internal/adaptor/common/adaptor-impl.h +++ b/dali/internal/adaptor/common/adaptor-impl.h @@ -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: diff --git a/dali/internal/adaptor/generic/adaptor-impl-generic.cpp b/dali/internal/adaptor/generic/adaptor-impl-generic.cpp index 9693b0b..c352ca0 100644 --- a/dali/internal/adaptor/generic/adaptor-impl-generic.cpp +++ b/dali/internal/adaptor/generic/adaptor-impl-generic.cpp @@ -47,6 +47,10 @@ void Adaptor::SetupSystemInformation() { } +void Adaptor::RemoveSystemInformation() +{ +} + } // namespace Adaptor } // namespace Internal diff --git a/dali/internal/adaptor/tizen-wayland/adaptor-impl-tizen.cpp b/dali/internal/adaptor/tizen-wayland/adaptor-impl-tizen.cpp index a0150ec..3442ca1 100644 --- a/dali/internal/adaptor/tizen-wayland/adaptor-impl-tizen.cpp +++ b/dali/internal/adaptor/tizen-wayland/adaptor-impl-tizen.cpp @@ -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 -- 2.7.4