Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7800604d authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Merge "LE Maximum Advertising Data Length (1/4)" am: 74f2e1a3 am: 2fc3834f

am: 066e8551

Change-Id: If9ee85705e7c47820e23ad79a048e4c04c4cc11a
parents 9d755c04 066e8551
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7122,6 +7122,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);
+1 −0
Original line number Diff line number Diff line
@@ -7591,6 +7591,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);
+1 −0
Original line number Diff line number Diff line
@@ -7149,6 +7149,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);
+19 −0
Original line number Diff line number Diff line
@@ -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
     *
+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ interface IBluetooth
    boolean isLeCodedPhySupported();
    boolean isLeExtendedAdvertisingSupported();
    boolean isLePeriodicAdvertisingSupported();
    int getLeMaximumAdvertisingDataLength();
    BluetoothActivityEnergyInfo reportActivityInfo();

    /**