[automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: af72b58623 -s ours

am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/NetworkStack/+/23667519

Change-Id: Ibc4f85fb75af82fb5f0e869b1a6bd6392097a076
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/Android.bp b/Android.bp
index e10a30e..1467315 100644
--- a/Android.bp
+++ b/Android.bp
@@ -45,6 +45,10 @@
     default_applicable_licenses: ["Android-Apache-2.0"],
 }
 
+// In some branches, this may be module_current instead of module_34 if the SDK prebuilts are not
+// yet dropped there, meaning module_34 cannot be used yet.
+module_34_version = "module_34"
+
 // TODO: remove this default and replace with ConnectivityNextEnableDefaults. This will need to be
 // done separately in each branch due to merge conflicts.
 // Defaults to enable/disable java targets that depend on
@@ -76,14 +80,15 @@
 java_defaults {
     name: "NetworkStackReleaseTargetSdk",
     min_sdk_version: "29",
-    target_sdk_version: "33",
+    target_sdk_version: "34",
 }
 
 java_defaults {
     name: "NetworkStackReleaseApiLevel",
     defaults:["NetworkStackReleaseTargetSdk"],
-    sdk_version: "module_33",
+    sdk_version: module_34_version,
     libs: [
+        "framework-configinfrastructure",
         "framework-connectivity",
         "framework-connectivity-t",
         "framework-statsd",
@@ -194,16 +199,9 @@
     visibility: ["//visibility:private"],
 }
 
-// Shims for APIs being added to the current development version of Android. These APIs are not
-// stable and have no defined version number. These could be called 10000, but they use the next
-// integer so if the next SDK release happens to use that integer, we don't need to rename them.
-// Jarjar rules are generated based on the stable shims, which do not contain this library. As a
-// result, no static_lib that needs jarjar should be used here. In general, static_libs should not
-// be used in this library at all; instead they can be in one of the earlier, shim libraries which
-// are part of the stable shims and scanned when generating jarjar rules.
 java_library {
     name: "NetworkStackApi34Shims",
-    defaults: ["NetworkStackShimsDefaults", "ConnectivityNextEnableDefaults"],
+    defaults: ["NetworkStackShimsDefaults"],
     srcs: [
         "apishim/34/**/*.java",
     ],
@@ -219,6 +217,36 @@
         "framework-tethering",
         "android.net.ipsec.ike.stubs.module_lib"
     ],
+    sdk_version: module_34_version,
+    visibility: ["//visibility:private"],
+}
+
+// Shims for APIs being added to the current development version of Android. These APIs are not
+// stable and have no defined version number. These could be called 10000, but they use the next
+// integer so if the next SDK release happens to use that integer, we don't need to rename them.
+// Jarjar rules are generated based on the stable shims, which do not contain this library. As a
+// result, no static_lib that needs jarjar should be used here. In general, static_libs should not
+// be used in this library at all; instead they can be in one of the earlier, shim libraries which
+// are part of the stable shims and scanned when generating jarjar rules.
+java_library {
+    name: "NetworkStackApi35Shims",
+    defaults: ["NetworkStackShimsDefaults", "ConnectivityNextEnableDefaults"],
+    srcs: [
+        "apishim/35/**/*.java",
+    ],
+    libs: [
+        "NetworkStackShimsCommon",
+        "NetworkStackApi29Shims",
+        "NetworkStackApi30Shims",
+        "NetworkStackApi31Shims",
+        "NetworkStackApi33Shims",
+        "NetworkStackApi34Shims",
+        "framework-bluetooth",
+        "framework-connectivity",
+        "framework-connectivity-t.stubs.module_lib",
+        "framework-tethering",
+        "android.net.ipsec.ike.stubs.module_lib"
+    ],
     sdk_version: "module_current",
     visibility: ["//visibility:private"],
 }
@@ -240,6 +268,7 @@
         "NetworkStackApi31Shims",
         "NetworkStackApi33Shims",
         "NetworkStackApi34Shims",
+        "NetworkStackApi35Shims",
     ],
     visibility: [
         "//packages/modules/Connectivity/Tethering",
@@ -261,6 +290,7 @@
         "NetworkStackApi30Shims",
         "NetworkStackApi31Shims",
         "NetworkStackApi33Shims",
+        "NetworkStackApi34Shims",
     ],
     jarjar_rules: "apishim/jarjar-rules-compat.txt",
     visibility: [
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 9fe8b1d..259a403 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -16,11 +16,13 @@
  * limitations under the License.
  */
 -->
+
+<!-- versionCode is set to placeholder module version which will
+     be replaced during build. Do not change it!  -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
   package="com.android.networkstack"
   android:sharedUserId="android.uid.networkstack"
-  android:versionCode="339990000"
-  android:versionName="339990000"
+  android:versionCode="0"
   coreApp="true"
 >
     <!--- Defines the MAINLINE_NETWORK_STACK permission used by the networkstack process. -->
diff --git a/AndroidManifest_Next.xml b/AndroidManifest_Next.xml
index 200a921..9a09509 100644
--- a/AndroidManifest_Next.xml
+++ b/AndroidManifest_Next.xml
@@ -17,7 +17,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="com.android.networkstack"
           android:sharedUserId="android.uid.networkstack"
-          android:versionCode="339990000"
+          android:versionCode="0"
           android:versionName="T-next"
           coreApp="true">
 </manifest>
diff --git a/apishim/34/com/android/networkstack/apishim/BluetoothPanShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/BluetoothPanShimImpl.java
similarity index 84%
rename from apishim/34/com/android/networkstack/apishim/BluetoothPanShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/BluetoothPanShimImpl.java
index 94c3d38..a60c287 100644
--- a/apishim/34/com/android/networkstack/apishim/BluetoothPanShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/BluetoothPanShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.bluetooth.BluetoothPan;
 import android.os.Build;
@@ -24,8 +24,7 @@
 /**
  * Implementation of {@link BluetoothPanShimImpl} for API 34.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class BluetoothPanShimImpl extends
         com.android.networkstack.apishim.api33.BluetoothPanShimImpl {
     // Currently identical to the API 33 shim, so inherit everything
diff --git a/apishim/34/com/android/networkstack/apishim/BroadcastOptionsShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/BroadcastOptionsShimImpl.java
similarity index 92%
rename from apishim/34/com/android/networkstack/apishim/BroadcastOptionsShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/BroadcastOptionsShimImpl.java
index 57359cc..4a34009 100644
--- a/apishim/34/com/android/networkstack/apishim/BroadcastOptionsShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/BroadcastOptionsShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import static com.android.modules.utils.build.SdkLevel.isAtLeastU;
 
@@ -30,8 +30,7 @@
 /**
  * Implementation of {@link BroadcastOptionsShim} for API 34.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class BroadcastOptionsShimImpl extends
         com.android.networkstack.apishim.api33.BroadcastOptionsShimImpl {
     protected BroadcastOptionsShimImpl(@NonNull BroadcastOptions options) {
diff --git a/apishim/34/com/android/networkstack/apishim/CaptivePortalDataShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/CaptivePortalDataShimImpl.java
similarity index 86%
rename from apishim/34/com/android/networkstack/apishim/CaptivePortalDataShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/CaptivePortalDataShimImpl.java
index 94814aa..f4d9fdb 100644
--- a/apishim/34/com/android/networkstack/apishim/CaptivePortalDataShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/CaptivePortalDataShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.net.CaptivePortalData;
 import android.os.Build;
@@ -27,8 +27,7 @@
 /**
  * Compatibility implementation of {@link CaptivePortalDataShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class CaptivePortalDataShimImpl
         extends com.android.networkstack.apishim.api33.CaptivePortalDataShimImpl {
     // Currently identical to the API 33 shim, so inherit everything
diff --git a/apishim/34/com/android/networkstack/apishim/ConnectivityFrameworkInitShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/ConnectivityFrameworkInitShimImpl.java
similarity index 85%
rename from apishim/34/com/android/networkstack/apishim/ConnectivityFrameworkInitShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/ConnectivityFrameworkInitShimImpl.java
index a343b67..f752b9f 100644
--- a/apishim/34/com/android/networkstack/apishim/ConnectivityFrameworkInitShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/ConnectivityFrameworkInitShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.os.Build;
 
@@ -25,8 +25,7 @@
 /**
  * Implementation of {@link ConnectivityFrameworkInitShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class ConnectivityFrameworkInitShimImpl extends
         com.android.networkstack.apishim.api33.ConnectivityFrameworkInitShimImpl {
     // Currently identical to the API 33 shim, so inherit everything
diff --git a/apishim/34/com/android/networkstack/apishim/ConnectivityManagerShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/ConnectivityManagerShimImpl.java
similarity index 85%
rename from apishim/34/com/android/networkstack/apishim/ConnectivityManagerShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/ConnectivityManagerShimImpl.java
index 7f6ad39..5688b5e 100644
--- a/apishim/34/com/android/networkstack/apishim/ConnectivityManagerShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/ConnectivityManagerShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.content.Context;
 import android.os.Build;
@@ -26,8 +26,7 @@
 /**
  * Compatibility implementation of {@link ConnectivityManagerShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class ConnectivityManagerShimImpl
         extends com.android.networkstack.apishim.api33.ConnectivityManagerShimImpl  {
     // Currently identical to the API 33 shim, so inherit everything
diff --git a/apishim/34/com/android/networkstack/apishim/ConstantsShim.java b/apishim/34/com/android/networkstack/apishim/api34/ConstantsShim.java
similarity index 90%
rename from apishim/34/com/android/networkstack/apishim/ConstantsShim.java
rename to apishim/34/com/android/networkstack/apishim/api34/ConstantsShim.java
index 65f600a..efe67ee 100644
--- a/apishim/34/com/android/networkstack/apishim/ConstantsShim.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/ConstantsShim.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.content.pm.PackageManager;
 import android.os.Build;
@@ -26,8 +26,7 @@
 /**
  * Utility class for defining and importing constants from the Android platform.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class ConstantsShim extends com.android.networkstack.apishim.api33.ConstantsShim {
     /**
      * Constant that callers can use to determine what version of the shim they are using.
diff --git a/apishim/34/com/android/networkstack/apishim/Ikev2VpnProfileBuilderShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/Ikev2VpnProfileBuilderShimImpl.java
similarity index 98%
rename from apishim/34/com/android/networkstack/apishim/Ikev2VpnProfileBuilderShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/Ikev2VpnProfileBuilderShimImpl.java
index 470f1b4..ac74028 100644
--- a/apishim/34/com/android/networkstack/apishim/Ikev2VpnProfileBuilderShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/Ikev2VpnProfileBuilderShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.net.Ikev2VpnProfile;
 import android.net.ipsec.ike.IkeTunnelConnectionParams;
diff --git a/apishim/34/com/android/networkstack/apishim/Ikev2VpnProfileShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/Ikev2VpnProfileShimImpl.java
similarity index 97%
rename from apishim/34/com/android/networkstack/apishim/Ikev2VpnProfileShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/Ikev2VpnProfileShimImpl.java
index 23e5ffc..848bbd1 100644
--- a/apishim/34/com/android/networkstack/apishim/Ikev2VpnProfileShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/Ikev2VpnProfileShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.net.Ikev2VpnProfile;
 import android.os.Build;
diff --git a/apishim/34/com/android/networkstack/apishim/NetworkAgentConfigShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/NetworkAgentConfigShimImpl.java
similarity index 84%
rename from apishim/34/com/android/networkstack/apishim/NetworkAgentConfigShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/NetworkAgentConfigShimImpl.java
index 4d8ede2..2f18029 100644
--- a/apishim/34/com/android/networkstack/apishim/NetworkAgentConfigShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/NetworkAgentConfigShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.net.NetworkAgentConfig;
 import android.os.Build;
@@ -25,8 +25,7 @@
 /**
  * A shim for NetworkAgentConfig
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class NetworkAgentConfigShimImpl
         extends com.android.networkstack.apishim.api33.NetworkAgentConfigShimImpl {
     protected NetworkAgentConfigShimImpl(@Nullable final NetworkAgentConfig config) {
diff --git a/apishim/34/com/android/networkstack/apishim/NetworkInformationShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/NetworkInformationShimImpl.java
similarity index 83%
rename from apishim/34/com/android/networkstack/apishim/NetworkInformationShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/NetworkInformationShimImpl.java
index b8905e8..c2087cf 100644
--- a/apishim/34/com/android/networkstack/apishim/NetworkInformationShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/NetworkInformationShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.os.Build;
 
@@ -25,8 +25,7 @@
 /**
  * Compatibility implementation of {@link NetworkInformationShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class NetworkInformationShimImpl
         extends com.android.networkstack.apishim.api33.NetworkInformationShimImpl {
     protected NetworkInformationShimImpl() {}
diff --git a/apishim/34/com/android/networkstack/apishim/NetworkRequestShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/NetworkRequestShimImpl.java
similarity index 84%
rename from apishim/34/com/android/networkstack/apishim/NetworkRequestShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/NetworkRequestShimImpl.java
index 61c9d09..8928760 100644
--- a/apishim/34/com/android/networkstack/apishim/NetworkRequestShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/NetworkRequestShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.os.Build;
 
@@ -25,8 +25,7 @@
 /**
  * Implementation of {@link NetworkRequestShim} for API 34.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class NetworkRequestShimImpl
         extends com.android.networkstack.apishim.api33.NetworkRequestShimImpl {
     // Currently identical to the API 33 shim, so inherit everything
diff --git a/apishim/34/com/android/networkstack/apishim/NetworkShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/NetworkShimImpl.java
similarity index 85%
rename from apishim/34/com/android/networkstack/apishim/NetworkShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/NetworkShimImpl.java
index 683d1eb..8547d06 100644
--- a/apishim/34/com/android/networkstack/apishim/NetworkShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/NetworkShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.net.Network;
 import android.os.Build;
@@ -25,8 +25,7 @@
 /**
  * Compatibility implementation of {@link com.android.networkstack.apishim.common.NetworkShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class NetworkShimImpl extends com.android.networkstack.apishim.api33.NetworkShimImpl {
     // Currently, this is the same as the API 33 shim, so inherit everything from that.
     protected NetworkShimImpl(@NonNull Network network) {
diff --git a/apishim/34/com/android/networkstack/apishim/NsdShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/NsdShimImpl.java
similarity index 95%
rename from apishim/34/com/android/networkstack/apishim/NsdShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/NsdShimImpl.java
index 1fbc41e..fc37b30 100644
--- a/apishim/34/com/android/networkstack/apishim/NsdShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/NsdShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.net.nsd.NsdManager;
 import android.net.nsd.NsdServiceInfo;
@@ -38,8 +38,7 @@
 /**
  * Implementation of {@link NsdShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class NsdShimImpl extends com.android.networkstack.apishim.api33.NsdShimImpl {
     private final Map<ServiceInfoCallbackShim, ServiceInfoCallbackWrapper> mCbWrappers =
             Collections.synchronizedMap(new ArrayMap<>());
diff --git a/apishim/34/com/android/networkstack/apishim/ProcessShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/ProcessShimImpl.java
similarity index 82%
rename from apishim/34/com/android/networkstack/apishim/ProcessShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/ProcessShimImpl.java
index 460ed46..3911010 100644
--- a/apishim/34/com/android/networkstack/apishim/ProcessShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/ProcessShimImpl.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.os.Build;
 
@@ -22,8 +22,7 @@
 import com.android.networkstack.apishim.common.ProcessShim;
 
 /** Implementation of {@link ProcessShim} for API 34. */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class ProcessShimImpl extends com.android.networkstack.apishim.api33.ProcessShimImpl {
     protected ProcessShimImpl() {}
 }
diff --git a/apishim/34/com/android/networkstack/apishim/SettingsShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/SettingsShimImpl.java
similarity index 84%
rename from apishim/34/com/android/networkstack/apishim/SettingsShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/SettingsShimImpl.java
index aa12005..440bf96 100644
--- a/apishim/34/com/android/networkstack/apishim/SettingsShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/SettingsShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.os.Build;
 
@@ -25,8 +25,7 @@
 /**
  * Compatibility implementation of {@link SettingsShim} for API 34.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class SettingsShimImpl
         extends com.android.networkstack.apishim.api33.SettingsShimImpl {
     // Currently identical to the API 33 shim, so inherit everything
diff --git a/apishim/34/com/android/networkstack/apishim/SocketUtilsShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/SocketUtilsShimImpl.java
similarity index 84%
rename from apishim/34/com/android/networkstack/apishim/SocketUtilsShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/SocketUtilsShimImpl.java
index ca7b64c..60bd9ce 100644
--- a/apishim/34/com/android/networkstack/apishim/SocketUtilsShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/SocketUtilsShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.os.Build;
 
@@ -23,8 +23,7 @@
 /**
  * Implementation of {@link com.android.networkstack.apishim.common.SocketUtilsShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class SocketUtilsShimImpl
         extends com.android.networkstack.apishim.api33.SocketUtilsShimImpl {
     // Currently, this is the same as the API 33 shim, so inherit everything from that.
diff --git a/apishim/34/com/android/networkstack/apishim/TelephonyManagerShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/TelephonyManagerShimImpl.java
similarity index 85%
rename from apishim/34/com/android/networkstack/apishim/TelephonyManagerShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/TelephonyManagerShimImpl.java
index ed81f52..e2e5874 100644
--- a/apishim/34/com/android/networkstack/apishim/TelephonyManagerShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/TelephonyManagerShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.os.Build;
 import android.telephony.TelephonyManager;
@@ -26,8 +26,7 @@
 /**
  * Implementation of {@link TelephonyManagerShim} for API 34.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class TelephonyManagerShimImpl extends
         com.android.networkstack.apishim.api33.TelephonyManagerShimImpl {
     protected TelephonyManagerShimImpl(TelephonyManager telephonyManager) {
diff --git a/apishim/34/com/android/networkstack/apishim/VpnManagerShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/VpnManagerShimImpl.java
similarity index 84%
rename from apishim/34/com/android/networkstack/apishim/VpnManagerShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/VpnManagerShimImpl.java
index d7f6280..f71d399 100644
--- a/apishim/34/com/android/networkstack/apishim/VpnManagerShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/VpnManagerShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.content.Context;
 import android.os.Build;
@@ -26,8 +26,7 @@
 /**
  * Compatibility implementation of {@link VpnManagerShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class VpnManagerShimImpl extends com.android.networkstack.apishim.api33.VpnManagerShimImpl {
     protected VpnManagerShimImpl(Context context) {
         super(context);
diff --git a/apishim/34/com/android/networkstack/apishim/VpnProfileStateShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/VpnProfileStateShimImpl.java
similarity index 85%
rename from apishim/34/com/android/networkstack/apishim/VpnProfileStateShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/VpnProfileStateShimImpl.java
index 23f346d..17b6326 100644
--- a/apishim/34/com/android/networkstack/apishim/VpnProfileStateShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/VpnProfileStateShimImpl.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.net.VpnProfileState;
 import android.os.Build;
@@ -24,8 +24,7 @@
 import com.android.networkstack.apishim.common.VpnProfileStateShim;
 
 /** Implementation of {@link VpnProfileStateShim} for API 34. */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class VpnProfileStateShimImpl
         extends com.android.networkstack.apishim.api33.VpnProfileStateShimImpl {
     protected VpnProfileStateShimImpl(@NonNull VpnProfileState profileState) {
diff --git a/apishim/34/com/android/networkstack/apishim/VpnServiceBuilderShimImpl.java b/apishim/34/com/android/networkstack/apishim/api34/VpnServiceBuilderShimImpl.java
similarity index 83%
rename from apishim/34/com/android/networkstack/apishim/VpnServiceBuilderShimImpl.java
rename to apishim/34/com/android/networkstack/apishim/api34/VpnServiceBuilderShimImpl.java
index b78a77b..27e43f6 100644
--- a/apishim/34/com/android/networkstack/apishim/VpnServiceBuilderShimImpl.java
+++ b/apishim/34/com/android/networkstack/apishim/api34/VpnServiceBuilderShimImpl.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.networkstack.apishim;
+package com.android.networkstack.apishim.api34;
 
 import android.os.Build;
 
@@ -25,8 +25,7 @@
 /**
  * Implementation of {@link VpnServiceBuilderShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
+@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
 public class VpnServiceBuilderShimImpl extends
         com.android.networkstack.apishim.api33.VpnServiceBuilderShimImpl {
     protected VpnServiceBuilderShimImpl() {}
diff --git a/apishim/34/com/android/networkstack/apishim/BluetoothPanShimImpl.java b/apishim/35/com/android/networkstack/apishim/BluetoothPanShimImpl.java
similarity index 77%
copy from apishim/34/com/android/networkstack/apishim/BluetoothPanShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/BluetoothPanShimImpl.java
index 94c3d38..3dc8395 100644
--- a/apishim/34/com/android/networkstack/apishim/BluetoothPanShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/BluetoothPanShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,13 +22,13 @@
 import androidx.annotation.RequiresApi;
 
 /**
- * Implementation of {@link BluetoothPanShimImpl} for API 34.
+ * Implementation of {@link BluetoothPanShimImpl} for API 35.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
 public class BluetoothPanShimImpl extends
-        com.android.networkstack.apishim.api33.BluetoothPanShimImpl {
-    // Currently identical to the API 33 shim, so inherit everything
+        com.android.networkstack.apishim.api34.BluetoothPanShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     protected BluetoothPanShimImpl(BluetoothPan pan) {
         super(pan);
     }
diff --git a/apishim/34/com/android/networkstack/apishim/NetworkShimImpl.java b/apishim/35/com/android/networkstack/apishim/BroadcastOptionsShimImpl.java
similarity index 60%
copy from apishim/34/com/android/networkstack/apishim/NetworkShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/BroadcastOptionsShimImpl.java
index 683d1eb..53459f3 100644
--- a/apishim/34/com/android/networkstack/apishim/NetworkShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/BroadcastOptionsShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,20 +16,23 @@
 
 package com.android.networkstack.apishim;
 
-import android.net.Network;
+import android.app.BroadcastOptions;
 import android.os.Build;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.RequiresApi;
 
+import com.android.networkstack.apishim.common.BroadcastOptionsShim;
+
 /**
- * Compatibility implementation of {@link com.android.networkstack.apishim.common.NetworkShim}.
+ * Implementation of {@link BroadcastOptionsShim} for API 35.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
-public class NetworkShimImpl extends com.android.networkstack.apishim.api33.NetworkShimImpl {
-    // Currently, this is the same as the API 33 shim, so inherit everything from that.
-    protected NetworkShimImpl(@NonNull Network network) {
-        super(network);
+public class BroadcastOptionsShimImpl extends
+        com.android.networkstack.apishim.api34.BroadcastOptionsShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
+    protected BroadcastOptionsShimImpl(@NonNull BroadcastOptions options) {
+        super(options);
     }
 }
diff --git a/apishim/34/com/android/networkstack/apishim/CaptivePortalDataShimImpl.java b/apishim/35/com/android/networkstack/apishim/CaptivePortalDataShimImpl.java
similarity index 84%
copy from apishim/34/com/android/networkstack/apishim/CaptivePortalDataShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/CaptivePortalDataShimImpl.java
index 94814aa..4b40e24 100644
--- a/apishim/34/com/android/networkstack/apishim/CaptivePortalDataShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/CaptivePortalDataShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,11 +27,11 @@
 /**
  * Compatibility implementation of {@link CaptivePortalDataShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
 public class CaptivePortalDataShimImpl
-        extends com.android.networkstack.apishim.api33.CaptivePortalDataShimImpl {
-    // Currently identical to the API 33 shim, so inherit everything
+        extends com.android.networkstack.apishim.api34.CaptivePortalDataShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     public CaptivePortalDataShimImpl(@NonNull CaptivePortalData data) {
         super(data);
     }
diff --git a/apishim/34/com/android/networkstack/apishim/ConnectivityFrameworkInitShimImpl.java b/apishim/35/com/android/networkstack/apishim/ConnectivityFrameworkInitShimImpl.java
similarity index 83%
copy from apishim/34/com/android/networkstack/apishim/ConnectivityFrameworkInitShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/ConnectivityFrameworkInitShimImpl.java
index a343b67..f37744a 100644
--- a/apishim/34/com/android/networkstack/apishim/ConnectivityFrameworkInitShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/ConnectivityFrameworkInitShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,10 +25,10 @@
 /**
  * Implementation of {@link ConnectivityFrameworkInitShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
 public class ConnectivityFrameworkInitShimImpl extends
-        com.android.networkstack.apishim.api33.ConnectivityFrameworkInitShimImpl {
-    // Currently identical to the API 33 shim, so inherit everything
+        com.android.networkstack.apishim.api34.ConnectivityFrameworkInitShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     protected ConnectivityFrameworkInitShimImpl() {}
 }
diff --git a/apishim/34/com/android/networkstack/apishim/ConnectivityManagerShimImpl.java b/apishim/35/com/android/networkstack/apishim/ConnectivityManagerShimImpl.java
similarity index 83%
copy from apishim/34/com/android/networkstack/apishim/ConnectivityManagerShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/ConnectivityManagerShimImpl.java
index 7f6ad39..788ba01 100644
--- a/apishim/34/com/android/networkstack/apishim/ConnectivityManagerShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/ConnectivityManagerShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,11 +26,11 @@
 /**
  * Compatibility implementation of {@link ConnectivityManagerShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
 public class ConnectivityManagerShimImpl
-        extends com.android.networkstack.apishim.api33.ConnectivityManagerShimImpl  {
-    // Currently identical to the API 33 shim, so inherit everything
+        extends com.android.networkstack.apishim.api34.ConnectivityManagerShimImpl  {
+    // Currently identical to the API 34 shim, so inherit everything
     protected ConnectivityManagerShimImpl(Context context) {
         super(context);
     }
diff --git a/apishim/34/com/android/networkstack/apishim/ConstantsShim.java b/apishim/35/com/android/networkstack/apishim/ConstantsShim.java
similarity index 66%
copy from apishim/34/com/android/networkstack/apishim/ConstantsShim.java
copy to apishim/35/com/android/networkstack/apishim/ConstantsShim.java
index 65f600a..212352d 100644
--- a/apishim/34/com/android/networkstack/apishim/ConstantsShim.java
+++ b/apishim/35/com/android/networkstack/apishim/ConstantsShim.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,9 +16,7 @@
 
 package com.android.networkstack.apishim;
 
-import android.content.pm.PackageManager;
 import android.os.Build;
-import android.system.OsConstants;
 
 import androidx.annotation.RequiresApi;
 import androidx.annotation.VisibleForTesting;
@@ -26,9 +24,9 @@
 /**
  * Utility class for defining and importing constants from the Android platform.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
-public class ConstantsShim extends com.android.networkstack.apishim.api33.ConstantsShim {
+public class ConstantsShim extends com.android.networkstack.apishim.api34.ConstantsShim {
     /**
      * Constant that callers can use to determine what version of the shim they are using.
      * Must be the same as the version of the shims.
@@ -36,13 +34,5 @@
      * the shimmed objects and methods themselves.
      */
     @VisibleForTesting
-    public static final int VERSION = 34;
-
-    // Constants defined in android.content.pm.PackageManager
-    public static final String PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES =
-            PackageManager.PROPERTY_SELF_CERTIFIED_NETWORK_CAPABILITIES;
-
-    // Constants defined in android.system.OsConstants
-    public static final int IFA_F_MANAGETEMPADDR = OsConstants.IFA_F_MANAGETEMPADDR;
-    public static final int IFA_F_NOPREFIXROUTE = OsConstants.IFA_F_NOPREFIXROUTE;
+    public static final int VERSION = 35;
 }
diff --git a/apishim/34/com/android/networkstack/apishim/NetworkShimImpl.java b/apishim/35/com/android/networkstack/apishim/Ikev2VpnProfileBuilderShimImpl.java
similarity index 62%
copy from apishim/34/com/android/networkstack/apishim/NetworkShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/Ikev2VpnProfileBuilderShimImpl.java
index 683d1eb..486063f 100644
--- a/apishim/34/com/android/networkstack/apishim/NetworkShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/Ikev2VpnProfileBuilderShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,20 +16,21 @@
 
 package com.android.networkstack.apishim;
 
-import android.net.Network;
+import android.net.ipsec.ike.IkeTunnelConnectionParams;
 import android.os.Build;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.RequiresApi;
 
 /**
- * Compatibility implementation of {@link com.android.networkstack.apishim.common.NetworkShim}.
+ * A shim for Ikev2VpnProfile.Builder
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
-public class NetworkShimImpl extends com.android.networkstack.apishim.api33.NetworkShimImpl {
-    // Currently, this is the same as the API 33 shim, so inherit everything from that.
-    protected NetworkShimImpl(@NonNull Network network) {
-        super(network);
+public class Ikev2VpnProfileBuilderShimImpl
+        extends com.android.networkstack.apishim.api34.Ikev2VpnProfileBuilderShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
+    protected Ikev2VpnProfileBuilderShimImpl(@NonNull IkeTunnelConnectionParams params) {
+        super(params);
     }
 }
diff --git a/apishim/34/com/android/networkstack/apishim/VpnManagerShimImpl.java b/apishim/35/com/android/networkstack/apishim/Ikev2VpnProfileShimImpl.java
similarity index 65%
copy from apishim/34/com/android/networkstack/apishim/VpnManagerShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/Ikev2VpnProfileShimImpl.java
index d7f6280..bc40e16 100644
--- a/apishim/34/com/android/networkstack/apishim/VpnManagerShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/Ikev2VpnProfileShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,20 +16,20 @@
 
 package com.android.networkstack.apishim;
 
-import android.content.Context;
+import android.net.Ikev2VpnProfile;
 import android.os.Build;
 
 import androidx.annotation.RequiresApi;
 
-import com.android.networkstack.apishim.common.VpnManagerShim;
-
 /**
- * Compatibility implementation of {@link VpnManagerShim}.
+ * A shim for Ikev2VpnProfile
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
-public class VpnManagerShimImpl extends com.android.networkstack.apishim.api33.VpnManagerShimImpl {
-    protected VpnManagerShimImpl(Context context) {
-        super(context);
+public class Ikev2VpnProfileShimImpl
+        extends com.android.networkstack.apishim.api34.Ikev2VpnProfileShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
+    protected Ikev2VpnProfileShimImpl(Ikev2VpnProfile profile) {
+        super(profile);
     }
 }
diff --git a/apishim/34/com/android/networkstack/apishim/NetworkAgentConfigShimImpl.java b/apishim/35/com/android/networkstack/apishim/NetworkAgentConfigShimImpl.java
similarity index 82%
copy from apishim/34/com/android/networkstack/apishim/NetworkAgentConfigShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/NetworkAgentConfigShimImpl.java
index 4d8ede2..1d8c0c1 100644
--- a/apishim/34/com/android/networkstack/apishim/NetworkAgentConfigShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/NetworkAgentConfigShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,10 +25,11 @@
 /**
  * A shim for NetworkAgentConfig
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
 public class NetworkAgentConfigShimImpl
-        extends com.android.networkstack.apishim.api33.NetworkAgentConfigShimImpl {
+        extends com.android.networkstack.apishim.api34.NetworkAgentConfigShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     protected NetworkAgentConfigShimImpl(@Nullable final NetworkAgentConfig config) {
         super(config);
     }
diff --git a/apishim/34/com/android/networkstack/apishim/NetworkInformationShimImpl.java b/apishim/35/com/android/networkstack/apishim/NetworkInformationShimImpl.java
similarity index 82%
copy from apishim/34/com/android/networkstack/apishim/NetworkInformationShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/NetworkInformationShimImpl.java
index b8905e8..e07ce15 100644
--- a/apishim/34/com/android/networkstack/apishim/NetworkInformationShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/NetworkInformationShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,9 +25,10 @@
 /**
  * Compatibility implementation of {@link NetworkInformationShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
 public class NetworkInformationShimImpl
-        extends com.android.networkstack.apishim.api33.NetworkInformationShimImpl {
+        extends com.android.networkstack.apishim.api34.NetworkInformationShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     protected NetworkInformationShimImpl() {}
 }
diff --git a/apishim/34/com/android/networkstack/apishim/NetworkRequestShimImpl.java b/apishim/35/com/android/networkstack/apishim/NetworkRequestShimImpl.java
similarity index 78%
copy from apishim/34/com/android/networkstack/apishim/NetworkRequestShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/NetworkRequestShimImpl.java
index 61c9d09..4226802 100644
--- a/apishim/34/com/android/networkstack/apishim/NetworkRequestShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/NetworkRequestShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,13 +23,13 @@
 import com.android.networkstack.apishim.common.NetworkRequestShim;
 
 /**
- * Implementation of {@link NetworkRequestShim} for API 34.
+ * Implementation of {@link NetworkRequestShim} for API 35.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
 public class NetworkRequestShimImpl
-        extends com.android.networkstack.apishim.api33.NetworkRequestShimImpl {
-    // Currently identical to the API 33 shim, so inherit everything
+        extends com.android.networkstack.apishim.api34.NetworkRequestShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     protected NetworkRequestShimImpl() {
         super();
     }
diff --git a/apishim/34/com/android/networkstack/apishim/NetworkShimImpl.java b/apishim/35/com/android/networkstack/apishim/NetworkShimImpl.java
similarity index 84%
copy from apishim/34/com/android/networkstack/apishim/NetworkShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/NetworkShimImpl.java
index 683d1eb..bc751f0 100644
--- a/apishim/34/com/android/networkstack/apishim/NetworkShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/NetworkShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,10 +25,10 @@
 /**
  * Compatibility implementation of {@link com.android.networkstack.apishim.common.NetworkShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
-public class NetworkShimImpl extends com.android.networkstack.apishim.api33.NetworkShimImpl {
-    // Currently, this is the same as the API 33 shim, so inherit everything from that.
+public class NetworkShimImpl extends com.android.networkstack.apishim.api34.NetworkShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     protected NetworkShimImpl(@NonNull Network network) {
         super(network);
     }
diff --git a/apishim/34/com/android/networkstack/apishim/ProcessShimImpl.java b/apishim/35/com/android/networkstack/apishim/NsdShimImpl.java
similarity index 70%
copy from apishim/34/com/android/networkstack/apishim/ProcessShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/NsdShimImpl.java
index 460ed46..4b992ee 100644
--- a/apishim/34/com/android/networkstack/apishim/ProcessShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/NsdShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -13,17 +13,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 package com.android.networkstack.apishim;
 
 import android.os.Build;
 
 import androidx.annotation.RequiresApi;
 
-import com.android.networkstack.apishim.common.ProcessShim;
+import com.android.networkstack.apishim.common.NsdShim;
 
-/** Implementation of {@link ProcessShim} for API 34. */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+/**
+ * Implementation of {@link NsdShim}.
+ */
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
-public class ProcessShimImpl extends com.android.networkstack.apishim.api33.ProcessShimImpl {
-    protected ProcessShimImpl() {}
+public class NsdShimImpl extends com.android.networkstack.apishim.api34.NsdShimImpl {
+    // Inherit everything from API34 shim
 }
diff --git a/apishim/34/com/android/networkstack/apishim/ProcessShimImpl.java b/apishim/35/com/android/networkstack/apishim/ProcessShimImpl.java
similarity index 79%
copy from apishim/34/com/android/networkstack/apishim/ProcessShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/ProcessShimImpl.java
index 460ed46..11260a2 100644
--- a/apishim/34/com/android/networkstack/apishim/ProcessShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/ProcessShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,9 +21,10 @@
 
 import com.android.networkstack.apishim.common.ProcessShim;
 
-/** Implementation of {@link ProcessShim} for API 34. */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+/** Implementation of {@link ProcessShim} for API 35. */
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
-public class ProcessShimImpl extends com.android.networkstack.apishim.api33.ProcessShimImpl {
+public class ProcessShimImpl extends com.android.networkstack.apishim.api34.ProcessShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     protected ProcessShimImpl() {}
 }
diff --git a/apishim/34/com/android/networkstack/apishim/SettingsShimImpl.java b/apishim/35/com/android/networkstack/apishim/SettingsShimImpl.java
similarity index 78%
copy from apishim/34/com/android/networkstack/apishim/SettingsShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/SettingsShimImpl.java
index aa12005..a2e168e 100644
--- a/apishim/34/com/android/networkstack/apishim/SettingsShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/SettingsShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,12 +23,12 @@
 import com.android.networkstack.apishim.common.SettingsShim;
 
 /**
- * Compatibility implementation of {@link SettingsShim} for API 34.
+ * Compatibility implementation of {@link SettingsShim} for API 35.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
 public class SettingsShimImpl
-        extends com.android.networkstack.apishim.api33.SettingsShimImpl {
-    // Currently identical to the API 33 shim, so inherit everything
-    protected SettingsShimImpl() { }
+        extends com.android.networkstack.apishim.api34.SettingsShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
+    protected SettingsShimImpl() {}
 }
diff --git a/apishim/34/com/android/networkstack/apishim/SocketUtilsShimImpl.java b/apishim/35/com/android/networkstack/apishim/SocketUtilsShimImpl.java
similarity index 80%
copy from apishim/34/com/android/networkstack/apishim/SocketUtilsShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/SocketUtilsShimImpl.java
index ca7b64c..84a2697 100644
--- a/apishim/34/com/android/networkstack/apishim/SocketUtilsShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/SocketUtilsShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,10 +23,10 @@
 /**
  * Implementation of {@link com.android.networkstack.apishim.common.SocketUtilsShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
 public class SocketUtilsShimImpl
-        extends com.android.networkstack.apishim.api33.SocketUtilsShimImpl {
-    // Currently, this is the same as the API 33 shim, so inherit everything from that.
+        extends com.android.networkstack.apishim.api34.SocketUtilsShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     protected SocketUtilsShimImpl() {}
 }
diff --git a/apishim/34/com/android/networkstack/apishim/TelephonyManagerShimImpl.java b/apishim/35/com/android/networkstack/apishim/TelephonyManagerShimImpl.java
similarity index 79%
copy from apishim/34/com/android/networkstack/apishim/TelephonyManagerShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/TelephonyManagerShimImpl.java
index ed81f52..0e7e93b 100644
--- a/apishim/34/com/android/networkstack/apishim/TelephonyManagerShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/TelephonyManagerShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,12 +24,13 @@
 import com.android.networkstack.apishim.common.TelephonyManagerShim;
 
 /**
- * Implementation of {@link TelephonyManagerShim} for API 34.
+ * Implementation of {@link TelephonyManagerShim} for API 35.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
 public class TelephonyManagerShimImpl extends
-        com.android.networkstack.apishim.api33.TelephonyManagerShimImpl {
+        com.android.networkstack.apishim.api34.TelephonyManagerShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     protected TelephonyManagerShimImpl(TelephonyManager telephonyManager) {
         super(telephonyManager);
     }
diff --git a/apishim/34/com/android/networkstack/apishim/VpnManagerShimImpl.java b/apishim/35/com/android/networkstack/apishim/VpnManagerShimImpl.java
similarity index 84%
copy from apishim/34/com/android/networkstack/apishim/VpnManagerShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/VpnManagerShimImpl.java
index d7f6280..637e13d 100644
--- a/apishim/34/com/android/networkstack/apishim/VpnManagerShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/VpnManagerShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,9 +26,10 @@
 /**
  * Compatibility implementation of {@link VpnManagerShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
-public class VpnManagerShimImpl extends com.android.networkstack.apishim.api33.VpnManagerShimImpl {
+public class VpnManagerShimImpl extends com.android.networkstack.apishim.api34.VpnManagerShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     protected VpnManagerShimImpl(Context context) {
         super(context);
     }
diff --git a/apishim/34/com/android/networkstack/apishim/VpnProfileStateShimImpl.java b/apishim/35/com/android/networkstack/apishim/VpnProfileStateShimImpl.java
similarity index 79%
copy from apishim/34/com/android/networkstack/apishim/VpnProfileStateShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/VpnProfileStateShimImpl.java
index 23f346d..fd0a44b 100644
--- a/apishim/34/com/android/networkstack/apishim/VpnProfileStateShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/VpnProfileStateShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,11 +23,12 @@
 
 import com.android.networkstack.apishim.common.VpnProfileStateShim;
 
-/** Implementation of {@link VpnProfileStateShim} for API 34. */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+/** Implementation of {@link VpnProfileStateShim} for API 35. */
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
 public class VpnProfileStateShimImpl
-        extends com.android.networkstack.apishim.api33.VpnProfileStateShimImpl {
+        extends com.android.networkstack.apishim.api34.VpnProfileStateShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     protected VpnProfileStateShimImpl(@NonNull VpnProfileState profileState) {
         super(profileState);
     }
diff --git a/apishim/34/com/android/networkstack/apishim/VpnServiceBuilderShimImpl.java b/apishim/35/com/android/networkstack/apishim/VpnServiceBuilderShimImpl.java
similarity index 82%
copy from apishim/34/com/android/networkstack/apishim/VpnServiceBuilderShimImpl.java
copy to apishim/35/com/android/networkstack/apishim/VpnServiceBuilderShimImpl.java
index b78a77b..6291461 100644
--- a/apishim/34/com/android/networkstack/apishim/VpnServiceBuilderShimImpl.java
+++ b/apishim/35/com/android/networkstack/apishim/VpnServiceBuilderShimImpl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2022 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,9 +25,10 @@
 /**
  * Implementation of {@link VpnServiceBuilderShim}.
  */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
+// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
 @RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
 public class VpnServiceBuilderShimImpl extends
-        com.android.networkstack.apishim.api33.VpnServiceBuilderShimImpl {
+        com.android.networkstack.apishim.api34.VpnServiceBuilderShimImpl {
+    // Currently identical to the API 34 shim, so inherit everything
     protected VpnServiceBuilderShimImpl() {}
 }
diff --git a/apishim/jarjar-rules-compat.txt b/apishim/jarjar-rules-compat.txt
index 09fa04d..754a355 100644
--- a/apishim/jarjar-rules-compat.txt
+++ b/apishim/jarjar-rules-compat.txt
@@ -1,7 +1,7 @@
 # jarjar rules to use on API stable builds.
 # Use the latest stable apishim package as the main apishim package, to replace and avoid building
 # the unstable, non-compatibility shims.
-# Once API 34 is stable, apishim/34/com.android.networkstack.apishim should be moved to the
-# com.android.networkstack.apishim.api34 package, a new apishim/34/com.android.networkstack.apishim
-# package should be created, and this rule should reference api34.
-rule com.android.networkstack.apishim.api33.** com.android.networkstack.apishim.@1
\ No newline at end of file
+# Once API 35 is stable, apishim/35/com.android.networkstack.apishim should be moved to the
+# com.android.networkstack.apishim.api35 package, a new apishim/35/com.android.networkstack.apishim
+# package should be created, and this rule should reference api35.
+rule com.android.networkstack.apishim.api34.** com.android.networkstack.apishim.@1
\ No newline at end of file
diff --git a/common/networkstackclient/Android.bp b/common/networkstackclient/Android.bp
index 035ddc7..2d7d7ff 100644
--- a/common/networkstackclient/Android.bp
+++ b/common/networkstackclient/Android.bp
@@ -156,6 +156,10 @@
             version: "17",
             imports: ["ipmemorystore-aidl-interfaces-V10"],
         },
+        {
+            version: "18",
+            imports: ["ipmemorystore-aidl-interfaces-V10"],
+        },
 
     ],
 
@@ -170,7 +174,7 @@
     min_sdk_version: "29",
     static_libs: [
         "ipmemorystore-aidl-interfaces-V10-java",
-        "networkstack-aidl-interfaces-V17-java",
+        "networkstack-aidl-interfaces-V18-java",
     ],
     visibility: ["//packages/modules/NetworkStack:__subpackages__"],
     apex_available: [
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/.hash b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/.hash
new file mode 100644
index 0000000..4cfd332
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/.hash
@@ -0,0 +1 @@
+4d26968d0f6cb11c9bb669a3f8ebc7a1c39f9391
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/DataStallReportParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/DataStallReportParcelable.aidl
new file mode 100644
index 0000000..771deda
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/DataStallReportParcelable.aidl
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2020, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+@JavaDerive(toString=true)
+parcelable DataStallReportParcelable {
+  long timestampMillis = 0;
+  int detectionMethod = 1;
+  int tcpPacketFailRate = 2;
+  int tcpMetricsCollectionPeriodMillis = 3;
+  int dnsConsecutiveTimeouts = 4;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/DhcpResultsParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/DhcpResultsParcelable.aidl
new file mode 100644
index 0000000..31f2194
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/DhcpResultsParcelable.aidl
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+@JavaDerive(toString=true)
+parcelable DhcpResultsParcelable {
+  android.net.StaticIpConfiguration baseConfiguration;
+  int leaseDuration;
+  int mtu;
+  String serverAddress;
+  String vendorInfo;
+  @nullable String serverHostName;
+  @nullable String captivePortalApiUrl;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/INetworkMonitor.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/INetworkMonitor.aidl
new file mode 100644
index 0000000..fb13c0c
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/INetworkMonitor.aidl
@@ -0,0 +1,60 @@
+/**
+ * Copyright (c) 2018, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+/* @hide */
+interface INetworkMonitor {
+  oneway void start();
+  oneway void launchCaptivePortalApp();
+  oneway void notifyCaptivePortalAppFinished(int response);
+  oneway void setAcceptPartialConnectivity();
+  oneway void forceReevaluation(int uid);
+  oneway void notifyPrivateDnsChanged(in android.net.PrivateDnsConfigParcel config);
+  oneway void notifyDnsResponse(int returnCode);
+  oneway void notifyNetworkConnected(in android.net.LinkProperties lp, in android.net.NetworkCapabilities nc);
+  oneway void notifyNetworkDisconnected();
+  oneway void notifyLinkPropertiesChanged(in android.net.LinkProperties lp);
+  oneway void notifyNetworkCapabilitiesChanged(in android.net.NetworkCapabilities nc);
+  oneway void notifyNetworkConnectedParcel(in android.net.networkstack.aidl.NetworkMonitorParameters params);
+  const int NETWORK_TEST_RESULT_VALID = 0;
+  const int NETWORK_TEST_RESULT_INVALID = 1;
+  const int NETWORK_TEST_RESULT_PARTIAL_CONNECTIVITY = 2;
+  const int NETWORK_VALIDATION_RESULT_VALID = 0x01;
+  const int NETWORK_VALIDATION_RESULT_PARTIAL = 0x02;
+  const int NETWORK_VALIDATION_RESULT_SKIPPED = 0x04;
+  const int NETWORK_VALIDATION_PROBE_DNS = 0x04;
+  const int NETWORK_VALIDATION_PROBE_HTTP = 0x08;
+  const int NETWORK_VALIDATION_PROBE_HTTPS = 0x10;
+  const int NETWORK_VALIDATION_PROBE_FALLBACK = 0x20;
+  const int NETWORK_VALIDATION_PROBE_PRIVDNS = 0x40;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/INetworkMonitorCallbacks.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/INetworkMonitorCallbacks.aidl
new file mode 100644
index 0000000..36eda8e
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/INetworkMonitorCallbacks.aidl
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+/* @hide */
+interface INetworkMonitorCallbacks {
+  oneway void onNetworkMonitorCreated(in android.net.INetworkMonitor networkMonitor) = 0;
+  oneway void notifyNetworkTested(int testResult, @nullable String redirectUrl) = 1;
+  oneway void notifyPrivateDnsConfigResolved(in android.net.PrivateDnsConfigParcel config) = 2;
+  oneway void showProvisioningNotification(String action, String packageName) = 3;
+  oneway void hideProvisioningNotification() = 4;
+  oneway void notifyProbeStatusChanged(int probesCompleted, int probesSucceeded) = 5;
+  oneway void notifyNetworkTestedWithExtras(in android.net.NetworkTestResultParcelable result) = 6;
+  oneway void notifyDataStallSuspected(in android.net.DataStallReportParcelable report) = 7;
+  oneway void notifyCaptivePortalDataChanged(in android.net.CaptivePortalData data) = 8;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/INetworkStackConnector.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/INetworkStackConnector.aidl
new file mode 100644
index 0000000..8120ffc
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/INetworkStackConnector.aidl
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2018, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+/* @hide */
+interface INetworkStackConnector {
+  oneway void makeDhcpServer(in String ifName, in android.net.dhcp.DhcpServingParamsParcel params, in android.net.dhcp.IDhcpServerCallbacks cb);
+  oneway void makeNetworkMonitor(in android.net.Network network, String name, in android.net.INetworkMonitorCallbacks cb);
+  oneway void makeIpClient(in String ifName, in android.net.ip.IIpClientCallbacks callbacks);
+  oneway void fetchIpMemoryStore(in android.net.IIpMemoryStoreCallbacks cb);
+  oneway void allowTestUid(int uid, in android.net.INetworkStackStatusCallback cb);
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/INetworkStackStatusCallback.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/INetworkStackStatusCallback.aidl
new file mode 100644
index 0000000..0b6b778
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/INetworkStackStatusCallback.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+/* @hide */
+interface INetworkStackStatusCallback {
+  oneway void onStatusAvailable(int statusCode);
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/InformationElementParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/InformationElementParcelable.aidl
new file mode 100644
index 0000000..6103774
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/InformationElementParcelable.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+@JavaDerive(toString=true)
+parcelable InformationElementParcelable {
+  int id;
+  byte[] payload;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/InitialConfigurationParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/InitialConfigurationParcelable.aidl
new file mode 100644
index 0000000..6a597e6
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/InitialConfigurationParcelable.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+@JavaDerive(toString=true)
+parcelable InitialConfigurationParcelable {
+  android.net.LinkAddress[] ipAddresses;
+  android.net.IpPrefix[] directlyConnectedRoutes;
+  String[] dnsServers;
+  String gateway;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/Layer2InformationParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/Layer2InformationParcelable.aidl
new file mode 100644
index 0000000..83796ee
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/Layer2InformationParcelable.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+@JavaDerive(toString=true)
+parcelable Layer2InformationParcelable {
+  String l2Key;
+  String cluster;
+  android.net.MacAddress bssid;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/Layer2PacketParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/Layer2PacketParcelable.aidl
new file mode 100644
index 0000000..4b3fff5
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/Layer2PacketParcelable.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+@JavaDerive(toString=true)
+parcelable Layer2PacketParcelable {
+  android.net.MacAddress dstMacAddress;
+  byte[] payload;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/NattKeepalivePacketDataParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/NattKeepalivePacketDataParcelable.aidl
new file mode 100644
index 0000000..18cf954
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/NattKeepalivePacketDataParcelable.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+@JavaDerive(toString=true)
+parcelable NattKeepalivePacketDataParcelable {
+  byte[] srcAddress;
+  int srcPort;
+  byte[] dstAddress;
+  int dstPort;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/NetworkTestResultParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/NetworkTestResultParcelable.aidl
new file mode 100644
index 0000000..4d6d5a2
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/NetworkTestResultParcelable.aidl
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2020, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+@JavaDerive(toString=true)
+parcelable NetworkTestResultParcelable {
+  long timestampMillis;
+  int result;
+  int probesSucceeded;
+  int probesAttempted;
+  String redirectUrl;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/PrivateDnsConfigParcel.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/PrivateDnsConfigParcel.aidl
new file mode 100644
index 0000000..1457caf
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/PrivateDnsConfigParcel.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+@JavaDerive(toString=true)
+parcelable PrivateDnsConfigParcel {
+  String hostname;
+  String[] ips;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/ProvisioningConfigurationParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/ProvisioningConfigurationParcelable.aidl
new file mode 100644
index 0000000..fba524b
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/ProvisioningConfigurationParcelable.aidl
@@ -0,0 +1,63 @@
+/*
+**
+** Copyright (C) 2019 The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+@JavaDerive(toString=true)
+parcelable ProvisioningConfigurationParcelable {
+  /**
+   * @deprecated use ipv4ProvisioningMode instead.
+   */
+  boolean enableIPv4;
+  /**
+   * @deprecated use ipv6ProvisioningMode instead.
+   */
+  boolean enableIPv6;
+  boolean usingMultinetworkPolicyTracker;
+  boolean usingIpReachabilityMonitor;
+  int requestedPreDhcpActionMs;
+  android.net.InitialConfigurationParcelable initialConfig;
+  android.net.StaticIpConfiguration staticIpConfig;
+  android.net.apf.ApfCapabilities apfCapabilities;
+  int provisioningTimeoutMs;
+  int ipv6AddrGenMode;
+  android.net.Network network;
+  String displayName;
+  boolean enablePreconnection;
+  @nullable android.net.ScanResultInfoParcelable scanResultInfo;
+  @nullable android.net.Layer2InformationParcelable layer2Info;
+  @nullable List<android.net.networkstack.aidl.dhcp.DhcpOption> options;
+  int ipv4ProvisioningMode;
+  int ipv6ProvisioningMode;
+  boolean uniqueEui64AddressesOnly;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/ScanResultInfoParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/ScanResultInfoParcelable.aidl
new file mode 100644
index 0000000..94fc27f
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/ScanResultInfoParcelable.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+@JavaDerive(toString=true)
+parcelable ScanResultInfoParcelable {
+  String ssid;
+  String bssid;
+  android.net.InformationElementParcelable[] informationElements;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/TcpKeepalivePacketDataParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/TcpKeepalivePacketDataParcelable.aidl
new file mode 100644
index 0000000..0e1c21c
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/TcpKeepalivePacketDataParcelable.aidl
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net;
+@JavaDerive(toString=true)
+parcelable TcpKeepalivePacketDataParcelable {
+  byte[] srcAddress;
+  int srcPort;
+  byte[] dstAddress;
+  int dstPort;
+  int seq;
+  int ack;
+  int rcvWnd;
+  int rcvWndScale;
+  int tos;
+  int ttl;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/DhcpLeaseParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/DhcpLeaseParcelable.aidl
new file mode 100644
index 0000000..3cd8860
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/DhcpLeaseParcelable.aidl
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) 2020, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net.dhcp;
+@JavaDerive(toString=true)
+parcelable DhcpLeaseParcelable {
+  byte[] clientId;
+  byte[] hwAddr;
+  int netAddr;
+  int prefixLength;
+  long expTime;
+  String hostname;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/DhcpServingParamsParcel.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/DhcpServingParamsParcel.aidl
new file mode 100644
index 0000000..7997936
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/DhcpServingParamsParcel.aidl
@@ -0,0 +1,49 @@
+/**
+ *
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net.dhcp;
+@JavaDerive(toString=true)
+parcelable DhcpServingParamsParcel {
+  int serverAddr;
+  int serverAddrPrefixLength;
+  int[] defaultRouters;
+  int[] dnsServers;
+  int[] excludedAddrs;
+  long dhcpLeaseTimeSecs;
+  int linkMtu;
+  boolean metered;
+  int singleClientAddr = 0;
+  boolean changePrefixOnDecline = false;
+  int leasesSubnetPrefixLength = 0;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/IDhcpEventCallbacks.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/IDhcpEventCallbacks.aidl
new file mode 100644
index 0000000..9312f47
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/IDhcpEventCallbacks.aidl
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) 2020, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net.dhcp;
+interface IDhcpEventCallbacks {
+  oneway void onLeasesChanged(in List<android.net.dhcp.DhcpLeaseParcelable> newLeases);
+  oneway void onNewPrefixRequest(in android.net.IpPrefix currentPrefix);
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/IDhcpServer.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/IDhcpServer.aidl
new file mode 100644
index 0000000..1109f35
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/IDhcpServer.aidl
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) 2018, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net.dhcp;
+/* @hide */
+interface IDhcpServer {
+  oneway void start(in android.net.INetworkStackStatusCallback cb) = 0;
+  oneway void startWithCallbacks(in android.net.INetworkStackStatusCallback statusCb, in android.net.dhcp.IDhcpEventCallbacks eventCb) = 3;
+  oneway void updateParams(in android.net.dhcp.DhcpServingParamsParcel params, in android.net.INetworkStackStatusCallback cb) = 1;
+  oneway void stop(in android.net.INetworkStackStatusCallback cb) = 2;
+  const int STATUS_UNKNOWN = 0;
+  const int STATUS_SUCCESS = 1;
+  const int STATUS_INVALID_ARGUMENT = 2;
+  const int STATUS_UNKNOWN_ERROR = 3;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/IDhcpServerCallbacks.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/IDhcpServerCallbacks.aidl
new file mode 100644
index 0000000..ab8577c
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/dhcp/IDhcpServerCallbacks.aidl
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) 2018, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net.dhcp;
+/* @hide */
+interface IDhcpServerCallbacks {
+  oneway void onDhcpServerCreated(int statusCode, in android.net.dhcp.IDhcpServer server);
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/ip/IIpClient.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/ip/IIpClient.aidl
new file mode 100644
index 0000000..b81ec20
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/ip/IIpClient.aidl
@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net.ip;
+/* @hide */
+interface IIpClient {
+  oneway void completedPreDhcpAction();
+  oneway void confirmConfiguration();
+  oneway void readPacketFilterComplete(in byte[] data);
+  oneway void shutdown();
+  oneway void startProvisioning(in android.net.ProvisioningConfigurationParcelable req);
+  oneway void stop();
+  oneway void setTcpBufferSizes(in String tcpBufferSizes);
+  oneway void setHttpProxy(in android.net.ProxyInfo proxyInfo);
+  oneway void setMulticastFilter(boolean enabled);
+  oneway void addKeepalivePacketFilter(int slot, in android.net.TcpKeepalivePacketDataParcelable pkt);
+  oneway void removeKeepalivePacketFilter(int slot);
+  oneway void setL2KeyAndGroupHint(in String l2Key, in String cluster);
+  oneway void addNattKeepalivePacketFilter(int slot, in android.net.NattKeepalivePacketDataParcelable pkt);
+  oneway void notifyPreconnectionComplete(boolean success);
+  oneway void updateLayer2Information(in android.net.Layer2InformationParcelable info);
+  oneway void updateApfCapabilities(in android.net.apf.ApfCapabilities apfCapabilities);
+  const int PROV_IPV4_DISABLED = 0x00;
+  const int PROV_IPV4_STATIC = 0x01;
+  const int PROV_IPV4_DHCP = 0x02;
+  const int PROV_IPV6_DISABLED = 0x00;
+  const int PROV_IPV6_SLAAC = 0x01;
+  const int PROV_IPV6_LINKLOCAL = 0x02;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/ip/IIpClientCallbacks.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/ip/IIpClientCallbacks.aidl
new file mode 100644
index 0000000..9d36419
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/ip/IIpClientCallbacks.aidl
@@ -0,0 +1,54 @@
+/**
+ * Copyright (c) 2019, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net.ip;
+/* @hide */
+interface IIpClientCallbacks {
+  oneway void onIpClientCreated(in android.net.ip.IIpClient ipClient);
+  oneway void onPreDhcpAction();
+  oneway void onPostDhcpAction();
+  oneway void onNewDhcpResults(in android.net.DhcpResultsParcelable dhcpResults);
+  oneway void onProvisioningSuccess(in android.net.LinkProperties newLp);
+  oneway void onProvisioningFailure(in android.net.LinkProperties newLp);
+  oneway void onLinkPropertiesChange(in android.net.LinkProperties newLp);
+  oneway void onReachabilityLost(in String logMsg);
+  oneway void onQuit();
+  oneway void installPacketFilter(in byte[] filter);
+  oneway void startReadPacketFilter();
+  oneway void setFallbackMulticastFilter(boolean enabled);
+  oneway void setNeighborDiscoveryOffload(boolean enable);
+  oneway void onPreconnectionStart(in List<android.net.Layer2PacketParcelable> packets);
+  oneway void onReachabilityFailure(in android.net.networkstack.aidl.ip.ReachabilityLossInfoParcelable lossInfo);
+  oneway void setMaxDtimMultiplier(int multiplier);
+  const int DTIM_MULTIPLIER_RESET = 0;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/networkstack/aidl/NetworkMonitorParameters.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/networkstack/aidl/NetworkMonitorParameters.aidl
new file mode 100644
index 0000000..2ab9db0
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/networkstack/aidl/NetworkMonitorParameters.aidl
@@ -0,0 +1,41 @@
+/**
+ *
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net.networkstack.aidl;
+@JavaDerive(equals=true, toString=true)
+parcelable NetworkMonitorParameters {
+  android.net.NetworkAgentConfig networkAgentConfig;
+  android.net.NetworkCapabilities networkCapabilities;
+  android.net.LinkProperties linkProperties;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/networkstack/aidl/dhcp/DhcpOption.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/networkstack/aidl/dhcp/DhcpOption.aidl
new file mode 100644
index 0000000..eea3e0d
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/networkstack/aidl/dhcp/DhcpOption.aidl
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2020, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing perNmissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net.networkstack.aidl.dhcp;
+@JavaDerive(toString=true)
+parcelable DhcpOption {
+  byte type;
+  @nullable byte[] value;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/networkstack/aidl/ip/ReachabilityLossInfoParcelable.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/networkstack/aidl/ip/ReachabilityLossInfoParcelable.aidl
new file mode 100644
index 0000000..bb88434
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/networkstack/aidl/ip/ReachabilityLossInfoParcelable.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net.networkstack.aidl.ip;
+@JavaDerive(equals=true, toString=true) @JavaOnlyImmutable
+parcelable ReachabilityLossInfoParcelable {
+  String message;
+  android.net.networkstack.aidl.ip.ReachabilityLossReason reason;
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/networkstack/aidl/ip/ReachabilityLossReason.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/networkstack/aidl/ip/ReachabilityLossReason.aidl
new file mode 100644
index 0000000..f9bb3c4
--- /dev/null
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/18/android/net/networkstack/aidl/ip/ReachabilityLossReason.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.net.networkstack.aidl.ip;
+@Backing(type="int")
+enum ReachabilityLossReason {
+  ROAM,
+  CONFIRM,
+  ORGANIC,
+}
diff --git a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/current/android/net/ip/IIpClient.aidl b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/current/android/net/ip/IIpClient.aidl
index 3ba1d0b..b81ec20 100644
--- a/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/current/android/net/ip/IIpClient.aidl
+++ b/common/networkstackclient/aidl_api/networkstack-aidl-interfaces/current/android/net/ip/IIpClient.aidl
@@ -49,6 +49,7 @@
   oneway void addNattKeepalivePacketFilter(int slot, in android.net.NattKeepalivePacketDataParcelable pkt);
   oneway void notifyPreconnectionComplete(boolean success);
   oneway void updateLayer2Information(in android.net.Layer2InformationParcelable info);
+  oneway void updateApfCapabilities(in android.net.apf.ApfCapabilities apfCapabilities);
   const int PROV_IPV4_DISABLED = 0x00;
   const int PROV_IPV4_STATIC = 0x01;
   const int PROV_IPV4_DHCP = 0x02;
diff --git a/common/networkstackclient/lint-baseline.xml b/common/networkstackclient/lint-baseline.xml
new file mode 100644
index 0000000..046b948
--- /dev/null
+++ b/common/networkstackclient/lint-baseline.xml
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="6" by="lint 8.0.0-dev" type="baseline" dependencies="true" variant="all" version="8.0.0-dev">
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getDstAddress`"
+        errorLine1="        final InetAddress dstAddress = pkt.getDstAddress();"
+        errorLine2="                                           ~~~~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="54"
+            column="44"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getDstAddress`"
+        errorLine1="        final InetAddress dstAddress = pkt.getDstAddress();"
+        errorLine2="                                           ~~~~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="70"
+            column="44"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getDstAddress`"
+        errorLine1="        p.dstAddress = data.getDstAddress().getAddress();"
+        errorLine2="                            ~~~~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="136"
+            column="29"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getDstPort`"
+        errorLine1="        p.dstPort = data.getDstPort();"
+        errorLine2="                         ~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="137"
+            column="26"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getDstPort`"
+        errorLine1="        parcel.dstPort = pkt.getDstPort();"
+        errorLine2="                             ~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="58"
+            column="30"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getDstPort`"
+        errorLine1="        parcel.dstPort = pkt.getDstPort();"
+        errorLine2="                             ~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="74"
+            column="30"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getPacket`"
+        errorLine1="        final ByteBuffer buffer = ByteBuffer.wrap(data.getPacket());"
+        errorLine2="                                                       ~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="110"
+            column="56"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getSrcAddress`"
+        errorLine1="        final InetAddress srcAddress = pkt.getSrcAddress();"
+        errorLine2="                                           ~~~~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="53"
+            column="44"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getSrcAddress`"
+        errorLine1="        final InetAddress srcAddress = pkt.getSrcAddress();"
+        errorLine2="                                           ~~~~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="69"
+            column="44"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getSrcAddress`"
+        errorLine1="        p.srcAddress = data.getSrcAddress().getAddress();"
+        errorLine2="                            ~~~~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="134"
+            column="29"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getSrcPort`"
+        errorLine1="        p.srcPort = data.getSrcPort();"
+        errorLine2="                         ~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="135"
+            column="26"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getSrcPort`"
+        errorLine1="        parcel.srcPort = pkt.getSrcPort();"
+        errorLine2="                             ~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="56"
+            column="30"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.KeepalivePacketData#getSrcPort`"
+        errorLine1="        parcel.srcPort = pkt.getSrcPort();"
+        errorLine2="                             ~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/util/KeepalivePacketDataUtil.java"
+            line="72"
+            column="30"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.NetworkStack#getService`"
+        errorLine1="            while ((nss = NetworkStack.getService()) == null) {"
+        errorLine2="                                       ~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/networkstack/ModuleNetworkStackClient.java"
+            line="87"
+            column="40"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.NetworkStack#getService`"
+        errorLine1="        final IBinder nss = NetworkStack.getService();"
+        errorLine2="                                         ~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/common/networkstackclient/src/android/net/networkstack/ModuleNetworkStackClient.java"
+            line="68"
+            column="42"/>
+    </issue>
+
+</issues>
\ No newline at end of file
diff --git a/common/networkstackclient/src/android/net/ip/IIpClient.aidl b/common/networkstackclient/src/android/net/ip/IIpClient.aidl
index f76a230..6c3346e 100644
--- a/common/networkstackclient/src/android/net/ip/IIpClient.aidl
+++ b/common/networkstackclient/src/android/net/ip/IIpClient.aidl
@@ -20,6 +20,7 @@
 import android.net.ProvisioningConfigurationParcelable;
 import android.net.NattKeepalivePacketDataParcelable;
 import android.net.TcpKeepalivePacketDataParcelable;
+import android.net.apf.ApfCapabilities;
 
 /** @hide */
 oneway interface IIpClient {
@@ -69,4 +70,16 @@
     void addNattKeepalivePacketFilter(int slot, in NattKeepalivePacketDataParcelable pkt);
     void notifyPreconnectionComplete(boolean success);
     void updateLayer2Information(in Layer2InformationParcelable info);
+    /**
+     * Update the APF capabilities.
+     *
+     * This method will update the APF capabilities used in IpClient and decide if a new APF
+     * program should be installed to filter the incoming packets based on that. So far this
+     * method only allows for the APF capabilities to go from null to non-null, and no other
+     * changes are allowed. One use case is when WiFi interface switches from secondary to
+     * primary in STA+STA mode.
+     *
+     * @param apfCapabilities the APF capabilities to update, should be non-null.
+     */
+    void updateApfCapabilities(in ApfCapabilities apfCapabilities);
 }
diff --git a/common/networkstackclient/src/android/net/ip/IpClientManager.java b/common/networkstackclient/src/android/net/ip/IpClientManager.java
index b45405f..3a8cdda 100644
--- a/common/networkstackclient/src/android/net/ip/IpClientManager.java
+++ b/common/networkstackclient/src/android/net/ip/IpClientManager.java
@@ -22,6 +22,7 @@
 import android.net.ProxyInfo;
 import android.net.TcpKeepalivePacketData;
 import android.net.TcpKeepalivePacketDataParcelable;
+import android.net.apf.ApfCapabilities;
 import android.net.shared.Layer2Information;
 import android.net.shared.ProvisioningConfiguration;
 import android.net.util.KeepalivePacketDataUtil;
@@ -323,4 +324,26 @@
             Binder.restoreCallingIdentity(token);
         }
     }
+
+    /**
+     * Update the APF capabilities.
+     *
+     * This method will update the APF capabilities used in IpClient and decide if a new APF
+     * program should be installed to filter the incoming packets based on that. So far this
+     * method only allows for the APF capabilities to go from null to non-null, and no other
+     * changes are allowed. One use case is when WiFi interface switches from secondary to
+     * primary in STA+STA mode.
+     */
+    public boolean updateApfCapabilities(ApfCapabilities apfCapabilities) {
+        final long token = Binder.clearCallingIdentity();
+        try {
+            mIpClient.updateApfCapabilities(apfCapabilities);
+            return true;
+        } catch (RemoteException e) {
+            log("Error updating APF capabilities", e);
+            return false;
+        } finally {
+            Binder.restoreCallingIdentity(token);
+        }
+    }
 }
diff --git a/lint-baseline.xml b/lint-baseline.xml
new file mode 100644
index 0000000..1517328
--- /dev/null
+++ b/lint-baseline.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="6" by="lint 8.0.0-dev" type="baseline" dependencies="true" variant="all" version="8.0.0-dev">
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.CaptivePortalData#getUserPortalUrl`"
+        errorLine1="                                mLinkProperties.getCaptivePortalData().getUserPortalUrl()"
+        errorLine2="                                                                       ~~~~~~~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java"
+            line="1734"
+            column="72"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.CaptivePortalData#getUserPortalUrl`"
+        errorLine1="                        mLinkProperties.getCaptivePortalData().getUserPortalUrl()"
+        errorLine2="                                                               ~~~~~~~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java"
+            line="1370"
+            column="64"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.LinkProperties#getCaptivePortalData`"
+        errorLine1="                                mLinkProperties.getCaptivePortalData().getUserPortalUrl()"
+        errorLine2="                                                ~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java"
+            line="1734"
+            column="49"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 30 (current min is 29): `android.net.LinkProperties#getCaptivePortalData`"
+        errorLine1="                        mLinkProperties.getCaptivePortalData().getUserPortalUrl()"
+        errorLine2="                                        ~~~~~~~~~~~~~~~~~~~~">
+        <location
+            file="packages/modules/NetworkStack/src/com/android/server/connectivity/NetworkMonitor.java"
+            line="1370"
+            column="41"/>
+    </issue>
+
+</issues>
\ No newline at end of file
diff --git a/src/android/net/ip/IpClient.java b/src/android/net/ip/IpClient.java
index 5737d87..0ceaed7 100644
--- a/src/android/net/ip/IpClient.java
+++ b/src/android/net/ip/IpClient.java
@@ -486,6 +486,7 @@
     private static final int CMD_COMPLETE_PRECONNECTION = 16;
     private static final int CMD_UPDATE_L2INFORMATION = 17;
     private static final int CMD_SET_DTIM_MULTIPLIER_AFTER_DELAY = 18;
+    private static final int CMD_UPDATE_APF_CAPABILITIES = 19;
 
     private static final int ARG_LINKPROP_CHANGED_LINKSTATE_DOWN = 0;
     private static final int ARG_LINKPROP_CHANGED_LINKSTATE_UP = 1;
@@ -647,6 +648,7 @@
     private boolean mHasDisabledIpv6OrAcceptRaOnProvLoss;
     private Integer mDadTransmits = null;
     private int mMaxDtimMultiplier = DTIM_MULTIPLIER_RESET;
+    private ApfCapabilities mCurrentApfCapabilities;
 
     /**
      * Reading the snapshot is an asynchronous operation initiated by invoking
@@ -942,6 +944,11 @@
             enforceNetworkStackCallingPermission();
             IpClient.this.updateLayer2Information(info);
         }
+        @Override
+        public void updateApfCapabilities(ApfCapabilities apfCapabilities) {
+            enforceNetworkStackCallingPermission();
+            IpClient.this.updateApfCapabilities(apfCapabilities);
+        }
 
         @Override
         public int getInterfaceVersion() {
@@ -1052,6 +1059,7 @@
 
         mCurrentBssid = getInitialBssid(req.mLayer2Info, req.mScanResultInfo,
                 ShimUtils.isAtLeastS());
+        mCurrentApfCapabilities = req.mApfCapabilities;
         if (req.mLayer2Info != null) {
             mL2Key = req.mLayer2Info.mL2Key;
             mCluster = req.mLayer2Info.mCluster;
@@ -1176,6 +1184,19 @@
     }
 
     /**
+     * Update the APF capabilities.
+     *
+     * This method will update the APF capabilities used in IpClient and decide if a new APF
+     * program should be installed to filter the incoming packets based on that. So far this
+     * method only allows for the APF capabilities to go from null to non-null, and no other
+     * changes are allowed. One use case is when WiFi interface switches from secondary to
+     * primary in STA+STA mode.
+     */
+    public void updateApfCapabilities(@NonNull ApfCapabilities apfCapabilities) {
+        sendMessage(CMD_UPDATE_APF_CAPABILITIES, apfCapabilities);
+    }
+
+    /**
      * Dump logs of this IpClient.
      */
     public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
@@ -2173,6 +2194,45 @@
         mCurrentBssid = info.bssid;
     }
 
+    @Nullable
+    private ApfFilter maybeCreateApfFilter(final ApfCapabilities apfCapabilities) {
+        ApfFilter.ApfConfiguration apfConfig = new ApfFilter.ApfConfiguration();
+        apfConfig.apfCapabilities = apfCapabilities;
+        apfConfig.multicastFilter = mMulticastFiltering;
+        // Get the Configuration for ApfFilter from Context
+        // Resource settings were moved from ApfCapabilities APIs to NetworkStack resources in S
+        if (ShimUtils.isReleaseOrDevelopmentApiAbove(Build.VERSION_CODES.R)) {
+            final Resources res = mContext.getResources();
+            apfConfig.ieee802_3Filter = res.getBoolean(R.bool.config_apfDrop802_3Frames);
+            apfConfig.ethTypeBlackList = res.getIntArray(R.array.config_apfEthTypeDenyList);
+        } else {
+            apfConfig.ieee802_3Filter = ApfCapabilities.getApfDrop8023Frames();
+            apfConfig.ethTypeBlackList = ApfCapabilities.getApfEtherTypeBlackList();
+        }
+
+        apfConfig.minRdnssLifetimeSec = mMinRdnssLifetimeSec;
+        return mDependencies.maybeCreateApfFilter(mContext, apfConfig, mInterfaceParams,
+                mCallback);
+    }
+
+    private boolean handleUpdateApfCapabilities(@NonNull final ApfCapabilities apfCapabilities) {
+        // For the use case where the wifi interface switches from secondary to primary, the
+        // secondary interface does not support APF by default see the overlay config about
+        // {@link config_wifiEnableApfOnNonPrimarySta}. so we should see empty ApfCapabilities
+        // in {@link ProvisioningConfiguration} when wifi starts provisioning on the secondary
+        // interface. For other cases, we should not accept the updateApfCapabilities call.
+        if (mCurrentApfCapabilities != null || apfCapabilities == null) {
+            Log.wtf(mTag, "current ApfCapabilities " + mCurrentApfCapabilities
+                    + " is not null or new ApfCapabilities " + apfCapabilities + " is null");
+            return false;
+        }
+        if (mApfFilter != null) {
+            mApfFilter.shutdown();
+        }
+        mCurrentApfCapabilities = apfCapabilities;
+        return apfCapabilities != null;
+    }
+
     class StoppedState extends State {
         @Override
         public void enter() {
@@ -2463,6 +2523,7 @@
         @Override
         public void exit() {
             mProvisioningTimeoutAlarm.cancel();
+            mCurrentApfCapabilities = null;
 
             // Record metrics information once this provisioning has completed due to certain
             // reason (normal termination, provisioning timeout, lost provisioning and etc).
@@ -2494,6 +2555,13 @@
                     handleUpdateL2Information((Layer2InformationParcelable) msg.obj);
                     break;
 
+                // Only update the current ApfCapabilities but do not create and start APF
+                // filter until transition to RunningState, actually we should always do that
+                // in RunningState.
+                case CMD_UPDATE_APF_CAPABILITIES:
+                    handleUpdateApfCapabilities((ApfCapabilities) msg.obj);
+                    break;
+
                 case EVENT_PROVISIONING_TIMEOUT:
                     handleProvisioningFailure(DisconnectCode.DC_PROVISIONING_TIMEOUT);
                     break;
@@ -2521,23 +2589,7 @@
 
         @Override
         public void enter() {
-            ApfFilter.ApfConfiguration apfConfig = new ApfFilter.ApfConfiguration();
-            apfConfig.apfCapabilities = mConfiguration.mApfCapabilities;
-            apfConfig.multicastFilter = mMulticastFiltering;
-            // Get the Configuration for ApfFilter from Context
-            // Resource settings were moved from ApfCapabilities APIs to NetworkStack resources in S
-            if (ShimUtils.isReleaseOrDevelopmentApiAbove(Build.VERSION_CODES.R)) {
-                final Resources res = mContext.getResources();
-                apfConfig.ieee802_3Filter = res.getBoolean(R.bool.config_apfDrop802_3Frames);
-                apfConfig.ethTypeBlackList = res.getIntArray(R.array.config_apfEthTypeDenyList);
-            } else {
-                apfConfig.ieee802_3Filter = ApfCapabilities.getApfDrop8023Frames();
-                apfConfig.ethTypeBlackList = ApfCapabilities.getApfEtherTypeBlackList();
-            }
-
-            apfConfig.minRdnssLifetimeSec = mMinRdnssLifetimeSec;
-            mApfFilter = mDependencies.maybeCreateApfFilter(mContext, apfConfig, mInterfaceParams,
-                    mCallback);
+            mApfFilter = maybeCreateApfFilter(mCurrentApfCapabilities);
             // TODO: investigate the effects of any multicast filtering racing/interfering with the
             // rest of this IP configuration startup.
             if (mApfFilter == null) {
@@ -2817,6 +2869,13 @@
                     updateMaxDtimMultiplier();
                     break;
 
+                case CMD_UPDATE_APF_CAPABILITIES:
+                    final ApfCapabilities apfCapabilities = (ApfCapabilities) msg.obj;
+                    if (handleUpdateApfCapabilities(apfCapabilities)) {
+                        mApfFilter = maybeCreateApfFilter(apfCapabilities);
+                    }
+                    break;
+
                 default:
                     return NOT_HANDLED;
             }
diff --git a/src/android/net/ip/IpClientLinkObserver.java b/src/android/net/ip/IpClientLinkObserver.java
index f1fb3da..bd4095b 100644
--- a/src/android/net/ip/IpClientLinkObserver.java
+++ b/src/android/net/ip/IpClientLinkObserver.java
@@ -28,6 +28,7 @@
 import static com.android.net.module.util.netlink.NetlinkConstants.RTPROT_KERNEL;
 import static com.android.net.module.util.netlink.NetlinkConstants.RTPROT_RA;
 import static com.android.net.module.util.netlink.NetlinkConstants.RT_SCOPE_UNIVERSE;
+import static com.android.networkstack.util.NetworkStackUtils.IPCLIENT_ACCEPT_IPV6_LINK_LOCAL_DNS_VERSION;
 import static com.android.networkstack.util.NetworkStackUtils.IPCLIENT_PARSE_NETLINK_EVENTS_VERSION;
 
 import android.app.AlarmManager;
@@ -203,6 +204,11 @@
         mHandler.post(mNetlinkMonitor::stop);
     }
 
+    private boolean isIpv6LinkLocalDnsAccepted() {
+        return mDependencies.isFeatureEnabled(mContext,
+                IPCLIENT_ACCEPT_IPV6_LINK_LOCAL_DNS_VERSION, true /* default value */);
+    }
+
     private void maybeLog(String operation, String iface, LinkAddress address) {
         if (DBG) {
             Log.d(mTag, operation + ": " + address + " on " + iface
@@ -540,8 +546,10 @@
             if (!mNetlinkEventParsingEnabled) return;
             final String[] addresses = new String[opt.servers.length];
             for (int i = 0; i < opt.servers.length; i++) {
-                final Inet6Address addr = opt.servers[i];
-                addresses[i] = InetAddressUtils.withScopeId(addr, mIfindex).getHostAddress();
+                final Inet6Address addr = isIpv6LinkLocalDnsAccepted()
+                        ? InetAddressUtils.withScopeId(opt.servers[i], mIfindex)
+                        : opt.servers[i];
+                addresses[i] = addr.getHostAddress();
             }
             updateInterfaceDnsServerInfo(opt.header.lifetime, addresses);
         }
diff --git a/src/com/android/networkstack/util/NetworkStackUtils.java b/src/com/android/networkstack/util/NetworkStackUtils.java
index 147c33a..e87b824 100755
--- a/src/com/android/networkstack/util/NetworkStackUtils.java
+++ b/src/com/android/networkstack/util/NetworkStackUtils.java
@@ -240,6 +240,14 @@
             "ipclient_parse_netlink_events_version";
 
     /**
+     * Experiment flag to check if an on-link IPv6 link local DNS is acceptable. The default flag
+     * value is true, just add this flag for A/B testing to see if this fix works as expected via
+     * experiment rollout.
+     */
+    public static final String IPCLIENT_ACCEPT_IPV6_LINK_LOCAL_DNS_VERSION =
+            "ipclient_accept_ipv6_link_local_dns_version";
+
+    /**
      * Experiment flag to disable accept_ra parameter when IPv6 provisioning loss happens due to
      * the default route has gone.
      */
diff --git a/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java b/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java
index 2fb5ac8..69e7b69 100644
--- a/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java
+++ b/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java
@@ -2046,12 +2046,14 @@
         reset(mCb);
     }
 
-    @Test
-    public void testRaRdnss_Ipv6LinkLocalDns() throws Exception {
+    private void runRaRdnssIpv6LinkLocalDnsTest(boolean isIpv6LinkLocalDnsAccepted)
+            throws Exception {
         ProvisioningConfiguration config = new ProvisioningConfiguration.Builder()
                 .withoutIpReachabilityMonitor()
                 .withoutIPv4()
                 .build();
+        setFeatureEnabled(NetworkStackUtils.IPCLIENT_ACCEPT_IPV6_LINK_LOCAL_DNS_VERSION,
+                isIpv6LinkLocalDnsAccepted /* default value */);
         startIpClientProvisioning(config);
 
         final ByteBuffer pio = buildPioOption(600, 300, "2001:db8:1::/64");
@@ -2063,7 +2065,11 @@
 
         waitForRouterSolicitation();
         mPacketReader.sendResponse(ra);
+    }
 
+    @Test
+    public void testRaRdnss_Ipv6LinkLocalDns() throws Exception {
+        runRaRdnssIpv6LinkLocalDnsTest(true /* isIpv6LinkLocalDnsAccepted */);
         final ArgumentCaptor<LinkProperties> captor = ArgumentCaptor.forClass(LinkProperties.class);
         verify(mCb, timeout(TEST_TIMEOUT_MS)).onProvisioningSuccess(captor.capture());
         final LinkProperties lp = captor.getValue();
@@ -2073,6 +2079,20 @@
         assertTrue(lp.isIpv6Provisioned());
     }
 
+    @Test
+    public void testRaRdnss_disableIpv6LinkLocalDns() throws Exception {
+        // Only run the test when the flag of parsing netlink events is enabled, feature flag
+        // "ipclient_accept_ipv6_link_local_dns" doesn't affect the legacy code.
+        assumeTrue(mIsNetlinkEventParseEnabled);
+        runRaRdnssIpv6LinkLocalDnsTest(false /* isIpv6LinkLocalDnsAccepted */);
+        verify(mCb, timeout(TEST_TIMEOUT_MS)).onLinkPropertiesChange(argThat(lp -> {
+            return lp.hasGlobalIpv6Address()
+                    && lp.hasIpv6DefaultRoute()
+                    && !lp.hasIpv6DnsServer();
+        }));
+        verify(mCb, never()).onProvisioningSuccess(any());
+    }
+
     private void expectNat64PrefixUpdate(InOrder inOrder, IpPrefix expected) throws Exception {
         inOrder.verify(mCb, timeout(TEST_TIMEOUT_MS)).onLinkPropertiesChange(
                 argThat(lp -> Objects.equals(expected, lp.getNat64Prefix())));
diff --git a/tests/integration/lint-baseline.xml b/tests/integration/lint-baseline.xml
index 1868549..edc9dac 100644
--- a/tests/integration/lint-baseline.xml
+++ b/tests/integration/lint-baseline.xml
@@ -3,57 +3,42 @@
 
     <issue
         id="NewApi"
-        message="Call requires API level R (current min is 29): `android.net.LinkProperties#getDhcpServerAddress`"
-        errorLine1="        assertEquals(SERVER_ADDR, captor.getValue().getDhcpServerAddress());"
-        errorLine2="                                                    ~~~~~~~~~~~~~~~~~~~~">
+        message="Call requires API level 30 (current min is 29): `android.net.LinkProperties#getDhcpServerAddress`">
         <location
             file="packages/modules/NetworkStack/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java"
-            line="1513"
-            column="53"/>
+            line="1574"/>
     </issue>
 
     <issue
         id="NewApi"
-        message="Call requires API level R (current min is 29): `android.net.LinkProperties#getNat64Prefix`"
-        errorLine1="                argThat(lp -> Objects.equals(expected, lp.getNat64Prefix())));"
-        errorLine2="                                                          ~~~~~~~~~~~~~~">
+        message="Call requires API level 30 (current min is 29): `android.net.LinkProperties#getNat64Prefix`">
         <location
             file="packages/modules/NetworkStack/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java"
-            line="1836"
-            column="59"/>
+            line="2014"/>
     </issue>
 
     <issue
         id="NewApi"
-        message="Call requires API level R (current min is 29): `android.net.LinkProperties#getNat64Prefix`"
-        errorLine1="                lp -> !Objects.equals(unchanged, lp.getNat64Prefix())));"
-        errorLine2="                                                    ~~~~~~~~~~~~~~">
+        message="Call requires API level 30 (current min is 29): `android.net.LinkProperties#getNat64Prefix`">
         <location
             file="packages/modules/NetworkStack/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java"
-            line="1842"
-            column="53"/>
+            line="2020"/>
     </issue>
 
     <issue
         id="NewApi"
-        message="Call requires API level R (current min is 29): `android.net.LinkProperties#getNat64Prefix`"
-        errorLine1="        if (lp.getNat64Prefix() != null) {"
-        errorLine2="               ~~~~~~~~~~~~~~">
+        message="Call requires API level 30 (current min is 29): `android.net.LinkProperties#getNat64Prefix`">
         <location
             file="packages/modules/NetworkStack/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java"
-            line="1873"
-            column="16"/>
+            line="2050"/>
     </issue>
 
     <issue
         id="NewApi"
-        message="Call requires API level R (current min is 29): `android.net.LinkProperties#getNat64Prefix`"
-        errorLine1="            assertEquals(prefix, lp.getNat64Prefix());"
-        errorLine2="                                    ~~~~~~~~~~~~~~">
+        message="Call requires API level 30 (current min is 29): `android.net.LinkProperties#getNat64Prefix`">
         <location
             file="packages/modules/NetworkStack/tests/integration/common/android/net/ip/IpClientIntegrationTestCommon.java"
-            line="1874"
-            column="37"/>
+            line="2051"/>
     </issue>
 
-</issues>
+</issues>
\ No newline at end of file
diff --git a/tests/unit/lint-baseline.xml b/tests/unit/lint-baseline.xml
index 0bfcaa9..f8b1c29 100644
--- a/tests/unit/lint-baseline.xml
+++ b/tests/unit/lint-baseline.xml
@@ -3,79 +3,58 @@
 
     <issue
         id="NewApi"
-        message="Call requires API level R (current min is 29): `android.net.NetworkCapabilities()`"
-        errorLine1="    private val EMPTY_CAPABILITIES = NetworkCapabilities()"
-        errorLine2="                                     ~~~~~~~~~~~~~~~~~~~~~">
+        message="Call requires API level 30 (current min is 29): `android.net.NetworkCapabilities()`">
         <location
             file="packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/NetworkStackNotifierTest.kt"
-            line="134"
-            column="38"/>
+            line="136"/>
     </issue>
 
     <issue
         id="NewApi"
-        message="Call requires API level R (current min is 29): `android.net.NetworkCapabilities()`"
-        errorLine1="    private val VALIDATED_CAPABILITIES = NetworkCapabilities()"
-        errorLine2="                                         ~~~~~~~~~~~~~~~~~~~~~">
+        message="Call requires API level 30 (current min is 29): `android.net.NetworkCapabilities()`">
         <location
             file="packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/NetworkStackNotifierTest.kt"
-            line="135"
-            column="42"/>
+            line="137"/>
     </issue>
 
     <issue
         id="NewApi"
-        message="Call requires API level R (current min is 29): `new android.net.NetworkCapabilities`"
-        errorLine1="            new NetworkCapabilities()"
-        errorLine2="            ~~~~~~~~~~~~~~~~~~~~~~~">
+        message="Call requires API level 30 (current min is 29): `new android.net.NetworkCapabilities`">
         <location
             file="packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/metrics/NetworkValidationMetricsTest.java"
-            line="57"
-            column="13"/>
+            line="57"/>
     </issue>
 
     <issue
         id="NewApi"
-        message="Call requires API level R (current min is 29): `new android.net.NetworkCapabilities`"
-        errorLine1="        NetworkCapabilities nc = new NetworkCapabilities();"
-        errorLine2="                                 ~~~~~~~~~~~~~~~~~~~~~~~">
+        message="Call requires API level 30 (current min is 29): `new android.net.NetworkCapabilities`">
         <location
             file="packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/metrics/NetworkValidationMetricsTest.java"
-            line="109"
-            column="34"/>
+            line="109"/>
     </issue>
 
     <issue
         id="NewApi"
-        message="Call requires API level R (current min is 29): `new android.net.NetworkCapabilities`"
-        errorLine1="        nc = new NetworkCapabilities();"
-        errorLine2="             ~~~~~~~~~~~~~~~~~~~~~~~">
+        message="Call requires API level 30 (current min is 29): `new android.net.NetworkCapabilities`">
         <location
             file="packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/metrics/NetworkValidationMetricsTest.java"
-            line="117"
-            column="14"/>
+            line="117"/>
     </issue>
 
     <issue
         id="NewApi"
-        message="Call requires API level R (current min is 29): `new android.net.NetworkCapabilities`"
-        errorLine1="        nc = new NetworkCapabilities();"
-        errorLine2="             ~~~~~~~~~~~~~~~~~~~~~~~">
+        message="Call requires API level 30 (current min is 29): `new android.net.NetworkCapabilities`">
         <location
             file="packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/metrics/NetworkValidationMetricsTest.java"
-            line="123"
-            column="14"/>
+            line="123"/>
     </issue>
 
     <issue
         id="NewApi"
-        message="Call requires API level R (current min is 29): `new android.net.NetworkCapabilities`"
-        errorLine1="        nc = new NetworkCapabilities();"
-        errorLine2="             ~~~~~~~~~~~~~~~~~~~~~~~">
+        message="Call requires API level 30 (current min is 29): `new android.net.NetworkCapabilities`">
         <location
             file="packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/metrics/NetworkValidationMetricsTest.java"
-            line="129"
-            column="14"/>
+            line="129"/>
     </issue>
 
-</issues>
+</issues>
\ No newline at end of file
diff --git a/tests/unit/src/android/net/ip/IpClientTest.java b/tests/unit/src/android/net/ip/IpClientTest.java
index 8efa9ab..4ed8081 100644
--- a/tests/unit/src/android/net/ip/IpClientTest.java
+++ b/tests/unit/src/android/net/ip/IpClientTest.java
@@ -23,12 +23,14 @@
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.anyBoolean;
 import static org.mockito.Mockito.anyString;
+import static org.mockito.Mockito.clearInvocations;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.eq;
 import static org.mockito.Mockito.never;
@@ -686,17 +688,18 @@
         return out;
     }
 
-    private ApfConfiguration verifyApfFilterCreatedOnStart(IpClient ipc) {
-        ProvisioningConfiguration config = new ProvisioningConfiguration.Builder()
+    private ApfConfiguration verifyApfFilterCreatedOnStart(IpClient ipc, boolean isApfSupported) {
+        ProvisioningConfiguration.Builder config = new ProvisioningConfiguration.Builder()
                 .withoutIPv4()
                 .withoutIpReachabilityMonitor()
                 .withInitialConfiguration(
-                        conf(links(TEST_LOCAL_ADDRESSES), prefixes(TEST_PREFIXES), ips()))
-                .withApfCapabilities(new ApfCapabilities(
-                        4 /* version */, 4096 /* maxProgramSize */, 4 /* format */))
-                .build();
+                        conf(links(TEST_LOCAL_ADDRESSES), prefixes(TEST_PREFIXES), ips()));
+        if (isApfSupported) {
+            config.withApfCapabilities(new ApfCapabilities(4 /* version */,
+                    4096 /* maxProgramSize */, 4 /* format */));
+        }
 
-        ipc.startProvisioning(config);
+        ipc.startProvisioning(config.build());
         final ArgumentCaptor<ApfConfiguration> configCaptor = ArgumentCaptor.forClass(
                 ApfConfiguration.class);
         verify(mDependencies, timeout(TEST_TIMEOUT_MS)).maybeCreateApfFilter(
@@ -708,7 +711,8 @@
     @Test @IgnoreAfter(Build.VERSION_CODES.R)
     public void testApfConfiguration_R() throws Exception {
         final IpClient ipc = makeIpClient(TEST_IFNAME);
-        final ApfConfiguration config = verifyApfFilterCreatedOnStart(ipc);
+        final ApfConfiguration config = verifyApfFilterCreatedOnStart(ipc,
+                true /* isApfSupported */);
 
         assertEquals(ApfCapabilities.getApfDrop8023Frames(), config.ieee802_3Filter);
         assertArrayEquals(ApfCapabilities.getApfEtherTypeBlackList(), config.ethTypeBlackList);
@@ -727,7 +731,8 @@
                 R.array.config_apfEthTypeDenyList);
 
         final IpClient ipc = makeIpClient(TEST_IFNAME);
-        final ApfConfiguration config = verifyApfFilterCreatedOnStart(ipc);
+        final ApfConfiguration config = verifyApfFilterCreatedOnStart(ipc,
+                true /* isApfSupported */);
 
         assertTrue(config.ieee802_3Filter);
         assertArrayEquals(ethTypeDenyList, config.ethTypeBlackList);
@@ -743,7 +748,8 @@
                 R.array.config_apfEthTypeDenyList);
 
         final IpClient ipc = makeIpClient(TEST_IFNAME);
-        final ApfConfiguration config = verifyApfFilterCreatedOnStart(ipc);
+        final ApfConfiguration config = verifyApfFilterCreatedOnStart(ipc,
+                true /* isApfSupported */);
 
         assertFalse(config.ieee802_3Filter);
         assertArrayEquals(ethTypeDenyList, config.ethTypeBlackList);
@@ -751,6 +757,61 @@
         verifyShutdown(ipc);
     }
 
+    @Test
+    public void testApfUpdateCapabilities() throws Exception {
+        final IpClient ipc = makeIpClient(TEST_IFNAME);
+        final ApfConfiguration config = verifyApfFilterCreatedOnStart(ipc,
+                false /* isApfSupported */);
+        assertNull(config.apfCapabilities);
+        clearInvocations(mDependencies);
+
+        ipc.updateApfCapabilities(new ApfCapabilities(4 /* version */, 4096 /* maxProgramSize */,
+                4 /* format */));
+        HandlerUtils.waitForIdle(ipc.getHandler(), TEST_TIMEOUT_MS);
+
+        final ArgumentCaptor<ApfConfiguration> configCaptor = ArgumentCaptor.forClass(
+                ApfConfiguration.class);
+        verify(mDependencies, timeout(TEST_TIMEOUT_MS)).maybeCreateApfFilter(
+                any(), configCaptor.capture(), any(), any());
+        final ApfConfiguration actual = configCaptor.getValue();
+        assertNotNull(actual);
+        assertEquals(4, actual.apfCapabilities.apfVersionSupported);
+        assertEquals(4096, actual.apfCapabilities.maximumApfProgramSize);
+        assertEquals(4, actual.apfCapabilities.apfPacketFormat);
+
+        verifyShutdown(ipc);
+    }
+
+    @Test
+    public void testApfUpdateCapabilities_nonNullInitialApfCapabilities() throws Exception {
+        final IpClient ipc = makeIpClient(TEST_IFNAME);
+        final ApfConfiguration config = verifyApfFilterCreatedOnStart(ipc,
+                true /* isApfSupported */);
+        assertNotNull(config.apfCapabilities);
+        clearInvocations(mDependencies);
+
+        final ApfCapabilities newApfCapabilities = new ApfCapabilities(4 /* version */,
+                8192 /* maxProgramSize */, 4 /* format */);
+        ipc.updateApfCapabilities(newApfCapabilities);
+        HandlerUtils.waitForIdle(ipc.getHandler(), TEST_TIMEOUT_MS);
+        verify(mDependencies, never()).maybeCreateApfFilter(any(), any(), any(), any());
+        verifyShutdown(ipc);
+    }
+
+    @Test
+    public void testApfUpdateCapabilities_nullNewApfCapabilities() throws Exception {
+        final IpClient ipc = makeIpClient(TEST_IFNAME);
+        final ApfConfiguration config = verifyApfFilterCreatedOnStart(ipc,
+                true /* isApfSupported */);
+        assertNotNull(config.apfCapabilities);
+        clearInvocations(mDependencies);
+
+        ipc.updateApfCapabilities(null /* apfCapabilities */);
+        HandlerUtils.waitForIdle(ipc.getHandler(), TEST_TIMEOUT_MS);
+        verify(mDependencies, never()).maybeCreateApfFilter(any(), any(), any(), any());
+        verifyShutdown(ipc);
+    }
+
     private ScanResultInfo makeScanResultInfo(final String ssid, final String bssid) {
         final ByteBuffer payload = ByteBuffer.allocate(14 /* oui + type + data */);
         final byte[] data = new byte[10];