[MessagePort] Fix bug for getting remote value (#2554)
authorkilig <inkyun.kil@samsung.com>
Tue, 26 Jan 2021 01:06:34 +0000 (10:06 +0900)
committerGitHub <noreply@github.com>
Tue, 26 Jan 2021 01:06:34 +0000 (10:06 +0900)
Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
src/Tizen.Applications.MessagePort/Tizen.Applications.Messages/MessagePort.cs

index f7cddc0..13b7a45 100755 (executable)
@@ -174,15 +174,12 @@ namespace Tizen.Applications.Messages
                         return;
                     }
 
-                    if (!String.IsNullOrEmpty(remotePortName) && !String.IsNullOrEmpty(remoteAppId))
+                    args.Remote = new RemoteValues()
                     {
-                        args.Remote = new RemoteValues()
-                        {
-                            AppId = remoteAppId,
-                            PortName = remotePortName,
-                            Trusted = trusted
-                        };
-                    }
+                        AppId = remoteAppId != null ? remoteAppId : String.Empty,
+                        PortName = remotePortName != null ? remotePortName : String.Empty,
+                        Trusted = trusted
+                    };
                     MessageReceived?.Invoke(this, args);
                 };