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

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

Merge "LE Maximum Advertising Data Length (1/4)"

am: 74f2e1a303

Change-Id: I3b6599937ddd04a9c13573d156cc721152c0005a
parents e0408caa 1e2d5cb0
Loading
Loading
Loading
Loading
+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();

    /**