From: Hwankyu Jhun Date: Thu, 25 Jul 2024 04:27:16 +0000 (+0900) Subject: Fix a bug about app control action X-Git-Tag: accepted/tizen/unified/20240729.074752~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b1f0657533c78037ae9af843f17db53e2af9080;p=platform%2Fcore%2Fappfw%2Fapp-core.git Fix a bug about app control action If the mime type is not "NULL" and the sub type of the mime type is not "%", the mime type of the argument should be checked with mimetype + "/*" value. Change-Id: I34f77a0337a52372b1ed77771c6956641c815f6d Signed-off-by: Hwankyu Jhun --- diff --git a/tizen-cpp/app-core-cpp/app_control_info_private.cc b/tizen-cpp/app-core-cpp/app_control_info_private.cc index e0b986f..5cd6283 100644 --- a/tizen-cpp/app-core-cpp/app_control_info_private.cc +++ b/tizen-cpp/app-core-cpp/app_control_info_private.cc @@ -159,15 +159,17 @@ void AppControlInfo::SetUri(std::string uri) { uri_ = std::move(uri); } bool AppControlInfo::Match(const AppControlInfo& info) const { if (info.GetOperation() != GetOperation()) return false; - if (info.GetUri() == GetUri() && info.GetMime() == GetMime()) return true; + if (info.GetUri() != GetUri()) return false; - if (info.GetUri() == GetUri()) { - if (info.GetMime() == "NULL" && info.GetMimeSubtype() == "%") { + if (info.GetMime() == GetMime()) return true; + + if (info.GetMime() != "NULL") { + if (info.GetMimeSubtype() != "%") { std::string mime = info.GetMimeType() + "/*"; if (GetMime() == mime) return true; } - if (info.GetMime() == "NULL" && info.GetMimeType() == "%") + if (info.GetMimeType() != "%") if (GetMime() == "*/*") return true; }