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

Commit 6efcaa48 authored by Natiq Ahmed's avatar Natiq Ahmed Committed by Ricardo Cerqueira
Browse files

Bluetooth: Fix for hash map table entry for Advertisement

Addition of callback to the hash map is been decided based on the
success of multi advertiser callback i.e advertiser callback will be added
iff the advertisment is succesfull.

Conflicts:
	core/java/android/bluetooth/le/BluetoothLeAdvertiser.java

Change-Id: I90e810fdee944c1a82729bdf7fcd9ed26f5eb094
CRs-fixed: 721903
parent aa12a020
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -264,7 +264,9 @@ public final class BluetoothLeAdvertiser {
                    Log.e(TAG, "Failed to start registeration", e);
                }
                if (mClientIf > 0 && mIsAdvertising) {
                    if (!mLeAdvertisers.containsKey(mAdvertiseCallback)) {
                        mLeAdvertisers.put(mAdvertiseCallback, this);
                    }
                } else if (mClientIf <= 0) {
                    // Post internal error if registration failed.
                    postStartFailure(mAdvertiseCallback,
@@ -330,6 +332,9 @@ public final class BluetoothLeAdvertiser {
                        // Start success
                        mIsAdvertising = true;
                        postStartSuccess(mAdvertiseCallback, settings);
                        if (!mLeAdvertisers.containsKey(mAdvertiseCallback)) {
                            mLeAdvertisers.put(mAdvertiseCallback, this);
                        }
                    } else {
                        // Start failure.
                        postStartFailure(mAdvertiseCallback, status);