aboutsummaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothAdapter.java
diff options
context:
space:
mode:
authorJakub Pawlowski <jpawlowski@google.com>2016-11-04 15:25:57 -0700
committerAndre Eisenbach <eisenbach@google.com>2016-11-11 23:28:32 +0000
commit976e264b589c692ec33ddd82c7b585b2d830bf69 (patch)
treef421e00be0bfb5ebeb7d68d2a769f0718e23cfa9 /framework/java/android/bluetooth/BluetoothAdapter.java
parentcc8f33963a3b2d3602d6dfea24d16d20c2de1f37 (diff)
Bluetooth: advertising improvements
This patch removes isPeripheralModeSupported(), hidden public method which is always returning true. It also modify the BluetoothLeAdvertiser to be able to use advertising instance with instance id equal 0. Bug: 30622771 Bug: 24099160 Change-Id: Id31582621dbe56d5c3a8d4ee5cd296af66a5f026
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAdapter.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothAdapter.java22
1 files changed, 0 insertions, 22 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java
index 11c27355c7..4271e3f99d 100644
--- a/framework/java/android/bluetooth/BluetoothAdapter.java
+++ b/framework/java/android/bluetooth/BluetoothAdapter.java
@@ -601,10 +601,6 @@ public final class BluetoothAdapter {
*/
public BluetoothLeAdvertiser getBluetoothLeAdvertiser() {
if (!getLeAccess()) return null;
- if (!isMultipleAdvertisementSupported() && !isPeripheralModeSupported()) {
- Log.e(TAG, "Bluetooth LE advertising not supported");
- return null;
- }
synchronized(mLock) {
if (sBluetoothLeAdvertiser == null) {
sBluetoothLeAdvertiser = new BluetoothLeAdvertiser(mManagerService);
@@ -1354,24 +1350,6 @@ public final class BluetoothAdapter {
}
/**
- * Returns whether peripheral mode is supported.
- *
- * @hide
- */
- public boolean isPeripheralModeSupported() {
- if (getState() != STATE_ON) return false;
- try {
- mServiceLock.readLock().lock();
- if (mService != null) return mService.isPeripheralModeSupported();
- } catch (RemoteException e) {
- Log.e(TAG, "failed to get peripheral mode capability: ", e);
- } finally {
- mServiceLock.readLock().unlock();
- }
- return false;
- }
-
- /**
* Return true if offloaded filters are supported
*
* @return true if chipset supports on-chip filtering