summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/aware/WifiAwareNativeApi.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/service/java/com/android/server/wifi/aware/WifiAwareNativeApi.java b/service/java/com/android/server/wifi/aware/WifiAwareNativeApi.java
index b9f3b4f88..a6e724f7d 100644
--- a/service/java/com/android/server/wifi/aware/WifiAwareNativeApi.java
+++ b/service/java/com/android/server/wifi/aware/WifiAwareNativeApi.java
@@ -758,12 +758,12 @@ public class WifiAwareNativeApi implements WifiAwareShellCommand.DelegatedShellC
capabilities.supportedCipherSuites);
req.securityConfig.securityType = NanDataPathSecurityType.PASSPHRASE;
convertNativeByteArrayToArrayList(passphrase.getBytes(), req.securityConfig.passphrase);
+ }
- if (isOutOfBand) { // only relevant when using passphrase
- convertNativeByteArrayToArrayList(
- SERVICE_NAME_FOR_OOB_DATA_PATH.getBytes(StandardCharsets.UTF_8),
- req.serviceNameOutOfBand);
- }
+ if (req.securityConfig.securityType != NanDataPathSecurityType.OPEN && isOutOfBand) {
+ convertNativeByteArrayToArrayList(
+ SERVICE_NAME_FOR_OOB_DATA_PATH.getBytes(StandardCharsets.UTF_8),
+ req.serviceNameOutOfBand);
}
try {
@@ -831,12 +831,12 @@ public class WifiAwareNativeApi implements WifiAwareShellCommand.DelegatedShellC
capabilities.supportedCipherSuites);
req.securityConfig.securityType = NanDataPathSecurityType.PASSPHRASE;
convertNativeByteArrayToArrayList(passphrase.getBytes(), req.securityConfig.passphrase);
+ }
- if (isOutOfBand) { // only relevant when using passphrase
- convertNativeByteArrayToArrayList(
- SERVICE_NAME_FOR_OOB_DATA_PATH.getBytes(StandardCharsets.UTF_8),
- req.serviceNameOutOfBand);
- }
+ if (req.securityConfig.securityType != NanDataPathSecurityType.OPEN && isOutOfBand) {
+ convertNativeByteArrayToArrayList(
+ SERVICE_NAME_FOR_OOB_DATA_PATH.getBytes(StandardCharsets.UTF_8),
+ req.serviceNameOutOfBand);
}
try {