summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorGlen Kuhne <kuh@google.com>2017-05-12 17:35:36 -0700
committerGlen Kuhne <kuh@google.com>2017-05-16 10:17:52 -0700
commitc5f4b2597df6284d35d2f3af8fb35f72e140c5a7 (patch)
tree4712e3a4791696d571e898e0ed6f754bb0d41a09 /service
parente9b2112d2fe1c9b87c1bab2c52d3b33e6b3bcfb5 (diff)
P2P: Fix onServiceDiscovery callback param parsing
onServiceDiscovery was incorrectly constructing a legacy style supplicant ctrl-iface event string to pass to WifiP2pServiceResponse.newInstance. Modified newInstance to just receive the raw HIDL parameters, and skip the string construction and deconstruction. Bug: 38174469 Test: CtsVerifier Service Discovery Requester & unit test Change-Id: I7872d3575f44e8a29b43dffd8fb083022a5a415f
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallback.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallback.java b/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallback.java
index 56d5fc8d3..802f6435c 100644
--- a/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallback.java
+++ b/service/java/com/android/server/wifi/p2p/SupplicantP2pIfaceCallback.java
@@ -448,18 +448,14 @@ public class SupplicantP2pIfaceCallback extends ISupplicantP2pIfaceCallback.Stub
logd("Service discovery response received on " + mInterface);
try {
- StringBuilder event = new StringBuilder();
- event.append(NativeUtil.macAddressFromByteArray(srcAddress));
- event.append(" ");
- event.append(updateIndicator);
- event.append(" ");
- event.append(NativeUtil.stringFromByteArrayList(tlvs));
- response = WifiP2pServiceResponse.newInstance(event.toString());
+ String srcAddressStr = NativeUtil.macAddressFromByteArray(srcAddress);
+ // updateIndicator is not used
+ response = WifiP2pServiceResponse.newInstance(srcAddressStr,
+ NativeUtil.byteArrayFromArrayList(tlvs));
} catch (Exception e) {
Log.e(TAG, "Could not process service discovery response.", e);
return;
}
-
mMonitor.broadcastP2pServiceDiscoveryResponse(mInterface, response);
}