[Bluetooth][Minor] Replace deprecated ValidateMethod with ValidateArgs 62/232062/2
authorArkadiusz Pietraszek <a.pietraszek@samsung.com>
Mon, 27 Apr 2020 13:15:32 +0000 (15:15 +0200)
committerArkadiusz Pietraszek <a.pietraszek@samsung.com>
Wed, 29 Apr 2020 11:51:43 +0000 (11:51 +0000)
https://code.sec.samsung.net/jira/browse/TSIX-3080

[Verification] tct pass rate 100%

Change-Id: Icf77d6ebaad1d54c147b03696f50df1a0678d600
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
src/bluetooth/bluetooth_api.js

index 1e274a3..ea34b94 100755 (executable)
@@ -439,7 +439,7 @@ var BluetoothClass_hasService = function() {
         Privilege.BLUETOOTH_GAP
     );
 
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'service',
             type: AV.Types.UNSIGNED_LONG
@@ -533,7 +533,7 @@ var BluetoothSocket = function(data) {
 BluetoothSocket.prototype.writeData = function() {
     privUtils_.log('Entered BluetoothSocket.writeData()');
 
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'data',
             type: AV.Types.ARRAY,
@@ -663,7 +663,7 @@ var BluetoothLEDevice = function(data) {
 
 BluetoothLEDevice.prototype.connect = function() {
     privUtils_.log('Entered BluetoothLEDevice.connect()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: AV.Types.FUNCTION,
@@ -698,7 +698,7 @@ BluetoothLEDevice.prototype.connect = function() {
 
 BluetoothLEDevice.prototype.disconnect = function() {
     privUtils_.log('Entered BluetoothLEDevice.disconnect()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: AV.Types.FUNCTION,
@@ -732,7 +732,7 @@ BluetoothLEDevice.prototype.disconnect = function() {
 
 BluetoothLEDevice.prototype.getService = function() {
     privUtils_.log('Entered BluetoothLEDevice.getService()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'uuid',
             type: AV.Types.STRING
@@ -770,7 +770,7 @@ BluetoothLEDevice.prototype.getServiceAllUuids = function() {
 
 BluetoothLEDevice.prototype.addConnectStateChangeListener = function() {
     privUtils_.log('Entered BluetoothLEDevice.addConnectStateChangeListener()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'listener',
             type: AV.Types.LISTENER,
@@ -794,7 +794,7 @@ BluetoothLEDevice.prototype.addConnectStateChangeListener = function() {
 BluetoothLEDevice.prototype.removeConnectStateChangeListener = function() {
     privUtils_.log('Entered BluetoothLEDevice.removeConnectStateChangeListener()');
 
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'watchID',
             type: AV.Types.LONG
@@ -875,7 +875,7 @@ var BluetoothDevice = function(data) {
 BluetoothDevice.prototype.connectToServiceByUUID = function() {
     privUtils_.log('Entered BluetoothDevice.connectToServiceByUUID()');
 
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'uuid',
             type: AV.Types.STRING
@@ -978,7 +978,7 @@ var BluetoothServiceHandler = function(data) {
 
 BluetoothServiceHandler.prototype.unregister = function() {
     privUtils_.log('Entered BluetoothServiceHandler.unregister()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: AV.Types.FUNCTION,
@@ -1075,7 +1075,7 @@ var BluetoothHealthApplication = function(data) {
 BluetoothHealthApplication.prototype.unregister = function() {
     privUtils_.log('Entered BluetoothHealthApplication.unregister()');
     privUtils_.printDeprecationWarningFor('BluetoothHealthApplication');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: AV.Types.FUNCTION,
@@ -1139,7 +1139,7 @@ BluetoothHealthProfileHandler.prototype.registerSinkApplication = function() {
     privUtils_.log('Entered BluetoothHealthProfileHandler.registerSinkApplication()');
     privUtils_.printDeprecationWarningFor('BluetoothHealthProfileHandler');
 
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'dataType',
             type: AV.Types.LONG // there's no short type
@@ -1189,7 +1189,7 @@ BluetoothHealthProfileHandler.prototype.connectToSource = function() {
     privUtils_.log('Entered BluetoothHealthProfileHandler.connectToSource()');
     privUtils_.printDeprecationWarningFor('BluetoothHealthProfileHandler');
 
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'peer',
             type: AV.Types.PLATFORM_OBJECT,
@@ -1282,7 +1282,7 @@ BluetoothHealthChannel.prototype.sendData = function() {
     privUtils_.log('Entered BluetoothHealthChannel.sendData()');
     privUtils_.printDeprecationWarningFor('BluetoothHealthChannel');
 
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'data',
             type: AV.Types.ARRAY,
@@ -1337,7 +1337,7 @@ var BluetoothHealthChannel_setListener = function() {
         Privilege.BLUETOOTH,
         Privilege.BLUETOOTH_HEALTH
     );
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'changeCallback',
             type: AV.Types.LISTENER,
@@ -1500,7 +1500,7 @@ var BluetoothLEAdapter = function() {};
 
 BluetoothLEAdapter.prototype.startScan = function() {
     privUtils_.log('Entered BluetoothLEAdapter.startScan()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: AV.Types.FUNCTION
@@ -1545,7 +1545,7 @@ var _BluetoothAdvertisingMode = {
 
 BluetoothLEAdapter.prototype.startAdvertise = function() {
     privUtils_.log('Entered BluetoothLEAdapter.startAdvertise()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'advertiseData',
             type: AV.Types.PLATFORM_OBJECT,
@@ -1761,7 +1761,7 @@ var BluetoothGATTCharacteristic = function(data, address) {
 
     this.readValue = function() {
         privUtils_.log('Entered BluetoothGATTCharacteristic.readValue()');
-        var args = AV.validateMethod(arguments, [
+        var args = AV.validateArgs(arguments, [
             {
                 name: 'successCallback',
                 type: AV.Types.FUNCTION
@@ -1794,7 +1794,7 @@ var BluetoothGATTCharacteristic = function(data, address) {
 
     this.writeValue = function() {
         privUtils_.log('Entered BluetoothGATTCharacteristic.writeValue()');
-        var args = AV.validateMethod(arguments, [
+        var args = AV.validateArgs(arguments, [
             {
                 name: 'value',
                 type: AV.Types.ARRAY,
@@ -1842,7 +1842,7 @@ var BluetoothGATTCharacteristic = function(data, address) {
             Privilege.BLUETOOTH,
             Privilege.BLUETOOTH_ADMIN
         );
-        var args = AV.validateMethod(arguments, [
+        var args = AV.validateArgs(arguments, [
             {
                 name: 'callback',
                 type: AV.Types.FUNCTION
@@ -1867,7 +1867,7 @@ var BluetoothGATTCharacteristic = function(data, address) {
     this.removeValueChangeListener = function() {
         privUtils_.log('Entered BluetoothGATTCharacteristic.removeValueChangeListener()');
 
-        var args = AV.validateMethod(arguments, [
+        var args = AV.validateArgs(arguments, [
             {
                 name: 'watchID',
                 type: AV.Types.LONG
@@ -2007,7 +2007,7 @@ var BluetoothGATTDescriptor = function(data, address) {
 
     this.readValue = function() {
         privUtils_.log('Entered BluetoothGATTDescriptor.readValue()');
-        var args = AV.validateMethod(arguments, [
+        var args = AV.validateArgs(arguments, [
             {
                 name: 'successCallback',
                 type: AV.Types.FUNCTION
@@ -2040,7 +2040,7 @@ var BluetoothGATTDescriptor = function(data, address) {
 
     this.writeValue = function() {
         privUtils_.log('Entered BluetoothGATTDescriptor.writeValue()');
-        var args = AV.validateMethod(arguments, [
+        var args = AV.validateArgs(arguments, [
             {
                 name: 'value',
                 type: AV.Types.ARRAY,
@@ -2150,7 +2150,7 @@ var BluetoothAdapter = function() {
 
 BluetoothAdapter.prototype.setName = function() {
     privUtils_.log('Entered BluetoothAdapter.setName()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'name',
             type: AV.Types.STRING
@@ -2194,7 +2194,7 @@ BluetoothAdapter.prototype.setPowered = function() {
         'Let the user turn on/off Bluetooth through the Settings application instead.'
     );
 
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'powered',
             type: AV.Types.BOOLEAN
@@ -2240,7 +2240,7 @@ BluetoothAdapter.prototype.setVisible = function() {
             'application instead.'
     );
 
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'visible',
             type: AV.Types.BOOLEAN
@@ -2324,7 +2324,7 @@ function _BluetoothAdapterChangeCallback(event) {
 
 BluetoothAdapter.prototype.setChangeListener = function() {
     privUtils_.log('Entered BluetoothAdapter.setChangeListener()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'changeCallback',
             type: AV.Types.LISTENER,
@@ -2408,7 +2408,7 @@ function _BluetoothDiscoverDevicesErrorCallback(event) {
 
 BluetoothAdapter.prototype.discoverDevices = function() {
     privUtils_.log('Entered BluetoothAdapter.discoverDevices()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: AV.Types.LISTENER,
@@ -2450,7 +2450,7 @@ BluetoothAdapter.prototype.discoverDevices = function() {
 
 BluetoothAdapter.prototype.stopDiscovery = function() {
     privUtils_.log('Entered BluetoothAdapter.stopDiscovery()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: AV.Types.FUNCTION,
@@ -2481,7 +2481,7 @@ BluetoothAdapter.prototype.stopDiscovery = function() {
 
 BluetoothAdapter.prototype.getKnownDevices = function() {
     privUtils_.log('Entered BluetoothAdapter.getKnownDevices()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'successCallback',
             type: AV.Types.FUNCTION
@@ -2515,7 +2515,7 @@ BluetoothAdapter.prototype.getKnownDevices = function() {
 
 BluetoothAdapter.prototype.getDevice = function() {
     privUtils_.log('Entered BluetoothAdapter.getDevice()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'address',
             type: AV.Types.STRING
@@ -2552,7 +2552,7 @@ BluetoothAdapter.prototype.getDevice = function() {
 
 BluetoothAdapter.prototype.createBonding = function() {
     privUtils_.log('Entered BluetoothAdapter.createBonding()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'address',
             type: AV.Types.STRING
@@ -2591,7 +2591,7 @@ BluetoothAdapter.prototype.createBonding = function() {
 
 BluetoothAdapter.prototype.destroyBonding = function() {
     privUtils_.log('Entered BluetoothAdapter.destroyBonding()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'address',
             type: AV.Types.STRING
@@ -2630,7 +2630,7 @@ BluetoothAdapter.prototype.destroyBonding = function() {
 
 BluetoothAdapter.prototype.registerRFCOMMServiceByUUID = function() {
     privUtils_.log('Entered BluetoothAdapter.registerRFCOMMServiceByUUID()');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'uuid',
             type: AV.Types.STRING
@@ -2679,7 +2679,7 @@ BluetoothAdapter.prototype.registerRFCOMMServiceByUUID = function() {
 BluetoothAdapter.prototype.getBluetoothProfileHandler = function() {
     privUtils_.log('Entered BluetoothAdapter.getBluetoothProfileHandler()');
     privUtils_.printDeprecationWarningFor('getBluetoothProfileHandler');
-    var args = AV.validateMethod(arguments, [
+    var args = AV.validateArgs(arguments, [
         {
             name: 'profileType',
             type: AV.Types.ENUM,