[NFC] Return proper PlatformResult in case of NOT_SUPPORTED error.
authorTomasz Marciniak <t.marciniak@samsung.com>
Tue, 19 May 2015 13:18:42 +0000 (15:18 +0200)
committerHyunjin Park <hj.na.park@samsung.com>
Wed, 3 Jun 2015 04:54:56 +0000 (13:54 +0900)
[Verification] Code compiles without errors.

Change-Id: Id06a62e925fd4546bd5f36a8e9bffb830a040a7f
Signed-off-by: Tomasz Marciniak <t.marciniak@samsung.com>
src/nfc/nfc_util.cc

index bcf25a4..6837bcf 100644 (file)
@@ -45,8 +45,9 @@ PlatformResult NFCUtil::CodeToResult(const int errorCode,
     case NFC_ERROR_SECURITY_RESTRICTED:
     case NFC_ERROR_PERMISSION_DENIED:
       return PlatformResult(ErrorCode::SECURITY_ERR, message);
-    case NFC_ERROR_NOT_ACTIVATED:
     case NFC_ERROR_NOT_SUPPORTED:
+      return PlatformResult(ErrorCode::NOT_SUPPORTED_ERR, message);
+    case NFC_ERROR_NOT_ACTIVATED:
     case NFC_ERROR_OPERATION_FAILED:
     case NFC_ERROR_DEVICE_BUSY:
     case NFC_ERROR_NO_DEVICE: