Parsing 6G and HE supported capabilitiesfrom the HAL

Bug: 303287037
Test: atest com.android.serevr.wifi
Change-Id: I1738aa250285483d969c2275a608fbe9ce9ce7b1
diff --git a/service/java/com/android/server/wifi/aware/Capabilities.java b/service/java/com/android/server/wifi/aware/Capabilities.java
index b6f1ac2..f97d36d 100644
--- a/service/java/com/android/server/wifi/aware/Capabilities.java
+++ b/service/java/com/android/server/wifi/aware/Capabilities.java
@@ -48,6 +48,8 @@
     public boolean isNanPairingSupported;
     public boolean isSetClusterIdSupported;
     public boolean isSuspensionSupported;
+    public boolean is6gSupported;
+    public boolean isHeSupported;
 
     /**
      * Converts the internal capabilities to a parcelable & potentially app-facing
@@ -99,21 +101,46 @@
 
     @Override
     public String toString() {
-        return "Capabilities [maxConcurrentAwareClusters=" + maxConcurrentAwareClusters
-                + ", maxPublishes=" + maxPublishes + ", maxSubscribes=" + maxSubscribes
-                + ", maxServiceNameLen=" + maxServiceNameLen + ", maxMatchFilterLen="
-                + maxMatchFilterLen + ", maxTotalMatchFilterLen=" + maxTotalMatchFilterLen
-                + ", maxServiceSpecificInfoLen=" + maxServiceSpecificInfoLen
-                + ", maxExtendedServiceSpecificInfoLen=" + maxExtendedServiceSpecificInfoLen
-                + ", maxNdiInterfaces=" + maxNdiInterfaces + ", maxNdpSessions="
-                + maxNdpSessions + ", maxAppInfoLen=" + maxAppInfoLen
-                + ", maxQueuedTransmitMessages=" + maxQueuedTransmitMessages
-                + ", maxSubscribeInterfaceAddresses=" + maxSubscribeInterfaceAddresses
-                + ", supportedCipherSuites=" + supportedDataPathCipherSuites
-                + ", isInstantCommunicationModeSupport=" + isInstantCommunicationModeSupported
-                + ", isNanPairingSupported=" + isNanPairingSupported
-                + ", isSetClusterIdSupported=" + isSetClusterIdSupported
-                + ", isSuspensionSupported=" + isSuspensionSupported
+        return "Capabilities [maxConcurrentAwareClusters="
+                + maxConcurrentAwareClusters
+                + ", maxPublishes="
+                + maxPublishes
+                + ", maxSubscribes="
+                + maxSubscribes
+                + ", maxServiceNameLen="
+                + maxServiceNameLen
+                + ", maxMatchFilterLen="
+                + maxMatchFilterLen
+                + ", maxTotalMatchFilterLen="
+                + maxTotalMatchFilterLen
+                + ", maxServiceSpecificInfoLen="
+                + maxServiceSpecificInfoLen
+                + ", maxExtendedServiceSpecificInfoLen="
+                + maxExtendedServiceSpecificInfoLen
+                + ", maxNdiInterfaces="
+                + maxNdiInterfaces
+                + ", maxNdpSessions="
+                + maxNdpSessions
+                + ", maxAppInfoLen="
+                + maxAppInfoLen
+                + ", maxQueuedTransmitMessages="
+                + maxQueuedTransmitMessages
+                + ", maxSubscribeInterfaceAddresses="
+                + maxSubscribeInterfaceAddresses
+                + ", supportedCipherSuites="
+                + supportedDataPathCipherSuites
+                + ", isInstantCommunicationModeSupport="
+                + isInstantCommunicationModeSupported
+                + ", isNanPairingSupported="
+                + isNanPairingSupported
+                + ", isSetClusterIdSupported="
+                + isSetClusterIdSupported
+                + ", isSuspensionSupported="
+                + isSuspensionSupported
+                + ", is6gSupported="
+                + is6gSupported
+                + ", isHeSupported="
+                + isHeSupported
                 + "]";
     }
 }
diff --git a/service/java/com/android/server/wifi/hal/WifiNanIfaceCallbackAidlImpl.java b/service/java/com/android/server/wifi/hal/WifiNanIfaceCallbackAidlImpl.java
index d80c868..f9967c8 100644
--- a/service/java/com/android/server/wifi/hal/WifiNanIfaceCallbackAidlImpl.java
+++ b/service/java/com/android/server/wifi/hal/WifiNanIfaceCallbackAidlImpl.java
@@ -681,7 +681,8 @@
         frameworkCapabilities.isNanPairingSupported = capabilities.supportsPairing;
         frameworkCapabilities.isSetClusterIdSupported = capabilities.supportsSetClusterId;
         frameworkCapabilities.isSuspensionSupported = capabilities.supportsSuspension;
-
+        frameworkCapabilities.is6gSupported = capabilities.supports6g;
+        frameworkCapabilities.isHeSupported = capabilities.supportsHe;
         return frameworkCapabilities;
     }
 
diff --git a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
index 0aea619..36387c1 100644
--- a/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
+++ b/service/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareStateManagerTest.java
@@ -5649,6 +5649,8 @@
         cap.isSuspensionSupported = true;
         cap.isNanPairingSupported = true;
         cap.isSetClusterIdSupported = true;
+        cap.isHeSupported = true;
+        cap.is6gSupported = true;
         return cap;
     }