+ Result of native call to SendCommand was not checked for failure.
This commit adds this validation.
+ Added return after error occured in AddPlaybackInfoChangeList().
[Verification] All tests pass.
Signed-off-by: Michal Michalski <m.michalski2@partner.samsung.com>
Change-Id: I5e7e74faa1c8902f35e45278c7c05778094867c4
var replyListenerId = ReplyCommandListener.addListener(callback);
var result = native_.callSync('MediaControllerServerInfo_sendCommand', nativeData);
+ if (native_.isFailure(result)) {
+ throw native_.getErrorObject(result);
+ }
ReplyCommandListener.requestIdToListenerId[replyListenerId] = result.requestId;
};
auto result = client_->SetPlaybackInfoListener(callback);
if (!result) {
LogAndReportError(result, &out);
+ return;
}
ReportSuccess(out);