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

Commit 67969eff authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix null settings in AdvertiseCallback.onStartSuccess"

parents 6add0e7b 4d6c42f3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ class AdvertiseManager {
        }
    }

    private AdvertiseClient getAdvertiseClient(int advertiserId) {
    public AdvertiseClient getAdvertiseClient(int advertiserId) {
        for (AdvertiseClient client : mAdvertiseClients) {
            if (client.advertiserId == advertiserId) {
                return client;
+3 −1
Original line number Diff line number Diff line
@@ -1193,8 +1193,10 @@ public class GattService extends ProfileService {
        AdvertiserMap.App app = mAdvertiserMap.getById(advertiserId);
        if (app != null) {
            if (status == 0) {
                AdvertiseClient client = mAdvertiseManager.getAdvertiseClient(advertiserId);
                AdvertiseSettings settings = (client == null) ? null : client.settings;
                app.callback.onMultiAdvertiseCallback(AdvertiseCallback.ADVERTISE_SUCCESS,
                        true, null);
                        true, settings);
            } else {
                app.callback.onMultiAdvertiseCallback(
                        AdvertiseCallback.ADVERTISE_FAILED_INTERNAL_ERROR, true, null);