diff options
author | Nick Pelly <npelly@google.com> | 2009-09-24 11:14:15 -0700 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2009-09-24 19:34:54 -0700 |
commit | 18b1e79a123b979d25bfa5d0b0ee5d0382dbd64b (patch) | |
tree | e0d6ccb1c8c3c7b6a653253f0b98a416f3521025 /core/java/android/server/BluetoothService.java | |
parent | cc89ef3d6e9b1f9be657c9158ad04b8de104434c (diff) | |
download | frameworks_base-18b1e79a123b979d25bfa5d0b0ee5d0382dbd64b.zip frameworks_base-18b1e79a123b979d25bfa5d0b0ee5d0382dbd64b.tar.gz frameworks_base-18b1e79a123b979d25bfa5d0b0ee5d0382dbd64b.tar.bz2 |
Bluetooth API: Do not allow apps to programmatically make BT discoverable.
Instead add ACTION_REQUEST_DISCOVERABLE for the system to show a dialog to
adjust discoverable mode.
Also remove createBond(), removeBond() and cancelBondProcess(). The Settings
App already handles these automatically when connections require bonding.
Change-Id: I216154cd1b6de410de64ba91b07d7263ac03e8df
Diffstat (limited to 'core/java/android/server/BluetoothService.java')
-rw-r--r-- | core/java/android/server/BluetoothService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java index e5b20bd..de14b5b 100644 --- a/core/java/android/server/BluetoothService.java +++ b/core/java/android/server/BluetoothService.java @@ -680,8 +680,8 @@ public class BluetoothService extends IBluetooth.Stub { } public synchronized boolean setScanMode(int mode) { - mContext.enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, - "Need BLUETOOTH_ADMIN permission"); + mContext.enforceCallingOrSelfPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS, + "Need WRITE_SECURE_SETTINGS permission"); boolean pairable = false; boolean discoverable = false; switch (mode) { |