Merge "Change tethering file structure to respect its package name" am: c31e88ace6
Change-Id: Ib7db789690b64ca00905577ee9ed7ed993293967
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
android:process="com.android.networkstack.process"
|
||||
android:extractNativeLibs="false"
|
||||
android:persistent="true">
|
||||
<service android:name="com.android.server.connectivity.tethering.TetheringService"
|
||||
<service android:name="com.android.networkstack.tethering.TetheringService"
|
||||
android:permission="android.permission.MAINLINE_NETWORK_STACK"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
android:process="system">
|
||||
<uses-sdk android:minSdkVersion="29" android:targetSdkVersion="29" />
|
||||
<application>
|
||||
<service android:name="com.android.server.connectivity.tethering.TetheringService"
|
||||
<service android:name="com.android.networkstack.tethering.TetheringService"
|
||||
android:process="system"
|
||||
android:permission="android.permission.MAINLINE_NETWORK_STACK"
|
||||
android:exported="true">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Keep class's integer static field for MessageUtils to parsing their name.
|
||||
-keep class com.android.server.connectivity.tethering.Tethering$TetherMasterSM {
|
||||
-keep class com.android.networkstack.tethering.Tethering$TetherMasterSM {
|
||||
static final int CMD_*;
|
||||
static final int EVENT_*;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
TYPE_MOBILE_HIPRI is appended.
|
||||
|
||||
For other changes applied to this list, now and in the future, see
|
||||
com.android.server.connectivity.tethering.TetheringConfiguration.
|
||||
com.android.networkstack.tethering.TetheringConfiguration.
|
||||
|
||||
Note also: the order of this is important. The first upstream type
|
||||
for which a satisfying network exists is used.
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.net.TetheringManager.TETHERING_WIFI;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.net.TetheringConstants.EXTRA_ADD_TETHER_TYPE;
|
||||
import static android.net.TetheringConstants.EXTRA_PROVISION_CALLBACK;
|
||||
@@ -52,7 +52,6 @@ import android.util.SparseIntArray;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.internal.util.StateMachine;
|
||||
import com.android.networkstack.tethering.R;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
|
||||
@@ -71,7 +70,7 @@ public class EntitlementManager {
|
||||
@VisibleForTesting
|
||||
protected static final String DISABLE_PROVISIONING_SYSPROP_KEY = "net.tethering.noprovisioning";
|
||||
private static final String ACTION_PROVISIONING_ALARM =
|
||||
"com.android.server.connectivity.tethering.PROVISIONING_RECHECK_ALARM";
|
||||
"com.android.networkstack.tethering.PROVISIONING_RECHECK_ALARM";
|
||||
private static final String EXTRA_SUBID = "subId";
|
||||
|
||||
private final ComponentName mSilentProvisioningService;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import android.net.IpPrefix;
|
||||
import android.net.LinkAddress;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
|
||||
import static android.net.NetworkStats.METERED_NO;
|
||||
@@ -50,7 +50,7 @@ import android.util.Log;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.internal.util.IndentingPrintWriter;
|
||||
import com.android.server.connectivity.tethering.OffloadHardwareInterface.ForwardedStats;
|
||||
import com.android.networkstack.tethering.OffloadHardwareInterface.ForwardedStats;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.Inet6Address;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.net.util.TetheringUtils.uint16;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.Manifest.permission.NETWORK_SETTINGS;
|
||||
import static android.Manifest.permission.NETWORK_STACK;
|
||||
@@ -60,7 +60,7 @@ import static android.net.wifi.WifiManager.WIFI_AP_STATE_DISABLED;
|
||||
import static android.telephony.CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED;
|
||||
import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
||||
|
||||
import static com.android.server.connectivity.tethering.TetheringNotificationUpdater.DOWNSTREAM_NONE;
|
||||
import static com.android.networkstack.tethering.TetheringNotificationUpdater.DOWNSTREAM_NONE;
|
||||
|
||||
import android.app.usage.NetworkStatsManager;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.content.Context.TELEPHONY_SERVICE;
|
||||
import static android.net.ConnectivityManager.TYPE_ETHERNET;
|
||||
@@ -33,7 +33,6 @@ import android.telephony.TelephonyManager;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.networkstack.tethering.R;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.content.Context;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import android.annotation.Nullable;
|
||||
import android.net.LinkProperties;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.net.TetheringManager.TETHERING_BLUETOOTH;
|
||||
import static android.net.TetheringManager.TETHERING_USB;
|
||||
@@ -41,7 +41,6 @@ import androidx.annotation.IntRange;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.networkstack.tethering.R;
|
||||
|
||||
/**
|
||||
* A class to display tethering-related notifications.
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
|
||||
import static android.net.TetheringManager.TETHER_ERROR_NO_ACCESS_TETHERING_PERMISSION;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.net.ConnectivityManager.TYPE_BLUETOOTH;
|
||||
import static android.net.ConnectivityManager.TYPE_ETHERNET;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import android.net.LinkProperties;
|
||||
import android.net.Network;
|
||||
@@ -21,11 +21,11 @@
|
||||
<application android:debuggable="true">
|
||||
<uses-library android:name="android.test.runner" />
|
||||
<service
|
||||
android:name="com.android.server.connectivity.tethering.MockTetheringService"
|
||||
android:name="com.android.networkstack.tethering.MockTetheringService"
|
||||
android:permission="android.permission.TETHER_PRIVILEGED"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="com.android.server.connectivity.tethering.TetheringService"/>
|
||||
<action android:name="com.android.networkstack.tethering.TetheringService"/>
|
||||
</intent-filter>
|
||||
</service>
|
||||
</application>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering
|
||||
package com.android.networkstack.tethering
|
||||
|
||||
import android.net.LinkAddress
|
||||
import android.net.MacAddress
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.net.TetheringManager.TETHERING_BLUETOOTH;
|
||||
import static android.net.TetheringManager.TETHERING_ETHERNET;
|
||||
@@ -59,7 +59,6 @@ import androidx.test.runner.AndroidJUnit4;
|
||||
import com.android.internal.util.State;
|
||||
import com.android.internal.util.StateMachine;
|
||||
import com.android.internal.util.test.BroadcastInterceptingContext;
|
||||
import com.android.networkstack.tethering.R;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
|
||||
import static android.net.RouteInfo.RTN_UNICAST;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
|
||||
import static android.net.NetworkStats.METERED_NO;
|
||||
@@ -26,9 +26,9 @@ import static android.net.NetworkStats.UID_TETHERING;
|
||||
import static android.net.RouteInfo.RTN_UNICAST;
|
||||
import static android.provider.Settings.Global.TETHER_OFFLOAD_DISABLED;
|
||||
|
||||
import static com.android.server.connectivity.tethering.OffloadController.StatsType.STATS_PER_IFACE;
|
||||
import static com.android.server.connectivity.tethering.OffloadController.StatsType.STATS_PER_UID;
|
||||
import static com.android.server.connectivity.tethering.OffloadHardwareInterface.ForwardedStats;
|
||||
import static com.android.networkstack.tethering.OffloadController.StatsType.STATS_PER_IFACE;
|
||||
import static com.android.networkstack.tethering.OffloadController.StatsType.STATS_PER_UID;
|
||||
import static com.android.networkstack.tethering.OffloadHardwareInterface.ForwardedStats;
|
||||
import static com.android.testutils.MiscAssertsKt.assertContainsAll;
|
||||
import static com.android.testutils.MiscAssertsKt.assertThrows;
|
||||
import static com.android.testutils.NetworkStatsUtilsKt.orderInsensitiveEquals;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.net.ConnectivityManager.TYPE_ETHERNET;
|
||||
import static android.net.ConnectivityManager.TYPE_MOBILE;
|
||||
@@ -44,7 +44,6 @@ import androidx.test.filters.SmallTest;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import com.android.internal.util.test.BroadcastInterceptingContext;
|
||||
import com.android.networkstack.tethering.R;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering
|
||||
package com.android.networkstack.tethering
|
||||
|
||||
import android.app.Notification
|
||||
import android.app.NotificationManager
|
||||
@@ -29,8 +29,7 @@ import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.filters.SmallTest
|
||||
import androidx.test.runner.AndroidJUnit4
|
||||
import com.android.internal.util.test.BroadcastInterceptingContext
|
||||
import com.android.networkstack.tethering.R
|
||||
import com.android.server.connectivity.tethering.TetheringNotificationUpdater.DOWNSTREAM_NONE
|
||||
import com.android.networkstack.tethering.TetheringNotificationUpdater.DOWNSTREAM_NONE
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.net.TetheringManager.TETHERING_WIFI;
|
||||
import static android.net.TetheringManager.TETHER_ERROR_NO_ERROR;
|
||||
@@ -37,7 +37,7 @@ import androidx.test.filters.SmallTest;
|
||||
import androidx.test.rule.ServiceTestRule;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import com.android.server.connectivity.tethering.MockTetheringService.MockTetheringConnector;
|
||||
import com.android.networkstack.tethering.MockTetheringService.MockTetheringConnector;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.hardware.usb.UsbManager.USB_CONFIGURED;
|
||||
import static android.hardware.usb.UsbManager.USB_CONNECTED;
|
||||
@@ -47,7 +47,7 @@ import static android.net.wifi.WifiManager.IFACE_IP_MODE_TETHERED;
|
||||
import static android.net.wifi.WifiManager.WIFI_AP_STATE_ENABLED;
|
||||
import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID;
|
||||
|
||||
import static com.android.server.connectivity.tethering.TetheringNotificationUpdater.DOWNSTREAM_NONE;
|
||||
import static com.android.networkstack.tethering.TetheringNotificationUpdater.DOWNSTREAM_NONE;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -137,7 +137,6 @@ import com.android.internal.util.ArrayUtils;
|
||||
import com.android.internal.util.StateMachine;
|
||||
import com.android.internal.util.test.BroadcastInterceptingContext;
|
||||
import com.android.internal.util.test.FakeSettingsProvider;
|
||||
import com.android.networkstack.tethering.R;
|
||||
import com.android.testutils.MiscAssertsKt;
|
||||
|
||||
import org.junit.After;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.connectivity.tethering;
|
||||
package com.android.networkstack.tethering;
|
||||
|
||||
import static android.net.ConnectivityManager.TYPE_MOBILE_DUN;
|
||||
import static android.net.ConnectivityManager.TYPE_MOBILE_HIPRI;
|
||||
@@ -24,7 +24,7 @@ import static android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET;
|
||||
import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR;
|
||||
import static android.net.NetworkCapabilities.TRANSPORT_WIFI;
|
||||
|
||||
import static com.android.server.connectivity.tethering.UpstreamNetworkMonitor.TYPE_NONE;
|
||||
import static com.android.networkstack.tethering.UpstreamNetworkMonitor.TYPE_NONE;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
Reference in New Issue
Block a user