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

Commit 2da9d795 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Change isCISCentralSupported() to isLeAudioSupported() API" am:...

Merge "Change isCISCentralSupported() to isLeAudioSupported() API" am: 62749e87 am: d954a3dd am: 2a756fc3 am: a780e58b

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1906211

Change-Id: I876a8e86a13e4d10c7f26b8032a66bbfe117eba2
parents e3c03312 a780e58b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -8757,10 +8757,10 @@ package android.bluetooth {
    method public android.bluetooth.BluetoothDevice getRemoteDevice(byte[]);
    method public android.bluetooth.BluetoothDevice getRemoteDevice(byte[]);
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public int getScanMode();
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public int getScanMode();
    method public int getState();
    method public int getState();
    method public int isCisCentralSupported();
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean isDiscovering();
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean isDiscovering();
    method public boolean isEnabled();
    method public boolean isEnabled();
    method public boolean isLe2MPhySupported();
    method public boolean isLe2MPhySupported();
    method public int isLeAudioSupported();
    method public boolean isLeCodedPhySupported();
    method public boolean isLeCodedPhySupported();
    method public boolean isLeExtendedAdvertisingSupported();
    method public boolean isLeExtendedAdvertisingSupported();
    method public boolean isLePeriodicAdvertisingSupported();
    method public boolean isLePeriodicAdvertisingSupported();
+5 −5
Original line number Original line Diff line number Diff line
@@ -2261,21 +2261,21 @@ public final class BluetoothAdapter {
    public @interface LeFeatureReturnValues {}
    public @interface LeFeatureReturnValues {}


    /**
    /**
     * Returns {@link BluetoothStatusCodes#SUCCESS} if LE Connected Isochronous Stream Central
     * Returns {@link BluetoothStatusCodes#SUCCESS} if the LE audio feature is
     * feature is supported, returns {@link BluetoothStatusCodes#ERROR_FEATURE_NOT_SUPPORTED} if
     * supported, returns {@link BluetoothStatusCodes#ERROR_FEATURE_NOT_SUPPORTED} if
     * the feature is not supported or an error code.
     * the feature is not supported or an error code.
     *
     *
     * @return whether the chipset supports the LE Connected Isochronous Stream Central feature
     * @return whether the LE audio is supported
     */
     */
    @RequiresNoPermission
    @RequiresNoPermission
    public @LeFeatureReturnValues int isCisCentralSupported() {
    public @LeFeatureReturnValues int isLeAudioSupported() {
        if (!getLeAccess()) {
        if (!getLeAccess()) {
            return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED;
            return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED;
        }
        }
        try {
        try {
            mServiceLock.readLock().lock();
            mServiceLock.readLock().lock();
            if (mService != null) {
            if (mService != null) {
                return mService.isCisCentralSupported();
                return mService.isLeAudioSupported();
            }
            }
        } catch (RemoteException e) {
        } catch (RemoteException e) {
            e.rethrowFromSystemServer();
            e.rethrowFromSystemServer();