Merge "Add protection for setLocalRoutesExcludedForVpn" am: 620ea6f1fc
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2019875 Change-Id: Ieb5616f6dcae94a6894185da4f26b34ba6c698b7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
24e279166f
1 changed files with 5 additions and 0 deletions
|
|
@ -24,6 +24,8 @@ import android.annotation.SystemApi;
|
|||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.android.modules.utils.build.SdkLevel;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
|
|
@ -473,6 +475,9 @@ public final class NetworkAgentConfig implements Parcelable {
|
|||
@NonNull
|
||||
@SystemApi(client = MODULE_LIBRARIES)
|
||||
public Builder setLocalRoutesExcludedForVpn(boolean excludeLocalRoutes) {
|
||||
if (!SdkLevel.isAtLeastT()) {
|
||||
throw new UnsupportedOperationException("Method is not supported");
|
||||
}
|
||||
mConfig.excludeLocalRouteVpn = excludeLocalRoutes;
|
||||
return this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue