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

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

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

parents 6a8ef37a 72b20a03
Loading
Loading
Loading
Loading
+5 −6
Original line number Original line Diff line number Diff line
@@ -63,7 +63,6 @@ import com.android.bluetooth.btservice.ProfileService;
import com.android.bluetooth.util.NumberUtils;
import com.android.bluetooth.util.NumberUtils;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.annotations.VisibleForTesting;


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


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


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


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