ref-fusion: remove unused event handler 98/264098/1
authorSung-Jin Park <sj76.park@samsung.com>
Wed, 8 Sep 2021 12:30:25 +0000 (21:30 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Mon, 13 Sep 2021 11:26:53 +0000 (20:26 +0900)
Change-Id: I18b6184f6d28bd8432c91589c20e3dbfad508d5b
Signed-off-by: Sung-Jin Park <sj76.park@samsung.com>
src/modules/ref_fusion/mmi-ref-fusion.c

index 56c0155..5898086 100644 (file)
@@ -66,7 +66,7 @@ mmi_client *_prev_focus_client = NULL;
 mmi_client *_focus_client = NULL;
 mmi_state _prev_state = MMI_STATE_NONE;
 mmi_state _state = MMI_STATE_NONE;
-Ecore_Event_Handler *_event_handlers[2];
+Ecore_Event_Handler *_event_handlers;
 
 static Eina_Bool
 _focus_change_cb(void *data EINA_UNUSED, int type, void *event)
@@ -125,63 +125,6 @@ _focus_change_cb(void *data EINA_UNUSED, int type, void *event)
        return ECORE_CALLBACK_PASS_ON;
 }
 
-static Eina_Bool
-_state_change_cb(void *data EINA_UNUSED, int type, void *event)
-{
-       int r;
-       unsigned long long caps = MODALITY_PROVIDER_CAP_NONE;
-
-       LOGI("...");
-
-       mmi_manager_event_state_change *ev = (mmi_manager_event_state_change *)event;
-
-       if (ev->client != _focus_client)
-       {
-               LOGE("Invalid state change event ! (client:%p, focus_client:%p)\n",
-                       ev->client, _focus_client);
-               return ECORE_CALLBACK_PASS_ON;
-       }
-
-       if (_state != ev->from_state)
-       {
-               LOGE("Abnormal situation ! (_state=%d, ev->from_state=%d)\n", _state, ev->from_state);
-               return ECORE_CALLBACK_PASS_ON;
-       }
-
-       if (ev->from_state != MMI_STATE_NONE)
-       {
-               //Set op_mode to MODALITY_PROVIDER_MODE_DROP_EVENT
-               caps = state_caps[ev->from_state];
-
-               r = mmi_provider_set_op_mode_on_caps(caps, MODALITY_PROVIDER_MODE_DROP_EVENT);
-               if (r)
-               {
-                       LOGE("Failed on setting op_mode(%d) on caps(%llu) !\n",
-                               MODALITY_PROVIDER_MODE_DROP_EVENT, caps);
-                       return ECORE_CALLBACK_PASS_ON;
-               }
-       }
-
-       if (ev->to_state != MMI_STATE_NONE)
-       {
-               //Set op_mode to MODALITY_PROVIDER_MODE_PROPAGATE_EVENT
-               caps = state_caps[ev->from_state];
-
-               r = mmi_provider_set_op_mode_on_caps(caps, MODALITY_PROVIDER_MODE_PROPAGATE_EVENT);
-               if (r)
-               {
-                       LOGE("Failed on setting op_mode(%d) on caps(%llu) !\n",
-                               MODALITY_PROVIDER_MODE_PROPAGATE_EVENT, caps);
-                       return ECORE_CALLBACK_PASS_ON;
-               }
-       }
-
-       _prev_state = _state;
-       _state = ev->to_state;
-
-       return ECORE_CALLBACK_PASS_ON;
-}
-
 static mmi_fusion_module_data *
 ref_fusion_init(void)
 {
@@ -198,10 +141,8 @@ ref_fusion_init(void)
        ref_fusion_data->get_state = ref_fusion_get_state;
        ref_fusion_data->set_state = ref_fusion_set_state;
 
-       _event_handlers[0] = ecore_event_handler_add(MMI_MANAGER_EVENT_FOCUS_CHANGE,
+       _event_handlers = ecore_event_handler_add(MMI_MANAGER_EVENT_FOCUS_CHANGE,
                        _focus_change_cb, NULL);
-       //_event_handlers[1] = ecore_event_handler_add(MMI_MANAGER_EVENT_STATE_CHANGE,
-       //              _state_change_cb, NULL);
 
        return ref_fusion_data;
 }
@@ -269,8 +210,7 @@ ref_fusion_deinit(mmi_fusion_module_data *module_data)
 
        LOGD("ref_fusion_deinit\n");
 
-       ecore_event_handler_del(_event_handlers[0]);
-       ecore_event_handler_del(_event_handlers[1]);
+       ecore_event_handler_del(_event_handlers);
 
        module_data->get_state = NULL;
        module_data->set_state = NULL;