BluetoothLEDevice.prototype.connect = function() {
console.log('Entered BluetoothLEDevice.connect()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
var args = AV.validateMethod(arguments, [
{
name : 'successCallback',
BluetoothLEDevice.prototype.disconnect = function() {
console.log('Entered BluetoothLEDevice.disconnect()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
var args = AV.validateMethod(arguments, [
{
name : 'successCallback',
BluetoothLEDevice.prototype.getService = function() {
console.log('Entered BluetoothLEDevice.getService()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
var args = AV.validateMethod(arguments, [
{
BluetoothLEAdapter.prototype.startScan = function() {
console.log('Entered BluetoothLEAdapter.startScan()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
var args = AV.validateMethod(arguments, [{
name: 'successCallback',
BluetoothLEAdapter.prototype.stopScan = function() {
console.log('Entered BluetoothLEAdapter.stopScan()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
_bleScanListener.removeListener();
BluetoothLEAdapter.prototype.startAdvertise = function() {
console.log('Entered BluetoothLEAdapter.startAdvertise()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
var args = AV.validateMethod(arguments, [{
name: 'advertiseData',
BluetoothLEAdapter.prototype.stopAdvertise = function() {
console.log('Entered BluetoothLEAdapter.stopAdvertise()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
// TODO: when should we call _bleAdvertiseListener.removeListener()?
BluetoothGATTCharacteristic.prototype.readValue = function() {
console.log('Entered BluetoothGATTCharacteristic.readValue()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
var args = AV.validateMethod(arguments, [{
name: 'successCallback',
BluetoothGATTCharacteristic.prototype.writeValue = function() {
console.log('Entered BluetoothGATTCharacteristic.writeValue()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
var args = AV.validateMethod(arguments, [{
name: 'value',
BluetoothGATTCharacteristic.prototype.addValueChangeListener = function() {
console.log('Entered BluetoothGATTCharacteristic.addValueChangeListener()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
var args = AV.validateMethod(arguments, [{
name: 'callback',
BluetoothGATTDescriptor.prototype.readValue = function() {
console.log('Entered BluetoothGATTDescriptor.readValue()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
var args = AV.validateMethod(arguments, [{
name: 'successCallback',
BluetoothGATTDescriptor.prototype.writeValue = function() {
console.log('Entered BluetoothGATTDescriptor.writeValue()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
var args = AV.validateMethod(arguments, [{
name: 'value',
BluetoothManager.prototype.getLEAdapter = function() {
console.log('Entered BluetoothManager.getLEAdapter()');
- xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH);
+ xwalk.utils.checkPrivilegeAccess(Privilege.BLUETOOTH_ADMIN);
return new BluetoothLEAdapter();
};