Merge branch 'tizen_3.0' into tizen_4.0 42/169242/1 accepted/tizen/4.0/unified/20180205.144611 submit/tizen_4.0/20180205.082909
authorPiotr Kosko <p.kosko@samsung.com>
Mon, 5 Feb 2018 06:57:27 +0000 (07:57 +0100)
committerPiotr Kosko <p.kosko@samsung.com>
Mon, 5 Feb 2018 06:57:32 +0000 (07:57 +0100)
Change-Id: I341501004603b29f58f41320ab1093f09f039af6

packaging/webapi-plugins.spec
src/bluetooth/bluetooth_gatt_service.cc
src/bluetooth/bluetooth_health_channel.cc
src/bluetooth/bluetooth_socket.cc
src/nfc/nfc_api.js
src/nfc/nfc_util.cc

index 996a735..9dbf334 100644 (file)
@@ -8,7 +8,7 @@
 %define crosswalk_extensions_path %{_libdir}/%{crosswalk_extensions}
 
 Name:       webapi-plugins
-Version:    2.15
+Version:    2.16
 Release:    0
 License:    Apache-2.0 and BSD-3-Clause and MIT
 Group:      Development/Libraries
index 14f4bc7..f6798a8 100644 (file)
@@ -424,7 +424,7 @@ void BluetoothGATTService::WriteValue(const picojson::value& args, picojson::obj
   int value_size = value_array.size();
   std::unique_ptr<char[]> value_data(new char[value_size]);
   for (int i = 0; i < value_size; ++i) {
-    value_data[i] = static_cast<char>(value_array[i].get<double>());
+    value_data[i] = (int) value_array[i].get<double>();
   }
 
   struct Data {
index 8d19279..e119693 100644 (file)
@@ -77,7 +77,7 @@ void BluetoothHealthChannel::SendData(const picojson::value& data, picojson::obj
   std::unique_ptr<char[]> data_ptr{new char[data_size]};
 
   for (std::size_t i = 0; i < data_size; ++i) {
-    data_ptr[i] = static_cast<char>(binary_data[i].get<double>());
+    data_ptr[i] = (int) binary_data[i].get<double>();
   }
 
   int ntv_ret = bt_hdp_send_data(channel, data_ptr.get(), data_size);
index 7625ae4..fea9ed1 100644 (file)
@@ -63,7 +63,7 @@ void BluetoothSocket::WriteData(const picojson::value& data, picojson::object& o
   std::unique_ptr<char[]> data_ptr{new char[data_size]};
 
   for (std::size_t i = 0; i < data_size; ++i) {
-    data_ptr[i] = static_cast<char>(binary_data[i].get<double>());
+    data_ptr[i] = (int) binary_data[i].get<double>();
   }
 
   if (kBluetoothError == bt_socket_send_data(socket, data_ptr.get(), data_size)) {
index 7afe25f..20641f2 100644 (file)
@@ -692,7 +692,7 @@ NFCAdapter.prototype.removeHCEEventListener = function() {
 
 NFCAdapter.prototype.sendHostAPDUResponse = function(apdu, successCallback, errorCallback) {
   var args = validator_.validateArgs(arguments, [
-    {name: 'apdu', type: types_.ARRAY, values: types_.OCTET},
+    {name: 'apdu', type: types_.ARRAY, values: types_.BYTE},
     {name: 'successCallback', type: types_.FUNCTION, optional: true, nullable: true},
     {name: 'errorCallback', type: types_.FUNCTION, optional: true, nullable: true}
   ]);
@@ -1141,7 +1141,8 @@ function NFCTag(tagid) {
     var args = validator_.validateArgs(arguments, [
       {
         name: 'data',
-        type: types_.ARRAY
+        type: types_.ARRAY,
+        values: types_.BYTE
       },
       {
         name: 'dataCallback',
index 3718a34..c438dc2 100644 (file)
@@ -363,7 +363,7 @@ unsigned char* NFCUtil::DoubleArrayToUCharArray(const picojson::array& array_in)
   ScopeLogger();
   unsigned char* result_array = new unsigned char[array_in.size()];
   for (std::size_t i = 0; i < array_in.size(); ++i) {
-    result_array[i] = static_cast<unsigned char>(array_in.at(i).get<double>());
+    result_array[i] = (int) array_in.at(i).get<double>();
   }
   return result_array;
 }