From: dyamy-lee Date: Tue, 6 Sep 2022 07:54:40 +0000 (+0900) Subject: replace return value of mmi_set_result_cb X-Git-Tag: accepted/tizen/unified/20220927.132357~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F97%2F281597%2F1;p=platform%2Fcore%2Fuifw%2Fmmi-framework.git replace return value of mmi_set_result_cb Following a mmi_client_set_result_cb's error type is more clear than NOT_SUPPORTED error type. So, changed it's return value following it on source code and test, too. Change-Id: Id66f763de1904034ed321e22cbe52ad454a9c9df --- diff --git a/src/mmi.c b/src/mmi.c index c698a4f..7023343 100644 --- a/src/mmi.c +++ b/src/mmi.c @@ -56,7 +56,7 @@ MMI_API int mmi_set_result_cb(int input_event_type, result_cb callback, void* us ret = mmi_client_set_result_cb(input_event_type, callback, user_data); if(ret != MMI_ERROR_NONE) { LOGE("Fail to set result cb(%d)", ret); - return MMI_ERROR_NOT_SUPPORTED; + return ret; } return MMI_ERROR_NONE; diff --git a/tests/mmi-main-test.cpp b/tests/mmi-main-test.cpp index 4e9fb6a..0f08648 100644 --- a/tests/mmi-main-test.cpp +++ b/tests/mmi-main-test.cpp @@ -126,7 +126,7 @@ TEST_F(MMIMainTest, MMISetResultCbFail) EXPECT_EQ(res, MMI_ERROR_NONE); res = mmi_set_result_cb(input_event_type, NULL, NULL); - EXPECT_EQ(res, MMI_ERROR_NOT_SUPPORTED); + EXPECT_EQ(res, MMI_ERROR_INVALID_PARAMETER); mmi_shutdown(); }