Merge "Remove Ikev2VpnProfileShim" into tm-dev
diff --git a/apishim/29/com/android/networkstack/apishim/api29/Ikev2VpnProfileBuilderShimImpl.java b/apishim/29/com/android/networkstack/apishim/api29/Ikev2VpnProfileBuilderShimImpl.java
deleted file mode 100644
index ecf3f15..0000000
--- a/apishim/29/com/android/networkstack/apishim/api29/Ikev2VpnProfileBuilderShimImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.networkstack.apishim.api29;
-
-import android.os.Build;
-
-import androidx.annotation.RequiresApi;
-
-import com.android.networkstack.apishim.common.Ikev2VpnProfileBuilderShim;
-
-/**
- * Implementation of Ikev2VpnProfileBuilderShim for API 29.
-  *
- * @param <T> type of builder, typically Ikev2VpnProfile.Builder. This is necessary because at
- *            compile time, shims for older releases will not have access to this class as it
- *            debuted in SDK30. So the user of the shim has to pass it in.
- */
-// NOTE : the trick with the formal parameter only works because when this shim was introduced,
-// the stable API already contained the class that the caller needs to pass in; this won't
-// work for a class added in the latest API level.
-@RequiresApi(Build.VERSION_CODES.Q)
-public class Ikev2VpnProfileBuilderShimImpl<T> implements Ikev2VpnProfileBuilderShim<T> {
-}
diff --git a/apishim/29/com/android/networkstack/apishim/api29/Ikev2VpnProfileShimImpl.java b/apishim/29/com/android/networkstack/apishim/api29/Ikev2VpnProfileShimImpl.java
deleted file mode 100644
index 0f8dae5..0000000
--- a/apishim/29/com/android/networkstack/apishim/api29/Ikev2VpnProfileShimImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.networkstack.apishim.api29;
-
-import com.android.networkstack.apishim.common.Ikev2VpnProfileShim;
-
-/**
- * Implementation of Ikev2VpnProfileShim for API 29.
- * @param <T> type of profile, typically Ikev2VpnProfile
- */
-public class Ikev2VpnProfileShimImpl<T> implements Ikev2VpnProfileShim<T> {
-}
diff --git a/apishim/30/com/android/networkstack/apishim/api30/Ikev2VpnProfileBuilderShimImpl.java b/apishim/30/com/android/networkstack/apishim/api30/Ikev2VpnProfileBuilderShimImpl.java
deleted file mode 100644
index 7c126a3..0000000
--- a/apishim/30/com/android/networkstack/apishim/api30/Ikev2VpnProfileBuilderShimImpl.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.networkstack.apishim.api30;
-
-import android.net.Ikev2VpnProfile;
-import android.net.ProxyInfo;
-import android.os.Build;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.annotation.RequiresApi;
-
-import com.android.networkstack.apishim.common.Ikev2VpnProfileBuilderShim;
-import com.android.networkstack.apishim.common.Ikev2VpnProfileShim;
-import com.android.networkstack.apishim.common.UnsupportedApiLevelException;
-
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-import java.util.List;
-
-/**
- * Implementation of Ikev2VpnProfileBuilderShim for API 30.
- */
-// TODO : when API29 is no longer supported, remove the type argument
-@RequiresApi(Build.VERSION_CODES.R)
-public class Ikev2VpnProfileBuilderShimImpl
-        extends com.android.networkstack.apishim.api29.Ikev2VpnProfileBuilderShimImpl<
-                Ikev2VpnProfile.Builder> {
-    protected Ikev2VpnProfile.Builder mBuilder;
-
-    protected Ikev2VpnProfileBuilderShimImpl(@Nullable String serverAddr,
-            @Nullable String identity, @Nullable Object params) {
-        if (serverAddr != null && identity != null) {
-            mBuilder = new Ikev2VpnProfile.Builder(serverAddr, identity);
-        }
-    }
-    /**
-     * Returns a new instance of this shim impl.
-     */
-    public static Ikev2VpnProfileBuilderShim<Ikev2VpnProfile.Builder> newInstance(
-            @Nullable String serverAddr, @Nullable String identity, @Nullable Object params) {
-        return new Ikev2VpnProfileBuilderShimImpl(serverAddr, identity, params);
-    }
-
-    @Override
-    public Ikev2VpnProfileBuilderShim<Ikev2VpnProfile.Builder> setAuthPsk(@NonNull byte[] psk) {
-        mBuilder.setAuthPsk(psk);
-        return this;
-    }
-
-    @Override
-    public Ikev2VpnProfileBuilderShim<Ikev2VpnProfile.Builder> setAuthUsernamePassword(
-            @NonNull String user, @NonNull String pass, @Nullable X509Certificate serverRootCa)
-            throws UnsupportedApiLevelException {
-        mBuilder.setAuthUsernamePassword(user, pass, serverRootCa);
-        return this;
-    }
-
-    @Override
-    public Ikev2VpnProfileBuilderShim<Ikev2VpnProfile.Builder> setAuthDigitalSignature(
-            @NonNull X509Certificate userCert, @NonNull PrivateKey key,
-            @Nullable X509Certificate serverRootCa) {
-        mBuilder.setAuthDigitalSignature(userCert, key, serverRootCa);
-        return this;
-    }
-
-    @Override
-    public Ikev2VpnProfileBuilderShim<Ikev2VpnProfile.Builder> setBypassable(boolean isBypassable) {
-        mBuilder.setBypassable(true);
-        return this;
-    }
-
-    @Override
-    public Ikev2VpnProfileBuilderShim<Ikev2VpnProfile.Builder> setProxy(@Nullable ProxyInfo proxy) {
-        mBuilder.setProxy(proxy);
-        return this;
-    }
-
-    @Override
-    public Ikev2VpnProfileBuilderShim<Ikev2VpnProfile.Builder> setMaxMtu(int mtu) {
-        mBuilder.setMaxMtu(mtu);
-        return this;
-    }
-
-    @Override
-    public Ikev2VpnProfileBuilderShim<Ikev2VpnProfile.Builder> setMetered(boolean isMetered) {
-        mBuilder.setMetered(isMetered);
-        return this;
-    }
-
-    @Override
-    public Ikev2VpnProfileBuilderShim<Ikev2VpnProfile.Builder> setAllowedAlgorithms(
-            @NonNull List<String> algorithmNames) {
-        mBuilder.setAllowedAlgorithms(algorithmNames);
-        return this;
-    }
-
-    @Override
-    public Ikev2VpnProfile.Builder getBuilder() {
-        return mBuilder;
-    }
-
-    @Override
-    public Ikev2VpnProfileShim build() {
-        return new Ikev2VpnProfileShimImpl(mBuilder.build());
-    }
-}
diff --git a/apishim/30/com/android/networkstack/apishim/api30/Ikev2VpnProfileShimImpl.java b/apishim/30/com/android/networkstack/apishim/api30/Ikev2VpnProfileShimImpl.java
deleted file mode 100644
index 71d68ab..0000000
--- a/apishim/30/com/android/networkstack/apishim/api30/Ikev2VpnProfileShimImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.networkstack.apishim.api30;
-
-import android.net.Ikev2VpnProfile;
-
-/**
- * Implementation of Ikev2VpnProfileShim for API 30.
- */
-// TODO : when API29 is no longer supported, remove the type argument
-public class Ikev2VpnProfileShimImpl extends
-        com.android.networkstack.apishim.api29.Ikev2VpnProfileShimImpl<Ikev2VpnProfile> {
-    protected Ikev2VpnProfile mProfile;
-
-    public Ikev2VpnProfileShimImpl(Ikev2VpnProfile profile) {
-        mProfile = profile;
-    }
-
-    public Ikev2VpnProfile getProfile() {
-        return mProfile;
-    }
-}
diff --git a/apishim/31/com/android/networkstack/apishim/api31/Ikev2VpnProfileBuilderShimImpl.java b/apishim/31/com/android/networkstack/apishim/api31/Ikev2VpnProfileBuilderShimImpl.java
deleted file mode 100644
index de60ff3..0000000
--- a/apishim/31/com/android/networkstack/apishim/api31/Ikev2VpnProfileBuilderShimImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.networkstack.apishim.api31;
-
-import android.os.Build;
-
-import androidx.annotation.Nullable;
-import androidx.annotation.RequiresApi;
-
-/**
- * Implementation of Ikev2VpnProfileBuilderShim for API 31.
- */
-@RequiresApi(Build.VERSION_CODES.S)
-public class Ikev2VpnProfileBuilderShimImpl
-        extends com.android.networkstack.apishim.api30.Ikev2VpnProfileBuilderShimImpl {
-    protected Ikev2VpnProfileBuilderShimImpl(@Nullable String serverAddr,
-            @Nullable String identity, @Nullable Object params) {
-        super(serverAddr, identity, params);
-    }
-}
diff --git a/apishim/31/com/android/networkstack/apishim/api31/Ikev2VpnProfileShimImpl.java b/apishim/31/com/android/networkstack/apishim/api31/Ikev2VpnProfileShimImpl.java
deleted file mode 100644
index 1a9e332..0000000
--- a/apishim/31/com/android/networkstack/apishim/api31/Ikev2VpnProfileShimImpl.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.networkstack.apishim.api31;
-
-import android.net.Ikev2VpnProfile;
-
-/**
- * Implementation of Ikev2VpnProfileShim for API 31.
- */
-public class Ikev2VpnProfileShimImpl extends
-        com.android.networkstack.apishim.api30.Ikev2VpnProfileShimImpl {
-    public Ikev2VpnProfileShimImpl(Ikev2VpnProfile profile) {
-        super(profile);
-    }
-}
diff --git a/apishim/33/com/android/networkstack/apishim/api33/Ikev2VpnProfileBuilderShimImpl.java b/apishim/33/com/android/networkstack/apishim/api33/Ikev2VpnProfileBuilderShimImpl.java
deleted file mode 100644
index f8c92ee..0000000
--- a/apishim/33/com/android/networkstack/apishim/api33/Ikev2VpnProfileBuilderShimImpl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.networkstack.apishim.api33;
-
-import android.net.Ikev2VpnProfile;
-import android.net.ipsec.ike.IkeTunnelConnectionParams;
-import android.os.Build;
-
-import androidx.annotation.Nullable;
-import androidx.annotation.RequiresApi;
-
-import com.android.modules.utils.build.SdkLevel;
-import com.android.networkstack.apishim.common.Ikev2VpnProfileBuilderShim;
-
-/**
- * A shim for Ikev2VpnProfile.Builder
- */
-@RequiresApi(Build.VERSION_CODES.TIRAMISU)
-public class Ikev2VpnProfileBuilderShimImpl
-        extends com.android.networkstack.apishim.api31.Ikev2VpnProfileBuilderShimImpl {
-    protected Ikev2VpnProfileBuilderShimImpl(@Nullable String serverAddr,
-            @Nullable String identity, @Nullable Object params) {
-        super(serverAddr, identity, params);
-
-        if (serverAddr == null && identity == null && params == null) {
-            throw new IllegalArgumentException(
-                    "serverAddr, identity and params should not be all null");
-        }
-        // Support building the Builder with an IkeTunnelConnectionParams from API 33.
-        if (params != null) {
-            if (!(params instanceof IkeTunnelConnectionParams)) {
-                throw new IllegalArgumentException("params should be an IkeTunnelConnectionParams");
-            }
-            mBuilder = new Ikev2VpnProfile.Builder((IkeTunnelConnectionParams) params);
-        } else {
-            mBuilder = new Ikev2VpnProfile.Builder(serverAddr, identity);
-        }
-    }
-
-    /**
-     * Returns a new instance of this shim impl.
-     */
-    @RequiresApi(Build.VERSION_CODES.R)
-    public static Ikev2VpnProfileBuilderShim<Ikev2VpnProfile.Builder> newInstance(
-            @Nullable String serverAddr, @Nullable String identity, @Nullable Object params) {
-        if (SdkLevel.isAtLeastT()) {
-            return new Ikev2VpnProfileBuilderShimImpl(serverAddr, identity, params);
-        } else {
-            return com.android.networkstack.apishim.api31.Ikev2VpnProfileBuilderShimImpl
-                    .newInstance(serverAddr, identity, params);
-        }
-    }
-
-    /**
-     * @see Ikev2VpnProfile.Builder#setRequiresInternetValidation(boolean)
-     */
-    @Override
-    public Ikev2VpnProfileBuilderShim<Ikev2VpnProfile.Builder> setRequiresInternetValidation(
-            boolean requiresInternetValidation) {
-        mBuilder.setRequiresInternetValidation(requiresInternetValidation);
-        return this;
-    }
-
-    /**
-     * @see Ikev2VpnProfile.Builder#setLocalRoutesExcluded(boolean)
-     */
-    @Override
-    public Ikev2VpnProfileBuilderShim<Ikev2VpnProfile.Builder> setLocalRoutesExcluded(
-            boolean excludeLocalRoutes) {
-        mBuilder.setLocalRoutesExcluded(excludeLocalRoutes);
-        return this;
-    }
-}
diff --git a/apishim/33/com/android/networkstack/apishim/api33/Ikev2VpnProfileShimImpl.java b/apishim/33/com/android/networkstack/apishim/api33/Ikev2VpnProfileShimImpl.java
deleted file mode 100644
index e846a64..0000000
--- a/apishim/33/com/android/networkstack/apishim/api33/Ikev2VpnProfileShimImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.networkstack.apishim.api33;
-
-import android.net.Ikev2VpnProfile;
-import android.os.Build;
-
-import androidx.annotation.RequiresApi;
-
-/**
- * A shim for Ikev2VpnProfile
- */
-@RequiresApi(Build.VERSION_CODES.TIRAMISU)
-public class Ikev2VpnProfileShimImpl
-        extends com.android.networkstack.apishim.api31.Ikev2VpnProfileShimImpl {
-    public Ikev2VpnProfileShimImpl(Ikev2VpnProfile profile) {
-       super(profile);
-    }
-
-    /**
-     * @see Ikev2VpnProfile#isInternetValidationRequired()
-     */
-    @Override
-    public boolean isInternetValidationRequired() {
-        return mProfile.isInternetValidationRequired();
-    }
-
-    /**
-     * @see Ikev2VpnProfile#getIkeTunnelConnectionParams()
-     */
-    @Override
-    public Object getIkeTunnelConnectionParams() {
-        return mProfile.getIkeTunnelConnectionParams();
-    }
-}
diff --git a/apishim/34/com/android/networkstack/apishim/Ikev2VpnProfileBuilderShimImpl.java b/apishim/34/com/android/networkstack/apishim/Ikev2VpnProfileBuilderShimImpl.java
deleted file mode 100644
index 305f469..0000000
--- a/apishim/34/com/android/networkstack/apishim/Ikev2VpnProfileBuilderShimImpl.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.networkstack.apishim;
-
-import android.os.Build;
-
-import androidx.annotation.Nullable;
-import androidx.annotation.RequiresApi;
-
-/**
- * A shim for Ikev2VpnProfile.Builder
- */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
-public class Ikev2VpnProfileBuilderShimImpl
-        extends com.android.networkstack.apishim.api33.Ikev2VpnProfileBuilderShimImpl {
-    protected Ikev2VpnProfileBuilderShimImpl(@Nullable String serverAddr,
-            @Nullable String identity, @Nullable Object params) {
-        super(serverAddr, identity, params);
-    }
-}
diff --git a/apishim/34/com/android/networkstack/apishim/Ikev2VpnProfileShimImpl.java b/apishim/34/com/android/networkstack/apishim/Ikev2VpnProfileShimImpl.java
deleted file mode 100644
index c6c3ac9..0000000
--- a/apishim/34/com/android/networkstack/apishim/Ikev2VpnProfileShimImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.networkstack.apishim;
-
-import android.net.Ikev2VpnProfile;
-import android.os.Build;
-
-import androidx.annotation.RequiresApi;
-
-/**
- * A shim for Ikev2VpnProfile
- */
-// TODO: when available in all active branches: @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
-@RequiresApi(Build.VERSION_CODES.CUR_DEVELOPMENT)
-public class Ikev2VpnProfileShimImpl
-        extends com.android.networkstack.apishim.api33.Ikev2VpnProfileShimImpl {
-    public Ikev2VpnProfileShimImpl(Ikev2VpnProfile profile) {
-       super(profile);
-    }
-}
diff --git a/apishim/common/com/android/networkstack/apishim/common/Ikev2VpnProfileBuilderShim.java b/apishim/common/com/android/networkstack/apishim/common/Ikev2VpnProfileBuilderShim.java
deleted file mode 100644
index 0ad989e..0000000
--- a/apishim/common/com/android/networkstack/apishim/common/Ikev2VpnProfileBuilderShim.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.networkstack.apishim.common;
-
-import android.net.ProxyInfo;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-import java.util.List;
-
-
-/**
- * A shim for Ikev2VpnProfile.Builder.
- *
- * T should extend Ikev2VpnProfile.Builder, but this can't be written here as that class is not
- * available in API29.
- * @param <T> type of builder, typically Ikev2VpnProfile.Builder
- */
-// TODO : when API29 is no longer supported, remove the type argument
-public interface Ikev2VpnProfileBuilderShim<T> {
-    /**
-     * @see Ikev2VpnProfile.Builder#setRequiresInternetValidation(boolean)
-     */
-    default Ikev2VpnProfileBuilderShim<T> setRequiresInternetValidation(
-            boolean requiresInternetValidation) throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API 33");
-    }
-
-    /**
-     * @see Ikev2VpnProfile.Builder#setAuthPsk(byte[])
-     */
-    default Ikev2VpnProfileBuilderShim<T> setAuthPsk(@NonNull byte[] psk)
-            throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API 30");
-    }
-
-    /**
-     * @see Ikev2VpnProfile.Builder#setAuthUsernamePassword(String, String, X509Certificate)
-     */
-    default Ikev2VpnProfileBuilderShim<T> setAuthUsernamePassword(@NonNull String user,
-            @NonNull String pass, @Nullable X509Certificate serverRootCa)
-            throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API 30");
-    }
-
-    /**
-     * @see Ikev2VpnProfile.Builder#setAuthDigitalSignature(X509Certificate, PrivateKey,
-     *      X509Certificate)
-     */
-    default Ikev2VpnProfileBuilderShim<T> setAuthDigitalSignature(@NonNull X509Certificate userCert,
-            @NonNull PrivateKey key, @Nullable X509Certificate serverRootCa)
-            throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API 30");
-    }
-
-    /**
-     * @see Ikev2VpnProfile.Builder#setBypassable(boolean)
-     */
-    default Ikev2VpnProfileBuilderShim<T> setBypassable(boolean isBypassable)
-            throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API 30");
-    }
-
-    /**
-     * @see Ikev2VpnProfile.Builder#setProxy(ProxyInfo)
-     */
-    default Ikev2VpnProfileBuilderShim<T> setProxy(@Nullable ProxyInfo proxy)
-            throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API 30");
-    }
-
-    /**
-     * @see Ikev2VpnProfile.Builder#setMaxMtu(int)
-     */
-    default Ikev2VpnProfileBuilderShim<T> setMaxMtu(int mtu) throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API 30");
-    }
-
-    /**
-     * @see Ikev2VpnProfile.Builder#setMetered(boolean)
-     */
-    default Ikev2VpnProfileBuilderShim<T> setMetered(boolean isMetered)
-            throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API 30");
-    }
-
-    /**
-     * @see Ikev2VpnProfile.Builder#setAllowedAlgorithms(List<String>)
-     */
-    default Ikev2VpnProfileBuilderShim<T> setAllowedAlgorithms(@NonNull List<String> algorithmNames)
-            throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API 30");
-    }
-
-    /**
-     * @see Ikev2VpnProfile.Builder#setLocalRoutesExcluded(boolean)
-     */
-    default Ikev2VpnProfileBuilderShim<T> setLocalRoutesExcluded(boolean excludeLocalRoutes)
-            throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API 33");
-    }
-
-    /**
-     * Get <T> type of builder, typically Ikev2VpnProfile.Builder
-     */
-    default T getBuilder() throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API 30");
-    }
-
-    /**
-     * Build an Ikev2VpnProfileShim
-     */
-    default Ikev2VpnProfileShim build() throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API 30");
-    }
-}
diff --git a/apishim/common/com/android/networkstack/apishim/common/Ikev2VpnProfileShim.java b/apishim/common/com/android/networkstack/apishim/common/Ikev2VpnProfileShim.java
deleted file mode 100644
index a29c5bf..0000000
--- a/apishim/common/com/android/networkstack/apishim/common/Ikev2VpnProfileShim.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.networkstack.apishim.common;
-
-/**
- * A shim for Ikev2VpnProfile.
- *
- * T should extend Ikev2VpnProfile, but this can't be written here as that class is not
- * available in API29.
- * @param <T> type of profile, typically Ikev2VpnProfile
- */
-// TODO : when API29 is no longer supported, remove the type argument
-public interface Ikev2VpnProfileShim<T> {
-    /**
-     * @see Ikev2VpnProfile#isInternetValidationRequired()
-     */
-    default boolean isInternetValidationRequired() throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API level 33.");
-    }
-
-    /**
-     * @see Ikev2VpnProfile#getIkeTunnelConnectionParams()
-     */
-    default Object getIkeTunnelConnectionParams() throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API level 33.");
-    }
-
-    /**
-     * Return the <T> type of profile.
-     */
-    default T getProfile() throws UnsupportedApiLevelException {
-        throw new UnsupportedApiLevelException("Only supported from API level 30.");
-    }
-}