From 434a79677cbff07fd096e283d77831e67dd6c690 Mon Sep 17 00:00:00 2001 From: hsgwon Date: Tue, 2 Oct 2018 13:50:03 +0900 Subject: [PATCH] [MediaController] fix bugs (#494) --- .../MediaController/MediaControlCommand.cs | 11 +++++++++-- .../MediaController/MediaControlSearchCondition.cs | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/Tizen.Multimedia.Remoting/MediaController/MediaControlCommand.cs b/src/Tizen.Multimedia.Remoting/MediaController/MediaControlCommand.cs index 374ba55..91e21bf 100644 --- a/src/Tizen.Multimedia.Remoting/MediaController/MediaControlCommand.cs +++ b/src/Tizen.Multimedia.Remoting/MediaController/MediaControlCommand.cs @@ -92,7 +92,6 @@ namespace Tizen.Multimedia.Remoting { try { - if (bundle != null) { NativeServer.SendCommandReplyBundle(serverHandle, ReceiverId, _requestId, result, bundle.SafeBundleHandle) @@ -104,6 +103,10 @@ namespace Tizen.Multimedia.Remoting .ThrowIfError("Failed to response command."); } } + catch (ArgumentException) + { + throw new InvalidOperationException("Server is not running"); + } finally { OnResponseCompleted(); @@ -128,9 +131,13 @@ namespace Tizen.Multimedia.Remoting else { NativeClient.SendCustomEventReply(clientHandle, ReceiverId, _requestId, result, IntPtr.Zero) - .ThrowIfError("Failed to repose event."); + .ThrowIfError("Failed to response event."); } } + catch (ArgumentException) + { + throw new InvalidOperationException("Server is not running"); + } finally { OnResponseCompleted(); diff --git a/src/Tizen.Multimedia.Remoting/MediaController/MediaControlSearchCondition.cs b/src/Tizen.Multimedia.Remoting/MediaController/MediaControlSearchCondition.cs index 8f76392..ba75ec8 100644 --- a/src/Tizen.Multimedia.Remoting/MediaController/MediaControlSearchCondition.cs +++ b/src/Tizen.Multimedia.Remoting/MediaController/MediaControlSearchCondition.cs @@ -36,6 +36,10 @@ namespace Tizen.Multimedia.Remoting /// The search category. /// The search keyword. /// The extra data. + /// + /// or is not valid. + /// + /// is null. /// 5 public MediaControlSearchCondition(MediaControlContentType type, MediaControlSearchCategory category, string keyword, Bundle bundle) @@ -53,6 +57,8 @@ namespace Tizen.Multimedia.Remoting /// The search type. /// The search keyword. /// The extra data. + /// is not valid. + /// is null. /// 5 public MediaControlSearchCondition(MediaControlContentType type, string keyword, Bundle bundle) { -- 2.7.4