Expose RTT capability APIs for secure RTT.

Bug: 28199253
Change-Id: I790b72a365f788ef225566e7fc13b3e097f346b2
diff --git a/api/system-current.txt b/api/system-current.txt
index 56b2f58..2e602ee 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -26372,9 +26372,11 @@
     field public int bwSupported;
     field public boolean lciSupported;
     field public boolean lcrSupported;
+    field public int mcVersion;
     field public boolean oneSidedRttSupported;
     field public int preambleSupported;
     field public boolean responderSupported;
+    field public boolean secureRttSupported;
     field public deprecated boolean supportedPeerType;
     field public deprecated boolean supportedType;
     field public boolean twoSided11McRttSupported;
diff --git a/wifi/java/android/net/wifi/RttManager.java b/wifi/java/android/net/wifi/RttManager.java
index 87fc7fa..2579d9f 100644
--- a/wifi/java/android/net/wifi/RttManager.java
+++ b/wifi/java/android/net/wifi/RttManager.java
@@ -199,6 +199,12 @@
         // Whether STA responder role is supported.
         public boolean responderSupported;
 
+        /** Whether the secure RTT protocol is supported. */
+        public boolean secureRttSupported;
+
+        /** Draft 11mc version supported, including major and minor version. e.g, draft 4.3 is 43 */
+        public int mcVersion;
+
         @Override
         public String toString() {
             StringBuffer sb = new StringBuffer();
@@ -223,7 +229,7 @@
                 sb.append("VHT ");
             }
 
-            sb.append("is supported. \n");
+            sb.append("is supported. ");
 
             if ((bwSupported & RTT_BW_5_SUPPORT) != 0) {
                 sb.append("5 MHz ");
@@ -252,7 +258,10 @@
             sb.append("is supported.");
 
             sb.append(" STA responder role is ")
-                .append(responderSupported ? "supported" : "not supported.");
+                    .append(responderSupported ? "supported" : "not supported");
+            sb.append(" Secure RTT protocol is ")
+                    .append(secureRttSupported ? "supported" : "not supported");
+            sb.append(" 11mc version is " + mcVersion);
 
             return sb.toString();
         }
@@ -272,6 +281,8 @@
             dest.writeInt(preambleSupported);
             dest.writeInt(bwSupported);
             dest.writeInt(responderSupported ? 1 : 0);
+            dest.writeInt(secureRttSupported ? 1 : 0);
+            dest.writeInt(mcVersion);
         }
 
         /** Implement the Parcelable interface {@hide} */
@@ -279,16 +290,18 @@
             new Creator<RttCapabilities>() {
             @Override
             public RttCapabilities createFromParcel(Parcel in) {
-                    RttCapabilities capabilities = new RttCapabilities();
-                    capabilities.oneSidedRttSupported = (in.readInt() == 1);
-                        capabilities.twoSided11McRttSupported = (in.readInt() == 1);
-                        capabilities.lciSupported = (in.readInt() == 1);
-                        capabilities.lcrSupported = (in.readInt() == 1);
-                        capabilities.preambleSupported = in.readInt();
-                        capabilities.bwSupported = in.readInt();
-                        capabilities.responderSupported = (in.readInt() == 1);
-                        return capabilities;
-                    }
+                RttCapabilities capabilities = new RttCapabilities();
+                capabilities.oneSidedRttSupported = (in.readInt() == 1);
+                capabilities.twoSided11McRttSupported = (in.readInt() == 1);
+                capabilities.lciSupported = (in.readInt() == 1);
+                capabilities.lcrSupported = (in.readInt() == 1);
+                capabilities.preambleSupported = in.readInt();
+                capabilities.bwSupported = in.readInt();
+                capabilities.responderSupported = (in.readInt() == 1);
+                capabilities.secureRttSupported = (in.readInt() == 1);
+                capabilities.mcVersion = in.readInt();
+                return capabilities;
+            }
                 /** Implement the Parcelable interface {@hide} */
                 @Override
                 public RttCapabilities[] newArray(int size) {