Merge "LE Maximum Advertising Data Length (1/4)" am: 74f2e1a303

am: 2fc3834f4d

Change-Id: Iad555280f5d702c63c76a2399c8d02ac39749a77
This commit is contained in:
Jakub Pawlowski
2017-03-17 05:26:26 +00:00
committed by android-build-merger
5 changed files with 23 additions and 0 deletions

View File

@@ -6694,6 +6694,7 @@ package android.bluetooth {
method public android.bluetooth.le.BluetoothLeScanner getBluetoothLeScanner();
method public java.util.Set<android.bluetooth.BluetoothDevice> getBondedDevices();
method public static synchronized android.bluetooth.BluetoothAdapter getDefaultAdapter();
method public int getLeMaximumAdvertisingDataLength();
method public java.lang.String getName();
method public android.bluetooth.le.PeriodicAdvertisingManager getPeriodicAdvertisingManager();
method public int getProfileConnectionState(int);

View File

@@ -6992,6 +6992,7 @@ package android.bluetooth {
method public android.bluetooth.le.BluetoothLeScanner getBluetoothLeScanner();
method public java.util.Set<android.bluetooth.BluetoothDevice> getBondedDevices();
method public static synchronized android.bluetooth.BluetoothAdapter getDefaultAdapter();
method public int getLeMaximumAdvertisingDataLength();
method public java.lang.String getName();
method public android.bluetooth.le.PeriodicAdvertisingManager getPeriodicAdvertisingManager();
method public int getProfileConnectionState(int);

View File

@@ -6703,6 +6703,7 @@ package android.bluetooth {
method public android.bluetooth.le.BluetoothLeScanner getBluetoothLeScanner();
method public java.util.Set<android.bluetooth.BluetoothDevice> getBondedDevices();
method public static synchronized android.bluetooth.BluetoothAdapter getDefaultAdapter();
method public int getLeMaximumAdvertisingDataLength();
method public java.lang.String getName();
method public android.bluetooth.le.PeriodicAdvertisingManager getPeriodicAdvertisingManager();
method public int getProfileConnectionState(int);

View File

@@ -1482,6 +1482,25 @@ public final class BluetoothAdapter {
return false;
}
/**
* Return the maximum LE advertising data length,
* if LE Extended Advertising feature is supported.
*
* @return the maximum LE advertising data length.
*/
public int getLeMaximumAdvertisingDataLength() {
if (!getLeAccess()) return 0;
try {
mServiceLock.readLock().lock();
if (mService != null) return mService.getLeMaximumAdvertisingDataLength();
} catch (RemoteException e) {
Log.e(TAG, "failed to get getLeMaximumAdvertisingDataLength, error: ", e);
} finally {
mServiceLock.readLock().unlock();
}
return 0;
}
/**
* Return true if hardware has entries available for matching beacons
*

View File

@@ -108,6 +108,7 @@ interface IBluetooth
boolean isLeCodedPhySupported();
boolean isLeExtendedAdvertisingSupported();
boolean isLePeriodicAdvertisingSupported();
int getLeMaximumAdvertisingDataLength();
BluetoothActivityEnergyInfo reportActivityInfo();
/**