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

Commit 5e018eb7 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun Committed by Gerrit Code Review
Browse files

Merge "Remove gatt_fix_device_busy flag" into main

parents 26b0cdad 9cc8e7c2
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -29,13 +29,6 @@ flag {
    bug: "317128464"
}

flag {
    name: "gatt_fix_device_busy"
    namespace: "bluetooth"
    description: "Fix device busy bug in BluetoothGatt"
    bug: "322580271"
}

flag {
    name: "gatt_cleanup_restricted_handles"
    namespace: "bluetooth"
+3 −7
Original line number Diff line number Diff line
@@ -35,8 +35,6 @@ import android.os.ParcelUuid;
import android.os.RemoteException;
import android.util.Log;

import com.android.bluetooth.flags.Flags;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
@@ -1646,13 +1644,11 @@ public final class BluetoothGatt implements BluetoothProfile {
            }
            throw e.rethrowAsRuntimeException();
        }
        if (Flags.gattFixDeviceBusy()) {
        if (requestStatus != BluetoothStatusCodes.SUCCESS) {
            synchronized (mDeviceBusyLock) {
                mDeviceBusy = false;
            }
        }
        }

        return requestStatus;
    }
+0 −3
Original line number Diff line number Diff line
@@ -327,11 +327,8 @@ public class GattClientTest {
                        eq(BluetoothProfile.STATE_DISCONNECTED));
    }

    @RequiresFlagsEnabled(Flags.FLAG_GATT_FIX_DEVICE_BUSY)
    @Test
    public void consecutiveWriteCharacteristicFails_thenSuccess() throws Exception {
        Assume.assumeTrue(Flags.gattFixDeviceBusy());

        registerGattService();

        BluetoothGattCallback gattCallback = mock(BluetoothGattCallback.class);