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

Commit 48c5057f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Remove flag enumerate_gatt_errors" into main

parents 9af609b0 15a9026a
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -36,14 +36,6 @@ flag {
    bug: "320402249"
}

flag {
    name: "enumerate_gatt_errors"
    is_exported: true
    namespace: "bluetooth"
    description: "Enumerate GATT error situations"
    bug: "320574336"
}

flag {
    name: "gatt_fix_device_busy"
    namespace: "bluetooth"
+1 −1
Original line number Diff line number Diff line
@@ -627,7 +627,7 @@ package android.bluetooth {
    field public static final int CONNECTION_PRIORITY_HIGH = 1; // 0x1
    field public static final int CONNECTION_PRIORITY_LOW_POWER = 2; // 0x2
    field public static final int GATT_CONNECTION_CONGESTED = 143; // 0x8f
    field @FlaggedApi("com.android.bluetooth.flags.enumerate_gatt_errors") public static final int GATT_CONNECTION_TIMEOUT = 147; // 0x93
    field public static final int GATT_CONNECTION_TIMEOUT = 147; // 0x93
    field public static final int GATT_FAILURE = 257; // 0x101
    field public static final int GATT_INSUFFICIENT_AUTHENTICATION = 5; // 0x5
    field public static final int GATT_INSUFFICIENT_AUTHORIZATION = 8; // 0x8
+0 −2
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package android.bluetooth;

import static android.Manifest.permission.BLUETOOTH_CONNECT;

import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.RequiresNoPermission;
@@ -132,7 +131,6 @@ public final class BluetoothGatt implements BluetoothProfile {
     * GATT connection timed out, likely due to the remote device being out of range or not
     * advertising as connectable.
     */
    @FlaggedApi(Flags.FLAG_ENUMERATE_GATT_ERRORS)
    public static final int GATT_CONNECTION_TIMEOUT = 0x93;

    /** A GATT operation failed, errors other than the above */
+0 −1
Original line number Diff line number Diff line
@@ -311,7 +311,6 @@ public class GattClientTest {
    }

    @Test
    @RequiresFlagsEnabled(Flags.FLAG_ENUMERATE_GATT_ERRORS)
    public void connectTimeout() {
        BluetoothDevice device =
                mAdapter.getRemoteLeDevice(
+1 −2
Original line number Diff line number Diff line
@@ -422,8 +422,7 @@ void bta_gattc_open_error(tBTA_GATTC_CLCB* p_clcb, const tBTA_GATTC_DATA* /* p_d
}

void bta_gattc_open_fail(tBTA_GATTC_CLCB* p_clcb, const tBTA_GATTC_DATA* p_data) {
  if (com::android::bluetooth::flags::enumerate_gatt_errors() &&
      p_data->int_conn.reason == GATT_CONN_TIMEOUT) {
  if (p_data->int_conn.reason == GATT_CONN_TIMEOUT) {
    log::warn(
            "Connection timed out after 30 seconds. conn_id=0x{:x}. Return "
            "GATT_CONNECTION_TIMEOUT({})",
Loading