Skip to content
Snippets Groups Projects
Commit 30a0fe39 authored by Lucas Lin's avatar Lucas Lin Committed by Gerrit Code Review
Browse files

Merge "Use function inside NetdUtils instead of NetworkManagementService"

parents 0db5d441 e5b9cf8c
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,7 @@ java_library {
static_libs: [
"net-utils-device-common",
"net-utils-framework-common",
"netd-client",
],
apex_available: [
"//apex_available:platform",
......
......@@ -32,6 +32,7 @@ import android.net.NetworkAgent;
import android.net.NetworkAgentConfig;
import android.net.NetworkCapabilities;
import android.net.NetworkProvider;
import android.net.NetworkStack;
import android.net.RouteInfo;
import android.net.StringNetworkSpecifier;
import android.net.TestNetworkInterface;
......@@ -48,6 +49,7 @@ import android.util.SparseArray;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
import com.android.net.module.util.NetdUtils;
import java.io.UncheckedIOException;
import java.net.Inet4Address;
......@@ -317,10 +319,10 @@ class TestNetworkService extends ITestNetworkManager.Stub {
}
try {
// This requires NETWORK_STACK privileges.
final long token = Binder.clearCallingIdentity();
try {
mNMS.setInterfaceUp(iface);
NetworkStack.checkNetworkStackPermission(mContext);
NetdUtils.setInterfaceUp(mNetd, iface);
} finally {
Binder.restoreCallingIdentity(token);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment