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

Commit 9d6b25da authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12037182 from b7f70557 to 24Q4-release

Change-Id: Icc0a2aa5ed951a8bfa9dc68b316d3ede393715da
parents 39040ed0 b7f70557
Loading
Loading
Loading
Loading
+7 −5
Original line number Original line Diff line number Diff line
@@ -241,12 +241,11 @@ public class GattService extends ProfileService {
            Log.w(TAG, "stop() called before start()");
            Log.w(TAG, "stop() called before start()");
            return;
            return;
        }
        }

        if (Flags.scanManagerRefactor()) {
        if (Flags.scanManagerRefactor()) {
            setGattService(null);
            setGattService(null);
        }
        } else {

            mTransitionalScanHelper.stop();
            mTransitionalScanHelper.stop();
        }
        mAdvertiserMap.clear();
        mAdvertiserMap.clear();
        mClientMap.clear();
        mClientMap.clear();
        if (Flags.gattCleanupRestrictedHandles()) {
        if (Flags.gattCleanupRestrictedHandles()) {
@@ -271,8 +270,10 @@ public class GattService extends ProfileService {
        if (mDistanceMeasurementManager != null) {
        if (mDistanceMeasurementManager != null) {
            mDistanceMeasurementManager.cleanup();
            mDistanceMeasurementManager.cleanup();
        }
        }
        if (!Flags.scanManagerRefactor()) {
            mTransitionalScanHelper.cleanup();
            mTransitionalScanHelper.cleanup();
        }
        }
    }


    /** This is only used when Flags.scanManagerRefactor() is true. */
    /** This is only used when Flags.scanManagerRefactor() is true. */
    public static synchronized GattService getGattService() {
    public static synchronized GattService getGattService() {
@@ -306,7 +307,8 @@ public class GattService extends ProfileService {
                        new Handler(getMainLooper()) {
                        new Handler(getMainLooper()) {
                            public void handleMessage(Message msg) {
                            public void handleMessage(Message msg) {
                                synchronized (mTestModeLock) {
                                synchronized (mTestModeLock) {
                                    if (!GattService.this.isTestModeEnabled()) {
                                    if (!GattService.this.isTestModeEnabled()
                                            || Flags.scanManagerRefactor()) {
                                        return;
                                        return;
                                    }
                                    }
                                    for (String test : TEST_MODE_BEACONS) {
                                    for (String test : TEST_MODE_BEACONS) {
+10 −0
Original line number Original line Diff line number Diff line
@@ -209,3 +209,13 @@ flag {
    description: "Allocate GATT clients in heap to unlimit the number of clients"
    description: "Allocate GATT clients in heap to unlimit the number of clients"
    bug: "348559823"
    bug: "348559823"
}
}

flag {
    name: "gatt_fix_multiple_direct_connect"
    namespace: "bluetooth"
    description: "Do not remove device when multiple clients attempt to connect"
    bug: "349232327"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}
+2 −1
Original line number Original line Diff line number Diff line
@@ -1106,7 +1106,7 @@ class HearingAidImpl : public HearingAid {
        /// The L2CAP will automatically reconnect the LE-ACL link on
        /// The L2CAP will automatically reconnect the LE-ACL link on
        /// disconnection when there is a pending channel request,
        /// disconnection when there is a pending channel request,
        /// which invalidates all encryption checks performed here.
        /// which invalidates all encryption checks performed here.
        com::android::bluetooth::flags::asha_asrc()
        com::android::bluetooth::flags::asha_encrypted_l2c_coc()
            ? BTM_SEC_IN_ENCRYPT | BTM_SEC_OUT_ENCRYPT
            ? BTM_SEC_IN_ENCRYPT | BTM_SEC_OUT_ENCRYPT
            : BTM_SEC_NONE,
            : BTM_SEC_NONE,
        HearingAidImpl::GapCallbackStatic, BT_TRANSPORT_LE);
        HearingAidImpl::GapCallbackStatic, BT_TRANSPORT_LE);
@@ -1953,6 +1953,7 @@ class HearingAidImpl : public HearingAid {
    audio_running = false;
    audio_running = false;
    encoder_state_release();
    encoder_state_release();
    current_volume = VOLUME_UNKNOWN;
    current_volume = VOLUME_UNKNOWN;
    ResetAsrc();
  }
  }


  void SetVolume(int8_t volume) {
  void SetVolume(int8_t volume) {