void AccessibilityAdaptor::EnableAccessibility(bool enabled)
{
+ SetForcedEnable( true );
if(enabled)
{
Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).EnableAccessibility();
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);
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.
AccessibilityAdaptor::AccessibilityAdaptor()
: mReadPosition(),
mActionHandler( NULL ),
- mIsEnabled( false )
+ mIsEnabled( false ),
+ mIsForced( false )
{
mAccessibilityGestureDetector = new AccessibilityGestureDetector();
}
return mIsEnabled;
}
+void AccessibilityAdaptor::SetForcedEnable( bool forced )
+{
+ mIsForced = forced;
+}
+
+bool AccessibilityAdaptor::IsForcedEnable() const
+{
+ return mIsForced;
+}
+
Vector2 AccessibilityAdaptor::GetReadPosition() const
{
return mReadPosition;
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;
bool mIsEnabled : 1; ///< enable/disable the accessibility action
+ bool mIsForced : 1; ///< Is the accessibility enabled forcibly
+
public:
// Helpers for public-api forwarding methods
}
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.