Fix a test related to GATT client that could never succeed
Caught by Error Prone:
warning: [CollectionIncompatibleType] Argument 'clientIf' should not be
passed to this method; its type int is not compatible with its
collection's type argument AdvertiseClient.
Bug: 27723540
Change-Id: I395b17a46c3734afd0f49866b7aa0bd0f1c6cef4
(cherry picked from commit c6064ccebc5f55b49628296ce578288b3ad704e1)
diff --git a/src/com/android/bluetooth/gatt/AdvertiseManager.java b/src/com/android/bluetooth/gatt/AdvertiseManager.java
index 91932bb..a53eb41 100644
--- a/src/com/android/bluetooth/gatt/AdvertiseManager.java
+++ b/src/com/android/bluetooth/gatt/AdvertiseManager.java
@@ -184,7 +184,7 @@
private void handleStartAdvertising(AdvertiseClient client) {
Utils.enforceAdminPermission(mService);
int clientIf = client.clientIf;
- if (mAdvertiseClients.contains(clientIf)) {
+ if (mAdvertiseClients.contains(client)) {
postCallback(clientIf, AdvertiseCallback.ADVERTISE_FAILED_ALREADY_STARTED);
return;
}