Clear a11y events cache on pause 54/325554/3
authorYoungsun Suh <youngsun.suh@samsung.com>
Thu, 12 Jun 2025 00:01:17 +0000 (09:01 +0900)
committerYoungsun Suh <youngsun.suh@samsung.com>
Thu, 12 Jun 2025 00:23:02 +0000 (09:23 +0900)
Change-Id: Ie46e4e316fa8d7e8c26b3b51affa2d68819e6a6a

dali/devel-api/adaptor-framework/actor-accessible.cpp
dali/devel-api/adaptor-framework/actor-accessible.h
dali/devel-api/atspi-interfaces/accessible.h
dali/internal/accessibility/bridge/accessible.cpp
dali/internal/accessibility/bridge/bridge-impl.cpp

index eadf661625cf9cc9857653e254f164a8eef4a0f6..154ec29ceeba93a6169fb9a4867f3a36d1385e4d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -433,4 +433,9 @@ void ActorAccessible::NotifyAccessibilityStateChange(Dali::Accessibility::States
   }
 }
 
+void ActorAccessible::ClearCache()
+{
+  mLastEmittedState.clear();
+}
+
 } // namespace Dali::Accessibility
index a830a1bbc12b7ea2f10694a892f90d1246998818..1b97e8b6694567f91d057d6217fa57b7ca331ef2 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_ADAPTOR_ACTOR_ACCESSIBLE_H
 
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -251,6 +251,11 @@ public:
    */
   void NotifyAccessibilityStateChange(Dali::Accessibility::States states, bool isRecursive);
 
+  /**
+   * @brief Clears internal cache data on bridge down
+   */
+  void ClearCache();
+
 protected:
   Dali::Actor Self() const
   {
index 74f5823a5eec0af0d032c9df0d0776dbc24ef137..b6ac68ff68c752cb9e0c159f612844d89e007b47 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_ADAPTOR_ATSPI_ACCESSIBLE_H
 
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 13866d452324df7e22de2d357b9946279f04968c..7a0d80447afc4c20e9888043585055b911e7b795 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 632cc143574078b030e6c2705a3f6157c6165a4b..0f91cbb2e45d79ebe00cbd3bf5297b41bf229326 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2025 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -314,6 +314,14 @@ public:
     mDirectReadingCallbacks.clear();
     mApplication.mChildren.clear();
     ClearTimer();
+
+    for(auto& [key, obj] : mAccessibles)
+    {
+      if(auto actorAccessible = std::dynamic_pointer_cast<ActorAccessible>(obj))
+      {
+        actorAccessible->ClearCache();
+      }
+    }
   }
 
   void ClearTimer()