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

Commit 33c36f3d authored by Arthur Hsu's avatar Arthur Hsu Committed by android-build-merger
Browse files

Merge "GattServer: Check for null for mServerMap.connIdByAddress" am: 76903569

am: 22e37239

Change-Id: Ide90912e9d4ba115e7703ecc88cbe2333356c1ba
parents 667a965f 22e37239
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -63,7 +63,6 @@ import com.android.bluetooth.btservice.ProfileService;
import com.android.bluetooth.util.NumberUtils;
import com.android.internal.annotations.VisibleForTesting;

import java.security.Security;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -2890,9 +2889,9 @@ public class GattService extends ProfileService {
            handle = entry.handle;
        }

        int connId = mServerMap.connIdByAddress(serverIf, address);
        gattServerSendResponseNative(serverIf, connId, requestId, (byte) status, handle, offset,
                value, (byte) 0);
        Integer connId = mServerMap.connIdByAddress(serverIf, address);
        gattServerSendResponseNative(serverIf, connId != null ? connId : 0, requestId,
                (byte) status, handle, offset, value, (byte) 0);
        mHandleMap.deleteRequest(requestId);
    }

@@ -2903,8 +2902,8 @@ public class GattService extends ProfileService {
            Log.d(TAG, "sendNotification() - address=" + address + " handle=" + handle);
        }

        int connId = mServerMap.connIdByAddress(serverIf, address);
        if (connId == 0) {
        Integer connId = mServerMap.connIdByAddress(serverIf, address);
        if (connId == null || connId == 0) {
            return;
        }