From: Pawel Wasowski Date: Wed, 28 Dec 2016 16:09:51 +0000 (+0100) Subject: [Badge] Return '0' from GetBadgeCount, if a badge does not exist X-Git-Tag: submit/tizen_3.0/20161229.023338~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb8cac8559780f7da7fe836aeb84a79e2317449e;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Badge] Return '0' from GetBadgeCount, if a badge does not exist [Verification] tct-badge-tizen-tests pass rate is 100% Change-Id: I976ad1eec84d0b884e944d6dcd90ebf5b05b4c47 --- diff --git a/src/badge/badge_manager.cc b/src/badge/badge_manager.cc index e685e2be..8736e849 100755 --- a/src/badge/badge_manager.cc +++ b/src/badge/badge_manager.cc @@ -136,11 +136,10 @@ PlatformResult BadgeManager::GetBadgeCount(const std::string& app_id, LoggerD("badge exist : %d", badge_exist); if (!badge_exist) { - return LogAndCreateResult(ErrorCode::UNKNOWN_ERR, - "badge not exist. app_id: " + app_id); + *count = 0; + return PlatformResult(ErrorCode::NO_ERROR); } - *count = 0; ret = badge_get_count(app_id.c_str(), count); LoggerD("badge_get_count() ret : %d count : %d", ret, *count);