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

Commit 007940ef authored by William Escande's avatar William Escande
Browse files

Trunk Stable/BondStateMachine: Use static flagging

Bug: 323981134
Bug: 316927319
Test: m Bluetooth | mechanical refactor
Change-Id: If418f9b2a50e800a697a395087893aa3ed2d4aff
parent f549ccc6
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -38,8 +38,7 @@ import com.android.bluetooth.Utils;
import com.android.bluetooth.a2dp.A2dpService;
import com.android.bluetooth.a2dpsink.A2dpSinkService;
import com.android.bluetooth.btservice.RemoteDevices.DeviceProperties;
import com.android.bluetooth.flags.FeatureFlags;
import com.android.bluetooth.flags.FeatureFlagsImpl;
import com.android.bluetooth.flags.Flags;
import com.android.bluetooth.hfp.HeadsetService;
import com.android.bluetooth.hfpclient.HeadsetClientService;
import com.android.bluetooth.hid.HidHostService;
@@ -97,8 +96,6 @@ final class BondStateMachine extends StateMachine {

    @VisibleForTesting Set<BluetoothDevice> mPendingBondedDevices = new HashSet<>();

    private final FeatureFlags mFeatureFlags = new FeatureFlagsImpl();

    private BondStateMachine(AdapterService service, AdapterProperties prop,
            RemoteDevices remoteDevices) {
        super("BondStateMachine:");
@@ -153,7 +150,7 @@ final class BondStateMachine extends StateMachine {
                    next pairing is started while previous still makes service discovery, it
                    would fail. Check the busy status of BTIF instead, and wait with starting
                    the bond. */
                    if (mFeatureFlags.delayBondingWhenBusy()
                    if (Flags.delayBondingWhenBusy()
                            && mAdapterService.getNative().pairingIsBusy()) {
                        short retry_no =
                                (msg.getData() != null)