From 04215a598cb53ef8b728364b1b378b14e5c8cf01 Mon Sep 17 00:00:00 2001 From: dyamy-lee Date: Tue, 6 Sep 2022 16:54:40 +0900 Subject: [PATCH] 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 --- src/mmi.c | 2 +- tests/mmi-main-test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(); } -- 2.7.4