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

Commit 1c077d83 authored by Omair Kamil's avatar Omair Kamil Committed by Gerrit Code Review
Browse files

Merge "Remove flag ble_check_data_length_on_legacy_advertising" into main

parents 817ba73a d35d4791
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -53,16 +53,6 @@ flag {
    }
}

flag {
    name: "ble_check_data_length_on_legacy_advertising"
    namespace: "bluetooth"
    description: "Add data length checks for legacy advertising"
    bug: "329011868"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "scan_record_manufacturer_data_merge"
    namespace: "bluetooth"
+0 −9
Original line number Diff line number Diff line
@@ -24,13 +24,9 @@ import android.bluetooth.le.AdvertisingSetCallback;
import android.bluetooth.le.AdvertisingSetParameters;
import android.bluetooth.le.BluetoothLeAdvertiser;
import android.os.ParcelUuid;
import android.platform.test.annotations.RequiresFlagsEnabled;
import android.platform.test.flag.junit.CheckFlagsRule;
import android.platform.test.flag.junit.DeviceFlagsValueProvider;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import com.android.bluetooth.flags.Flags;
import com.android.compatibility.common.util.AdoptShellPermissionsRule;

import org.junit.Rule;
@@ -48,10 +44,6 @@ public class LeLegacyAdvertisingTest {
    @Rule(order = 1)
    public final AdoptShellPermissionsRule mPermissionRule = new AdoptShellPermissionsRule();

    @Rule(order = 0)
    public final CheckFlagsRule mCheckFlagsRule = DeviceFlagsValueProvider.createCheckFlagsRule();

    @RequiresFlagsEnabled(Flags.FLAG_BLE_CHECK_DATA_LENGTH_ON_LEGACY_ADVERTISING)
    @Test
    public void setAdvertisingDataOver31Bytes() throws Exception {
        final BluetoothLeAdvertiser advertiser =
@@ -103,7 +95,6 @@ public class LeLegacyAdvertisingTest {
        }
    }

    @RequiresFlagsEnabled(Flags.FLAG_BLE_CHECK_DATA_LENGTH_ON_LEGACY_ADVERTISING)
    @Test
    public void setScanResponseDataOver31Bytes() throws Exception {
        final BluetoothLeAdvertiser advertiser =
+3 −5
Original line number Diff line number Diff line
@@ -1139,9 +1139,7 @@ struct LeAdvertisingManager::impl : public bluetooth::hci::LeAddressManagerCallb
          data_len += data[i].size();
        }

        int maxDataLength =
                (com::android::bluetooth::flags::ble_check_data_length_on_legacy_advertising() &&
                 advertising_sets_[advertiser_id].is_legacy)
        int maxDataLength = advertising_sets_[advertiser_id].is_legacy
                                    ? kLeMaximumLegacyAdvertisingDataLength
                                    : le_maximum_advertising_data_length_;