Merge "LE Maximum Advertising Data Length (1/4)"
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
@@ -108,6 +108,7 @@ interface IBluetooth
|
||||
boolean isLeCodedPhySupported();
|
||||
boolean isLeExtendedAdvertisingSupported();
|
||||
boolean isLePeriodicAdvertisingSupported();
|
||||
int getLeMaximumAdvertisingDataLength();
|
||||
BluetoothActivityEnergyInfo reportActivityInfo();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user