Modify to use info.GetOwner() for dbus_sender 99/210299/1
authormk5004.lee <mk5004.lee@samsung.com>
Thu, 18 Jul 2019 01:40:21 +0000 (10:40 +0900)
committermk5004.lee <mk5004.lee@samsung.com>
Thu, 18 Jul 2019 01:45:47 +0000 (10:45 +0900)
- if appid is found in eventinfo, use it.

Change-Id: I28b7c20ea4ad8f7f23e180135a9a5d0eeac0403b
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
notification-ex/dbus_sender.cc

index 3628c7fa79cea4beb86b15bb7371adf01fbdac3b..22d6b98e6f5e1378c91ca904d37ad4d3b4a46aa9 100644 (file)
@@ -135,7 +135,10 @@ GDBusMessage* DBusSender::Impl::MethodCall(string appid, string method_name,
 }
 
 std::list<Bundle> DBusSender::Request(const IEventInfo& info) {
-  string appid = util::GetAppId();
+  string appid = info.GetOwner();
+  if (appid.length() == 0)
+    appid = util::GetAppId();
+
   string method_name = EventInfo::GetString(info.GetEventType());
   Bundle serialized = info.Serialize();
 
@@ -155,7 +158,10 @@ std::list<Bundle> DBusSender::Request(const IEventInfo& info) {
 }
 
 int DBusSender::RequestNumber(const IEventInfo& info) {
-  string appid = util::GetAppId();
+  string appid = info.GetOwner();
+  if (appid.length() == 0)
+    appid = util::GetAppId();
+
   string method_name = EventInfo::GetString(info.GetEventType());
   Bundle serialized = info.Serialize();