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

Commit 1436ca27 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Andre Eisenbach
Browse files

Fix null settings in AdvertiseCallback.onStartSuccess

Test: acts FilteringTest
Bug: 33171815
Bug: 30622771
Change-Id: Ib3df1d13535999ede0e820651fc6d69daeb8ef17
parent ae6901bf
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);