From: Pawel Andruszkiewicz
Date: Thu, 21 May 2015 11:39:02 +0000 (+0200)
Subject: [SecureElement] Fixed implementation of Session.getATR().
X-Git-Tag: submit/tizen_mobile/20150612.133019^2~2^2~138
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a113a376543c6caa2ef5c5204dcde51051ede3f;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
[SecureElement] Fixed implementation of Session.getATR().
[Verification] TCT pass rate: 69/71.
Change-Id: Id1a74875647133dd9f0fd75c2f82fe6b8b1ba23f
Signed-off-by: Pawel Andruszkiewicz
---
diff --git a/src/secureelement/secureelement_api.js b/src/secureelement/secureelement_api.js
index 380d4908..1f7efeea 100644
--- a/src/secureelement/secureelement_api.js
+++ b/src/secureelement/secureelement_api.js
@@ -330,7 +330,12 @@ Session.prototype.openLogicalChannel = function() {
Session.prototype.getATR = function() {
xwalk.utils.checkPrivilegeAccess(privilege_.SECUREELEMENT);
var callArgs = { handle: this._handle };
- return native_.callSync('SESession_getATR', callArgs);
+ var result = native_.callSync('SESession_getATR', callArgs);
+ if (native_.isFailure(result)) {
+ throw native_.getErrorObject(result);
+ } else {
+ return native_.getResultObject(result);
+ }
}
Session.prototype.close = function() {