Merge "Rename tethering util folder and its package name"

This commit is contained in:
Mark Chien
2021-11-10 06:08:28 +00:00
committed by Gerrit Code Review
23 changed files with 49 additions and 48 deletions

View File

@@ -38,7 +38,8 @@ static void throwSocketException(JNIEnv *env, const char* msg, int error) {
jniThrowExceptionFmt(env, "java/net/SocketException", "%s: %s", msg, strerror(error)); jniThrowExceptionFmt(env, "java/net/SocketException", "%s: %s", msg, strerror(error));
} }
static void android_net_util_setupIcmpFilter(JNIEnv *env, jobject javaFd, uint32_t type) { static void com_android_networkstack_tethering_util_setupIcmpFilter(JNIEnv *env, jobject javaFd,
uint32_t type) {
sock_filter filter_code[] = { sock_filter filter_code[] = {
// Check header is ICMPv6. // Check header is ICMPv6.
BPF_STMT(BPF_LD | BPF_B | BPF_ABS, kIPv6NextHeaderOffset), BPF_STMT(BPF_LD | BPF_B | BPF_ABS, kIPv6NextHeaderOffset),
@@ -64,19 +65,18 @@ static void android_net_util_setupIcmpFilter(JNIEnv *env, jobject javaFd, uint32
} }
} }
static void android_net_util_setupNaSocket(JNIEnv *env, jobject clazz, jobject javaFd) static void com_android_networkstack_tethering_util_setupNaSocket(JNIEnv *env, jobject clazz,
{ jobject javaFd) {
android_net_util_setupIcmpFilter(env, javaFd, ND_NEIGHBOR_ADVERT); com_android_networkstack_tethering_util_setupIcmpFilter(env, javaFd, ND_NEIGHBOR_ADVERT);
} }
static void android_net_util_setupNsSocket(JNIEnv *env, jobject clazz, jobject javaFd) static void com_android_networkstack_tethering_util_setupNsSocket(JNIEnv *env, jobject clazz,
{ jobject javaFd) {
android_net_util_setupIcmpFilter(env, javaFd, ND_NEIGHBOR_SOLICIT); com_android_networkstack_tethering_util_setupIcmpFilter(env, javaFd, ND_NEIGHBOR_SOLICIT);
} }
static void android_net_util_setupRaSocket(JNIEnv *env, jobject clazz, jobject javaFd, static void com_android_networkstack_tethering_util_setupRaSocket(JNIEnv *env, jobject clazz,
jint ifIndex) jobject javaFd, jint ifIndex) {
{
static const int kLinkLocalHopLimit = 255; static const int kLinkLocalHopLimit = 255;
int fd = netjniutils::GetNativeFileDescriptor(env, javaFd); int fd = netjniutils::GetNativeFileDescriptor(env, javaFd);
@@ -164,16 +164,16 @@ static void android_net_util_setupRaSocket(JNIEnv *env, jobject clazz, jobject j
static const JNINativeMethod gMethods[] = { static const JNINativeMethod gMethods[] = {
/* name, signature, funcPtr */ /* name, signature, funcPtr */
{ "setupNaSocket", "(Ljava/io/FileDescriptor;)V", { "setupNaSocket", "(Ljava/io/FileDescriptor;)V",
(void*) android_net_util_setupNaSocket }, (void*) com_android_networkstack_tethering_util_setupNaSocket },
{ "setupNsSocket", "(Ljava/io/FileDescriptor;)V", { "setupNsSocket", "(Ljava/io/FileDescriptor;)V",
(void*) android_net_util_setupNsSocket }, (void*) com_android_networkstack_tethering_util_setupNsSocket },
{ "setupRaSocket", "(Ljava/io/FileDescriptor;I)V", { "setupRaSocket", "(Ljava/io/FileDescriptor;I)V",
(void*) android_net_util_setupRaSocket }, (void*) com_android_networkstack_tethering_util_setupRaSocket },
}; };
int register_android_net_util_TetheringUtils(JNIEnv* env) { int register_com_android_networkstack_tethering_util_TetheringUtils(JNIEnv* env) {
return jniRegisterNativeMethods(env, return jniRegisterNativeMethods(env,
"android/net/util/TetheringUtils", "com/android/networkstack/tethering/util/TetheringUtils",
gMethods, NELEM(gMethods)); gMethods, NELEM(gMethods));
} }

View File

@@ -22,10 +22,10 @@
namespace android { namespace android {
int register_android_net_util_TetheringUtils(JNIEnv* env);
int register_com_android_net_module_util_BpfMap(JNIEnv* env, char const* class_name); int register_com_android_net_module_util_BpfMap(JNIEnv* env, char const* class_name);
int register_com_android_networkstack_tethering_BpfCoordinator(JNIEnv* env); int register_com_android_networkstack_tethering_BpfCoordinator(JNIEnv* env);
int register_com_android_networkstack_tethering_BpfUtils(JNIEnv* env); int register_com_android_networkstack_tethering_BpfUtils(JNIEnv* env);
int register_com_android_networkstack_tethering_util_TetheringUtils(JNIEnv* env);
extern "C" jint JNI_OnLoad(JavaVM* vm, void*) { extern "C" jint JNI_OnLoad(JavaVM* vm, void*) {
JNIEnv *env; JNIEnv *env;
@@ -34,7 +34,7 @@ extern "C" jint JNI_OnLoad(JavaVM* vm, void*) {
return JNI_ERR; return JNI_ERR;
} }
if (register_android_net_util_TetheringUtils(env) < 0) return JNI_ERR; if (register_com_android_networkstack_tethering_util_TetheringUtils(env) < 0) return JNI_ERR;
if (register_com_android_net_module_util_BpfMap(env, if (register_com_android_net_module_util_BpfMap(env,
"com/android/networkstack/tethering/util/BpfMap") < 0) return JNI_ERR; "com/android/networkstack/tethering/util/BpfMap") < 0) return JNI_ERR;

View File

@@ -21,12 +21,12 @@ import static android.net.TetheringManager.TetheringRequest.checkStaticAddressCo
import static android.net.dhcp.IDhcpServer.STATUS_SUCCESS; import static android.net.dhcp.IDhcpServer.STATUS_SUCCESS;
import static android.net.util.NetworkConstants.RFC7421_PREFIX_LENGTH; import static android.net.util.NetworkConstants.RFC7421_PREFIX_LENGTH;
import static android.net.util.NetworkConstants.asByte; import static android.net.util.NetworkConstants.asByte;
import static android.net.util.PrefixUtils.asIpPrefix;
import static android.net.util.TetheringMessageBase.BASE_IPSERVER;
import static android.system.OsConstants.RT_SCOPE_UNIVERSE; import static android.system.OsConstants.RT_SCOPE_UNIVERSE;
import static com.android.net.module.util.Inet4AddressUtils.intToInet4AddressHTH; import static com.android.net.module.util.Inet4AddressUtils.intToInet4AddressHTH;
import static com.android.networkstack.tethering.UpstreamNetworkState.isVcnInterface; import static com.android.networkstack.tethering.UpstreamNetworkState.isVcnInterface;
import static com.android.networkstack.tethering.util.PrefixUtils.asIpPrefix;
import static com.android.networkstack.tethering.util.TetheringMessageBase.BASE_IPSERVER;
import android.net.INetd; import android.net.INetd;
import android.net.INetworkStackStatusCallback; import android.net.INetworkStackStatusCallback;
@@ -47,8 +47,6 @@ import android.net.dhcp.IDhcpServer;
import android.net.ip.IpNeighborMonitor.NeighborEvent; import android.net.ip.IpNeighborMonitor.NeighborEvent;
import android.net.ip.RouterAdvertisementDaemon.RaParams; import android.net.ip.RouterAdvertisementDaemon.RaParams;
import android.net.util.InterfaceParams; import android.net.util.InterfaceParams;
import android.net.util.InterfaceSet;
import android.net.util.PrefixUtils;
import android.net.util.SharedLog; import android.net.util.SharedLog;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
@@ -70,6 +68,8 @@ import com.android.networkstack.tethering.BpfCoordinator;
import com.android.networkstack.tethering.BpfCoordinator.ClientInfo; import com.android.networkstack.tethering.BpfCoordinator.ClientInfo;
import com.android.networkstack.tethering.BpfCoordinator.Ipv6ForwardingRule; import com.android.networkstack.tethering.BpfCoordinator.Ipv6ForwardingRule;
import com.android.networkstack.tethering.PrivateAddressCoordinator; import com.android.networkstack.tethering.PrivateAddressCoordinator;
import com.android.networkstack.tethering.util.InterfaceSet;
import com.android.networkstack.tethering.util.PrefixUtils;
import java.net.Inet4Address; import java.net.Inet4Address;
import java.net.Inet6Address; import java.net.Inet6Address;

View File

@@ -26,13 +26,13 @@ import static android.system.OsConstants.SOCK_RAW;
import android.net.util.InterfaceParams; import android.net.util.InterfaceParams;
import android.net.util.SocketUtils; import android.net.util.SocketUtils;
import android.net.util.TetheringUtils;
import android.os.Handler; import android.os.Handler;
import android.system.ErrnoException; import android.system.ErrnoException;
import android.system.Os; import android.system.Os;
import android.util.Log; import android.util.Log;
import com.android.net.module.util.PacketReader; import com.android.net.module.util.PacketReader;
import com.android.networkstack.tethering.util.TetheringUtils;
import java.io.FileDescriptor; import java.io.FileDescriptor;
import java.io.IOException; import java.io.IOException;

View File

@@ -17,7 +17,6 @@
package android.net.ip; package android.net.ip;
import static android.net.util.NetworkConstants.RFC7421_PREFIX_LENGTH; import static android.net.util.NetworkConstants.RFC7421_PREFIX_LENGTH;
import static android.net.util.TetheringUtils.getAllNodesForScopeId;
import static android.system.OsConstants.AF_INET6; import static android.system.OsConstants.AF_INET6;
import static android.system.OsConstants.IPPROTO_ICMPV6; import static android.system.OsConstants.IPPROTO_ICMPV6;
import static android.system.OsConstants.SOCK_RAW; import static android.system.OsConstants.SOCK_RAW;
@@ -32,6 +31,7 @@ import static com.android.net.module.util.NetworkStackConstants.IPV6_MIN_MTU;
import static com.android.net.module.util.NetworkStackConstants.PIO_FLAG_AUTONOMOUS; import static com.android.net.module.util.NetworkStackConstants.PIO_FLAG_AUTONOMOUS;
import static com.android.net.module.util.NetworkStackConstants.PIO_FLAG_ON_LINK; import static com.android.net.module.util.NetworkStackConstants.PIO_FLAG_ON_LINK;
import static com.android.net.module.util.NetworkStackConstants.TAG_SYSTEM_NEIGHBOR; import static com.android.net.module.util.NetworkStackConstants.TAG_SYSTEM_NEIGHBOR;
import static com.android.networkstack.tethering.util.TetheringUtils.getAllNodesForScopeId;
import android.net.IpPrefix; import android.net.IpPrefix;
import android.net.LinkAddress; import android.net.LinkAddress;
@@ -39,7 +39,6 @@ import android.net.MacAddress;
import android.net.TrafficStats; import android.net.TrafficStats;
import android.net.util.InterfaceParams; import android.net.util.InterfaceParams;
import android.net.util.SocketUtils; import android.net.util.SocketUtils;
import android.net.util.TetheringUtils;
import android.system.ErrnoException; import android.system.ErrnoException;
import android.system.Os; import android.system.Os;
import android.system.StructTimeval; import android.system.StructTimeval;
@@ -52,6 +51,7 @@ import com.android.net.module.util.structs.MtuOption;
import com.android.net.module.util.structs.PrefixInformationOption; import com.android.net.module.util.structs.PrefixInformationOption;
import com.android.net.module.util.structs.RaHeader; import com.android.net.module.util.structs.RaHeader;
import com.android.net.module.util.structs.RdnssOption; import com.android.net.module.util.structs.RdnssOption;
import com.android.networkstack.tethering.util.TetheringUtils;
import java.io.FileDescriptor; import java.io.FileDescriptor;
import java.io.IOException; import java.io.IOException;

View File

@@ -45,7 +45,6 @@ import android.net.ip.IpServer;
import android.net.netstats.provider.NetworkStatsProvider; import android.net.netstats.provider.NetworkStatsProvider;
import android.net.util.InterfaceParams; import android.net.util.InterfaceParams;
import android.net.util.SharedLog; import android.net.util.SharedLog;
import android.net.util.TetheringUtils.ForwardedStats;
import android.os.Handler; import android.os.Handler;
import android.os.SystemClock; import android.os.SystemClock;
import android.system.ErrnoException; import android.system.ErrnoException;
@@ -69,6 +68,7 @@ import com.android.net.module.util.netlink.ConntrackMessage;
import com.android.net.module.util.netlink.NetlinkConstants; import com.android.net.module.util.netlink.NetlinkConstants;
import com.android.net.module.util.netlink.NetlinkSocket; import com.android.net.module.util.netlink.NetlinkSocket;
import com.android.networkstack.tethering.apishim.common.BpfCoordinatorShim; import com.android.networkstack.tethering.apishim.common.BpfCoordinatorShim;
import com.android.networkstack.tethering.util.TetheringUtils.ForwardedStats;
import java.net.Inet4Address; import java.net.Inet4Address;
import java.net.Inet6Address; import java.net.Inet6Address;

View File

@@ -16,10 +16,9 @@
package com.android.networkstack.tethering; package com.android.networkstack.tethering;
import static android.net.util.TetheringUtils.uint16;
import static com.android.net.module.util.netlink.StructNlMsgHdr.NLM_F_DUMP; import static com.android.net.module.util.netlink.StructNlMsgHdr.NLM_F_DUMP;
import static com.android.net.module.util.netlink.StructNlMsgHdr.NLM_F_REQUEST; import static com.android.net.module.util.netlink.StructNlMsgHdr.NLM_F_REQUEST;
import static com.android.networkstack.tethering.util.TetheringUtils.uint16;
import android.annotation.IntDef; import android.annotation.IntDef;
import android.annotation.NonNull; import android.annotation.NonNull;

View File

@@ -18,11 +18,11 @@ package com.android.networkstack.tethering;
import static android.net.NetworkCapabilities.TRANSPORT_VPN; import static android.net.NetworkCapabilities.TRANSPORT_VPN;
import static android.net.TetheringManager.TETHERING_BLUETOOTH; import static android.net.TetheringManager.TETHERING_BLUETOOTH;
import static android.net.TetheringManager.TETHERING_WIFI_P2P; import static android.net.TetheringManager.TETHERING_WIFI_P2P;
import static android.net.util.PrefixUtils.asIpPrefix;
import static com.android.net.module.util.Inet4AddressUtils.inet4AddressToIntHTH; import static com.android.net.module.util.Inet4AddressUtils.inet4AddressToIntHTH;
import static com.android.net.module.util.Inet4AddressUtils.intToInet4AddressHTH; import static com.android.net.module.util.Inet4AddressUtils.intToInet4AddressHTH;
import static com.android.net.module.util.Inet4AddressUtils.prefixLengthToV4NetmaskIntHTH; import static com.android.net.module.util.Inet4AddressUtils.prefixLengthToV4NetmaskIntHTH;
import static com.android.networkstack.tethering.util.PrefixUtils.asIpPrefix;
import static java.util.Arrays.asList; import static java.util.Arrays.asList;

View File

@@ -52,7 +52,6 @@ import static android.net.TetheringManager.TETHER_HARDWARE_OFFLOAD_FAILED;
import static android.net.TetheringManager.TETHER_HARDWARE_OFFLOAD_STARTED; import static android.net.TetheringManager.TETHER_HARDWARE_OFFLOAD_STARTED;
import static android.net.TetheringManager.TETHER_HARDWARE_OFFLOAD_STOPPED; import static android.net.TetheringManager.TETHER_HARDWARE_OFFLOAD_STOPPED;
import static android.net.TetheringManager.toIfaces; import static android.net.TetheringManager.toIfaces;
import static android.net.util.TetheringMessageBase.BASE_MAIN_SM;
import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_INTERFACE_NAME; import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_INTERFACE_NAME;
import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_MODE; import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_MODE;
import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_STATE; import static android.net.wifi.WifiManager.EXTRA_WIFI_AP_STATE;
@@ -67,6 +66,7 @@ import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID;
import static com.android.networkstack.tethering.TetheringConfiguration.TETHER_FORCE_USB_FUNCTIONS; import static com.android.networkstack.tethering.TetheringConfiguration.TETHER_FORCE_USB_FUNCTIONS;
import static com.android.networkstack.tethering.TetheringNotificationUpdater.DOWNSTREAM_NONE; import static com.android.networkstack.tethering.TetheringNotificationUpdater.DOWNSTREAM_NONE;
import static com.android.networkstack.tethering.UpstreamNetworkMonitor.isCellular; import static com.android.networkstack.tethering.UpstreamNetworkMonitor.isCellular;
import static com.android.networkstack.tethering.util.TetheringMessageBase.BASE_MAIN_SM;
import android.app.usage.NetworkStatsManager; import android.app.usage.NetworkStatsManager;
import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothAdapter;
@@ -100,11 +100,7 @@ import android.net.TetheringManager.TetheringRequest;
import android.net.TetheringRequestParcel; import android.net.TetheringRequestParcel;
import android.net.ip.IpServer; import android.net.ip.IpServer;
import android.net.shared.NetdUtils; import android.net.shared.NetdUtils;
import android.net.util.InterfaceSet;
import android.net.util.PrefixUtils;
import android.net.util.SharedLog; import android.net.util.SharedLog;
import android.net.util.TetheringUtils;
import android.net.util.VersionedBroadcastListener;
import android.net.wifi.WifiClient; import android.net.wifi.WifiClient;
import android.net.wifi.WifiManager; import android.net.wifi.WifiManager;
import android.net.wifi.p2p.WifiP2pGroup; import android.net.wifi.p2p.WifiP2pGroup;
@@ -138,6 +134,10 @@ import com.android.internal.util.MessageUtils;
import com.android.internal.util.State; import com.android.internal.util.State;
import com.android.internal.util.StateMachine; import com.android.internal.util.StateMachine;
import com.android.net.module.util.BaseNetdUnsolicitedEventListener; import com.android.net.module.util.BaseNetdUnsolicitedEventListener;
import com.android.networkstack.tethering.util.InterfaceSet;
import com.android.networkstack.tethering.util.PrefixUtils;
import com.android.networkstack.tethering.util.TetheringUtils;
import com.android.networkstack.tethering.util.VersionedBroadcastListener;
import java.io.FileDescriptor; import java.io.FileDescriptor;
import java.io.PrintWriter; import java.io.PrintWriter;

View File

@@ -24,9 +24,9 @@ import android.annotation.Nullable;
import android.net.LinkProperties; import android.net.LinkProperties;
import android.net.NetworkCapabilities; import android.net.NetworkCapabilities;
import android.net.RouteInfo; import android.net.RouteInfo;
import android.net.util.InterfaceSet;
import com.android.net.module.util.NetUtils; import com.android.net.module.util.NetUtils;
import com.android.networkstack.tethering.util.InterfaceSet;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;

View File

@@ -36,7 +36,6 @@ import android.net.LinkProperties;
import android.net.Network; import android.net.Network;
import android.net.NetworkCapabilities; import android.net.NetworkCapabilities;
import android.net.NetworkRequest; import android.net.NetworkRequest;
import android.net.util.PrefixUtils;
import android.net.util.SharedLog; import android.net.util.SharedLog;
import android.os.Handler; import android.os.Handler;
import android.util.Log; import android.util.Log;
@@ -49,6 +48,7 @@ import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.StateMachine; import com.android.internal.util.StateMachine;
import com.android.networkstack.apishim.ConnectivityManagerShimImpl; import com.android.networkstack.apishim.ConnectivityManagerShimImpl;
import com.android.networkstack.apishim.common.ConnectivityManagerShim; import com.android.networkstack.apishim.common.ConnectivityManagerShim;
import com.android.networkstack.tethering.util.PrefixUtils;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package android.net.util; package com.android.networkstack.tethering.util;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;

View File

@@ -14,11 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package android.net.util; package com.android.networkstack.tethering.util;
import android.net.IpPrefix; import android.net.IpPrefix;
import android.net.LinkAddress; import android.net.LinkAddress;
import android.net.LinkProperties; import android.net.LinkProperties;
import android.net.util.NetworkConstants;
import java.net.Inet4Address; import java.net.Inet4Address;
import java.net.InetAddress; import java.net.InetAddress;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package android.net.util; package com.android.networkstack.tethering.util;
/** /**
* This class defines Message.what base addresses for various state machine. * This class defines Message.what base addresses for various state machine.

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package android.net.util; package com.android.networkstack.tethering.util;
import android.net.TetherStatsParcel; import android.net.TetherStatsParcel;
import android.net.TetheringRequestParcel; import android.net.TetheringRequestParcel;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package android.net.util; package com.android.networkstack.tethering.util;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;

View File

@@ -30,7 +30,6 @@ import android.net.INetd;
import android.net.InetAddresses; import android.net.InetAddresses;
import android.net.MacAddress; import android.net.MacAddress;
import android.net.util.InterfaceParams; import android.net.util.InterfaceParams;
import android.net.util.TetheringUtils;
import android.os.Build; import android.os.Build;
import android.os.Handler; import android.os.Handler;
import android.os.HandlerThread; import android.os.HandlerThread;
@@ -40,6 +39,7 @@ import android.os.Looper;
import androidx.test.InstrumentationRegistry; import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import com.android.networkstack.tethering.util.TetheringUtils;
import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo; import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo;
import com.android.testutils.DevSdkIgnoreRunner; import com.android.testutils.DevSdkIgnoreRunner;
import com.android.testutils.TapPacketReader; import com.android.testutils.TapPacketReader;

View File

@@ -85,8 +85,6 @@ import android.net.ip.IpNeighborMonitor.NeighborEvent;
import android.net.ip.IpNeighborMonitor.NeighborEventConsumer; import android.net.ip.IpNeighborMonitor.NeighborEventConsumer;
import android.net.ip.RouterAdvertisementDaemon.RaParams; import android.net.ip.RouterAdvertisementDaemon.RaParams;
import android.net.util.InterfaceParams; import android.net.util.InterfaceParams;
import android.net.util.InterfaceSet;
import android.net.util.PrefixUtils;
import android.net.util.SharedLog; import android.net.util.SharedLog;
import android.os.Build; import android.os.Build;
import android.os.Handler; import android.os.Handler;
@@ -116,6 +114,8 @@ import com.android.networkstack.tethering.TetherStatsKey;
import com.android.networkstack.tethering.TetherStatsValue; import com.android.networkstack.tethering.TetherStatsValue;
import com.android.networkstack.tethering.TetherUpstream6Key; import com.android.networkstack.tethering.TetherUpstream6Key;
import com.android.networkstack.tethering.TetheringConfiguration; import com.android.networkstack.tethering.TetheringConfiguration;
import com.android.networkstack.tethering.util.InterfaceSet;
import com.android.networkstack.tethering.util.PrefixUtils;
import com.android.testutils.DevSdkIgnoreRule; import com.android.testutils.DevSdkIgnoreRule;
import com.android.testutils.DevSdkIgnoreRule.IgnoreAfter; import com.android.testutils.DevSdkIgnoreRule.IgnoreAfter;
import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo; import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo;

View File

@@ -16,13 +16,13 @@
package com.android.networkstack.tethering; package com.android.networkstack.tethering;
import static android.net.util.TetheringUtils.uint16;
import static android.system.OsConstants.AF_INET; import static android.system.OsConstants.AF_INET;
import static android.system.OsConstants.AF_UNIX; import static android.system.OsConstants.AF_UNIX;
import static android.system.OsConstants.SOCK_STREAM; import static android.system.OsConstants.SOCK_STREAM;
import static com.android.networkstack.tethering.OffloadHardwareInterface.OFFLOAD_HAL_VERSION_1_0; import static com.android.networkstack.tethering.OffloadHardwareInterface.OFFLOAD_HAL_VERSION_1_0;
import static com.android.networkstack.tethering.OffloadHardwareInterface.OFFLOAD_HAL_VERSION_1_1; import static com.android.networkstack.tethering.OffloadHardwareInterface.OFFLOAD_HAL_VERSION_1_1;
import static com.android.networkstack.tethering.util.TetheringUtils.uint16;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;

View File

@@ -23,7 +23,8 @@ import static android.net.TetheringManager.TETHERING_ETHERNET;
import static android.net.TetheringManager.TETHERING_USB; import static android.net.TetheringManager.TETHERING_USB;
import static android.net.TetheringManager.TETHERING_WIFI; import static android.net.TetheringManager.TETHERING_WIFI;
import static android.net.TetheringManager.TETHERING_WIFI_P2P; import static android.net.TetheringManager.TETHERING_WIFI_P2P;
import static android.net.util.PrefixUtils.asIpPrefix;
import static com.android.networkstack.tethering.util.PrefixUtils.asIpPrefix;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotEquals;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package android.net.util; package com.android.networkstack.tethering.util;
import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse; import static junit.framework.Assert.assertFalse;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package android.net.util; package com.android.networkstack.tethering.util;
import static android.net.TetheringManager.CONNECTIVITY_SCOPE_LOCAL; import static android.net.TetheringManager.CONNECTIVITY_SCOPE_LOCAL;
import static android.net.TetheringManager.TETHERING_USB; import static android.net.TetheringManager.TETHERING_USB;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package android.net.util; package com.android.networkstack.tethering.util;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.reset; import static org.mockito.Mockito.reset;