Revert "[Tizen] Add a flag to check whether it is forced to enable" 34/249334/1 accepted/tizen/6.0/unified/20201210.223944 submit/tizen_6.0/20201210.091119
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Thu, 10 Dec 2020 07:35:05 +0000 (16:35 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Thu, 10 Dec 2020 07:36:47 +0000 (16:36 +0900)
This reverts commit 5489404df5520ee738922e8d225f9f82a198fe5e.

Change-Id: I5bcb4ba25710da99b3c46fe2b60fe51d4a60808a

dali/devel-api/adaptor-framework/accessibility-adaptor.cpp
dali/devel-api/adaptor-framework/accessibility-adaptor.h
dali/internal/accessibility/common/accessibility-adaptor-impl.cpp
dali/internal/accessibility/common/accessibility-adaptor-impl.h
dali/internal/window-system/common/event-handler.cpp

index 6c1166d..685ed9a 100644 (file)
@@ -43,7 +43,6 @@ Vector2 AccessibilityAdaptor::GetReadPosition() const
 
 void AccessibilityAdaptor::EnableAccessibility(bool enabled)
 {
-  SetForcedEnable( true );
   if(enabled)
   {
     Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).EnableAccessibility();
@@ -59,11 +58,6 @@ bool AccessibilityAdaptor::IsEnabled() const
   return Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).IsEnabled();
 }
 
-void AccessibilityAdaptor::SetForcedEnable( bool forced )
-{
-  Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).SetForcedEnable(forced);
-}
-
 void AccessibilityAdaptor::SetActionHandler(AccessibilityActionHandler& handler)
 {
   Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).SetActionHandler(handler);
index 7cc65c3..a138db8 100644 (file)
@@ -86,12 +86,6 @@ public:
   bool IsEnabled() const;
 
   /**
-   * @brief Sets Accessibility enabled forcibly,
-   * @param forced Whether accessibility sets enabled forcibly
-   */
-  void SetForcedEnable( bool forced );
-
-  /**
    * @brief Set the handler to handle accessibility actions.
    *
    * @param[in] handler The Accessibility action handler.
index 1685cac..aed44c7 100644 (file)
@@ -50,8 +50,7 @@ Debug::Filter* gAccessibilityAdaptorLogFilter = Debug::Filter::New(Debug::NoLogg
 AccessibilityAdaptor::AccessibilityAdaptor()
 : mReadPosition(),
   mActionHandler( NULL ),
-  mIsEnabled( false ),
-  mIsForced( false )
+  mIsEnabled( false )
 {
   mAccessibilityGestureDetector = new AccessibilityGestureDetector();
 }
@@ -95,16 +94,6 @@ bool AccessibilityAdaptor::IsEnabled() const
   return mIsEnabled;
 }
 
-void AccessibilityAdaptor::SetForcedEnable( bool forced )
-{
-  mIsForced = forced;
-}
-
-bool AccessibilityAdaptor::IsForcedEnable() const
-{
-  return mIsForced;
-}
-
 Vector2 AccessibilityAdaptor::GetReadPosition() const
 {
   return mReadPosition;
index b67f506..29cbb08 100644 (file)
@@ -79,16 +79,6 @@ public:
   bool IsEnabled() const;
 
   /**
-   * @copydoc Dali::AccessibilityAdaptor::SetForcedEnable()
-   */
-  void SetForcedEnable( bool forced );
-
-  /**
-   * Whether the accessibility is enabled forcibly or not
-   */
-  bool IsForcedEnable() const;
-
-  /**
    * @copydoc Dali::AccessibilityAdaptor::GetReadPosition() const
    */
   Vector2 GetReadPosition() const;
@@ -266,8 +256,6 @@ protected:
 
   bool mIsEnabled        : 1; ///< enable/disable the accessibility action
 
-  bool mIsForced         : 1; ///< Is the accessibility enabled forcibly
-
 public:
 
   // Helpers for public-api forwarding methods
index f1b5eba..f8219a7 100755 (executable)
@@ -532,18 +532,12 @@ void EventHandler::OnAccessibilityQuickpanelChanged( const unsigned char& info )
   }
 
   if( ( ( info & ( 1 << QUICKPANEL_TYPE_SYSTEM_DEFAULT ) ) && ( info & ( 1 << QUICKPANEL_TYPE_APPS_MENU ) ) ) || // Both QuickPanel and Apps are shown
+      ( info & ( 1 << QUICKPANEL_TYPE_APPS_MENU ) ) || // Only Apps menu (dali application) is shown
       ( info & ( 1 << QUICKPANEL_TYPE_SYSTEM_DEFAULT ) ) ) // QuickPanel is shown
   {
     // dali apps should be disabled.
     accessibilityAdaptor->DisableAccessibility();
   }
-  else if( info & ( 1 << QUICKPANEL_TYPE_APPS_MENU ) ) // Only Apps menu (dali application) is shown
-  {
-    if( !accessibilityAdaptor->IsForcedEnable() ) // It is not in case of that an application controls the accessibility status itself
-    {
-      accessibilityAdaptor->DisableAccessibility();
-    }
-  }
   else
   {
     // dali app should be enabled.