+void EventHandler::OnAccessibilityQuickpanelChanged( const unsigned char& info )
+{
+#ifdef DALI_ELDBUS_AVAILABLE
+ if( mPaused )
+ {
+ return;
+ }
+
+ if( !mAccessibilityAdaptor )
+ {
+ DALI_LOG_ERROR( "Invalid accessibility adaptor\n" );
+ return;
+ }
+
+ AccessibilityAdaptor* accessibilityAdaptor( &AccessibilityAdaptor::GetImplementation( mAccessibilityAdaptor ) );
+ if( !accessibilityAdaptor )
+ {
+ DALI_LOG_ERROR( "Cannot access accessibility adaptor\n" );
+ return;
+ }
+
+ if( ( ( info & ( 1 << QUICKPANEL_TYPE_SYSTEM_DEFAULT ) ) && ( info & ( 1 << QUICKPANEL_TYPE_APPS_MENU ) ) ) || // Both QuickPanel and Apps are shown
+ ( info & ( 1 << QUICKPANEL_TYPE_SYSTEM_DEFAULT ) ) ) // QuickPanel is shown
+ {
+ // dali apps should be disabled.
+ DALI_LOG_INFO( gSelectionEventLogFilter, Debug::General, "OnAccessibilityQuickpanelChanged: Quickpanel show -> DisableAccessibility \n" );
+ 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
+ {
+ DALI_LOG_INFO( gSelectionEventLogFilter, Debug::General, "OnAccessibilityQuickpanelChanged: Only Apps show, but not forced dali -> DisableAccessibility \n" );
+ accessibilityAdaptor->DisableAccessibility();
+ }
+ else
+ {
+ DALI_LOG_INFO( gSelectionEventLogFilter, Debug::General, "OnAccessibilityQuickpanelChanged: Only Apps show and it is a forced dali -> EnableAccessibility \n" );
+ accessibilityAdaptor->EnableAccessibility();
+ }
+ }
+ else
+ {
+ DALI_LOG_INFO( gSelectionEventLogFilter, Debug::General, "OnAccessibilityQuickpanelChanged: Nothing shows -> EnableAccessibility \n" );
+ if( !accessibilityAdaptor->IsForcedEnable() )
+ {
+ // dali app should be enabled.
+ accessibilityAdaptor->EnableAccessibility();
+ }
+ }
+
+#endif
+}
+