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

Commit eb3114f9 authored by tadvana's avatar tadvana
Browse files

Update closeRfcommServer api to stopRfcommServer

There was an API introduced to create an RFCOMM server socket called
startRfcommServer. Its companion call to shutdown the server was
originally named closeRfcommServer. This is not consistent with the
start name, and this change updates the API to rename it to be
stopRfcommServer instead.

Tag: #feature
Test: Run the background rfcomm CtsVerifier test with an updated version
of CtsVerifier that uses the new API.
Bug: 218494317

Change-Id: I503ceac84af086cdea8a6a0cc7965f1ba5366c53
parent 7877195a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ package android.bluetooth {

  public final class BluetoothAdapter {
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean addOnMetadataChangedListener(@NonNull android.bluetooth.BluetoothDevice, @NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothAdapter.OnMetadataChangedListener);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int closeRfcommServer(@NonNull java.util.UUID);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean disable(boolean);
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean disableBLE();
    method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean enableBLE();
@@ -78,6 +77,7 @@ package android.bluetooth {
    method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public android.bluetooth.BluetoothSocket retrieveConnectedRfcommSocket(@NonNull java.util.UUID);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean setActiveDevice(@NonNull android.bluetooth.BluetoothDevice, int);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int startRfcommServer(@NonNull String, @NonNull java.util.UUID, @NonNull android.app.PendingIntent);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int stopRfcommServer(@NonNull java.util.UUID);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean unregisterBluetoothConnectionCallback(@NonNull android.bluetooth.BluetoothAdapter.BluetoothConnectionCallback);
    method public void unregisterServiceLifecycleCallback(@NonNull android.bluetooth.BluetoothAdapter.ServiceLifecycleCallback);
    field public static final String ACTION_BLE_STATE_CHANGED = "android.bluetooth.adapter.action.BLE_STATE_CHANGED";
+1 −1
Original line number Diff line number Diff line
@@ -3116,7 +3116,7 @@ public final class BluetoothAdapter {
            android.Manifest.permission.BLUETOOTH_PRIVILEGED,
    })
    @RfcommListenerResult
    public int closeRfcommServer(@NonNull UUID uuid) {
    public int stopRfcommServer(@NonNull UUID uuid) {
        try {
            final SynchronousResultReceiver<Integer> recv = new SynchronousResultReceiver();
            mService.stopRfcommListener(new ParcelUuid(uuid), mAttributionSource, recv);