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

Commit 587bc87f authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12086619 from c66dcd05 to 24Q4-release

Change-Id: I7675352ed026fd9c34e1c1a6c5c52bd8bd643e70
parents 19fb1120 c66dcd05
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -251,9 +251,6 @@ static void initNative(JNIEnv* env, jobject object, jint maxConnectedAudioDevice
    return;
  }

  log::warn("Cleaning up A2DP Interface before initializing...");
  btif_av_source_cleanup();

  if (mCallbacksObj != nullptr) {
    log::warn("Cleaning up A2DP callback object");
    env->DeleteGlobalRef(mCallbacksObj);
+0 −2
Original line number Diff line number Diff line
@@ -127,8 +127,6 @@ static void initNative(JNIEnv* env, jobject object, jint maxConnectedAudioDevice
    return;
  }

  btif_av_sink_cleanup();

  if (mCallbacksObj != NULL) {
    log::warn("Cleaning up A2DP callback object");
    env->DeleteGlobalRef(mCallbacksObj);
+111 −145

File changed.

Preview size limit exceeded, changes collapsed.

+9 −1
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@ import com.android.bluetooth.btservice.CompanionManager;
import com.android.bluetooth.btservice.MetricsLogger;
import com.android.bluetooth.btservice.ProfileService;
import com.android.bluetooth.flags.Flags;
import com.android.bluetooth.hid.HidHostService;
import com.android.bluetooth.le_scan.TransitionalScanHelper;
import com.android.internal.annotations.VisibleForTesting;

@@ -3387,8 +3388,15 @@ public class GattService extends ProfileService {
        return false;
    }

    private boolean isAndroidHeadtrackerSrvcUuid(final UUID uuid) {
        return HidHostService.ANDROID_HEADTRACKER_UUID.getUuid().equals(uuid);
    }

    private boolean isRestrictedSrvcUuid(final UUID uuid) {
        return isFidoSrvcUuid(uuid) || isAndroidTvRemoteSrvcUuid(uuid) || isLeAudioSrvcUuid(uuid);
        return isFidoSrvcUuid(uuid)
                || isAndroidTvRemoteSrvcUuid(uuid)
                || isLeAudioSrvcUuid(uuid)
                || isAndroidHeadtrackerSrvcUuid(uuid);
    }

    private int getDeviceType(BluetoothDevice device) {
+18 −2
Original line number Diff line number Diff line
@@ -1393,6 +1393,9 @@ public class HeadsetService extends ProfileService {
            mActiveDevice = null;
            mNativeInterface.setActiveDevice(null);
            broadcastActiveDevice(null);
            if (Flags.updateActiveDeviceInBandRingtone()) {
                updateInbandRinging(null, true);
            }
        }
    }

@@ -1469,6 +1472,9 @@ public class HeadsetService extends ProfileService {
                                    BluetoothProfileConnectionInfo.createHfpInfo());
                }
                broadcastActiveDevice(mActiveDevice);
                if (Flags.updateActiveDeviceInBandRingtone()) {
                    updateInbandRinging(device, true);
                }
            } else if (shouldPersistAudio()) {
                /* If HFP is getting active for a phonecall and there is LeAudio device active,
                 * Lets inactive LeAudio device as soon as possible so there is no CISes connected
@@ -1520,6 +1526,9 @@ public class HeadsetService extends ProfileService {
                                    BluetoothProfileConnectionInfo.createHfpInfo());
                }
                broadcastActiveDevice(mActiveDevice);
                if (Flags.updateActiveDeviceInBandRingtone()) {
                    updateInbandRinging(device, true);
                }
            }
        }
        return true;
@@ -2206,8 +2215,13 @@ public class HeadsetService extends ProfileService {
        synchronized (mStateMachines) {
            final boolean inbandRingingRuntimeDisable = mInbandRingingRuntimeDisable;

            mInbandRingingRuntimeDisable =
                    getConnectedDevices().size() > 1 || isHeadsetClientConnected();
            if (getConnectedDevices().size() > 1
                    || isHeadsetClientConnected()
                    || (Flags.updateActiveDeviceInBandRingtone() && mActiveDevice == null)) {
                mInbandRingingRuntimeDisable = true;
            } else {
                mInbandRingingRuntimeDisable = false;
            }

            final boolean updateAll = inbandRingingRuntimeDisable != mInbandRingingRuntimeDisable;

@@ -2216,6 +2230,8 @@ public class HeadsetService extends ProfileService {
                    "updateInbandRinging():"
                            + " Device="
                            + device
                            + " ActiveDevice="
                            + mActiveDevice
                            + " enabled="
                            + !mInbandRingingRuntimeDisable
                            + " connected="
Loading