Loading .gitignore 0 → 100644 +7 −0 Original line number Diff line number Diff line # Generated build files gen/com/android/networkstack/** # IntelliJ project files **/.idea **/*.iml **/*.ipr Android.bp +62 −18 Original line number Diff line number Diff line Loading @@ -45,10 +45,6 @@ package { default_applicable_licenses: ["Android-Apache-2.0"], } // Whether to enable the targets in this file that target current SDKs. // Set to false in branches like mainline-prod where API classes are too old to build current code. enable_current_sdk_targets = false java_defaults { name: "NetworkStackDevApiLevel", min_sdk_version: "29", Loading @@ -57,9 +53,14 @@ java_defaults { java_defaults { name: "NetworkStackReleaseApiLevel", sdk_version: "system_30", sdk_version: "module_31", min_sdk_version: "29", target_sdk_version: "30", target_sdk_version: "31", libs: [ "framework-connectivity", "framework-statsd", "framework-wifi", ] } // Libraries for the API shims Loading @@ -69,6 +70,9 @@ java_defaults { "androidx.annotation_annotation", "networkstack-client", ], static_libs : [ "modules-utils-build_system" ], apex_available: [ "com.android.tethering", "//apex_available:platform", // For InProcessNetworkStack and InProcessTethering Loading Loading @@ -114,6 +118,9 @@ java_library { ], sdk_version: "system_30", visibility: ["//visibility:private"], lint: { baseline_filename: "lint-baseline-api-30-shims.xml", }, } // Shims for APIs being added to the current development version of Android. These APIs are not Loading @@ -121,7 +128,6 @@ java_library { // integer so if the next SDK release happens to use that integer, we don't need to rename them. java_library { name: "NetworkStackApi31Shims", enabled: enable_current_sdk_targets, defaults: ["NetworkStackShimsDefaults"], srcs: [ "apishim/31/**/*.java", Loading @@ -132,6 +138,27 @@ java_library { "NetworkStackApi30Shims", "framework-connectivity", ], sdk_version: "module_31", visibility: ["//visibility:private"], } // Shims for APIs being added to the current development version of Android. These APIs are not // stable and have no defined version number. These could be called 10000, but they use the next // integer so if the next SDK release happens to use that integer, we don't need to rename them. java_library { name: "NetworkStackApi32Shims", defaults: ["NetworkStackShimsDefaults"], srcs: [ "apishim/32/**/*.java", ], libs: [ "NetworkStackShimsCommon", "NetworkStackApi29Shims", "NetworkStackApi30Shims", "NetworkStackApi31Shims", "framework-connectivity", ], sdk_version: "module_current", visibility: ["//visibility:private"], } Loading @@ -141,13 +168,13 @@ java_library { // called directly by the networkstack code. java_library { name: "NetworkStackApiCurrentShims", enabled: enable_current_sdk_targets, defaults: ["NetworkStackShimsDefaults"], static_libs: [ "NetworkStackShimsCommon", "NetworkStackApi29Shims", "NetworkStackApi30Shims", "NetworkStackApi31Shims", "NetworkStackApi32Shims", ], sdk_version: "module_current", visibility: [ Loading @@ -166,9 +193,10 @@ java_library { "NetworkStackShimsCommon", "NetworkStackApi29Shims", "NetworkStackApi30Shims", "NetworkStackApi31Shims", ], jarjar_rules: "apishim/jarjar-rules-compat.txt", sdk_version: "system_30", sdk_version: "module_31", visibility: [ "//packages/modules/Connectivity/Tethering", "//packages/modules/Connectivity/tests/cts/net", Loading Loading @@ -209,7 +237,6 @@ android_library { ], static_libs: ["NetworkStackApiCurrentShims"], manifest: "AndroidManifestBase.xml", enabled: enable_current_sdk_targets, visibility: [ "//frameworks/base/tests/net/integration", "//packages/modules/Connectivity/Tethering/tests/integration", Loading @@ -217,6 +244,9 @@ android_library { "//packages/modules/NetworkStack/tests/unit", "//packages/modules/NetworkStack/tests/integration", ], lint: { baseline_filename: "lint-baseline-current-lib.xml", }, } android_library { Loading @@ -229,12 +259,17 @@ android_library { static_libs: ["NetworkStackApiStableShims"], manifest: "AndroidManifestBase.xml", visibility: [ "//frameworks/base/packages/Connectivity/tests/integration", "//frameworks/base/tests/net/integration", "//packages/modules/Connectivity/Tethering/tests/integration", "//packages/modules/Connectivity/tests/cts/net", "//packages/modules/Connectivity/tests/integration", "//packages/modules/NetworkStack/tests/unit", "//packages/modules/NetworkStack/tests/integration", ], lint: { baseline_filename: "lint-baseline-stable-lib.xml", }, } filegroup { Loading Loading @@ -276,8 +311,10 @@ android_app { // The permission configuration *must* be included to ensure security of the device // The InProcessNetworkStack goes together with the PlatformCaptivePortalLogin, which replaces // the default CaptivePortalLogin. required: ["PlatformNetworkPermissionConfig", "PlatformCaptivePortalLogin"], enabled: enable_current_sdk_targets, required: [ "PlatformNetworkPermissionConfig", "PlatformCaptivePortalLogin", ], } // Pre-merge the AndroidManifest for NetworkStackNext, so that its manifest can be merged on top Loading @@ -285,8 +322,7 @@ android_library { name: "NetworkStackNextManifestBase", defaults: ["NetworkStackAppDefaults", "NetworkStackDevApiLevel"], static_libs: ["NetworkStackApiCurrentLib"], manifest: "AndroidManifest.xml", enabled: enable_current_sdk_targets, manifest: "AndroidManifest.xml" } // NetworkStack build targeting the current API release, for testing on in-development SDK Loading @@ -297,8 +333,10 @@ android_app { certificate: "networkstack", manifest: "AndroidManifest_Next.xml", // The permission configuration *must* be included to ensure security of the device required: ["NetworkPermissionConfig"], enabled: enable_current_sdk_targets, required: [ "NetworkPermissionConfig", "privapp_whitelist_com.android.networkstack", ], } // Updatable network stack for finalized API Loading @@ -309,7 +347,10 @@ android_app { certificate: "networkstack", manifest: "AndroidManifest.xml", // The permission configuration *must* be included to ensure security of the device required: ["NetworkPermissionConfig"], required: [ "NetworkPermissionConfig", "privapp_whitelist_com.android.networkstack", ], updatable: true, } Loading Loading @@ -386,7 +427,10 @@ android_app { certificate: "networkstack", manifest: ":NetworkStackTestAndroidManifest", // The permission configuration *must* be included to ensure security of the device required: ["NetworkPermissionConfig"], required: [ "NetworkPermissionConfig", "privapp_whitelist_com.android.networkstack", ], } // When adding or modifying protos, the jarjar rules and possibly proguard rules need Loading AndroidManifest.xml +2 −2 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.networkstack" android:sharedUserId="android.uid.networkstack" android:versionCode="309999900" android:versionName="r_aml_309999900" android:versionCode="319999900" android:versionName="s_aml_319999900" > <!-- Permissions must be defined here, and not in the base manifest, as the network stack running in the system server process does not need any permission, and having privileged Loading AndroidManifest_Next.xml +2 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,6 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.networkstack" android:sharedUserId="android.uid.networkstack" android:versionCode="300000000" android:versionName="R-next"> android:versionCode="320000000" android:versionName="T-next"> </manifest> OWNERS +2 −0 Original line number Diff line number Diff line Loading @@ -2,5 +2,7 @@ codewiz@google.com jchalard@google.com junyulai@google.com lorenzo@google.com maze@google.com reminv@google.com satk@google.com xiaom@google.com Loading
.gitignore 0 → 100644 +7 −0 Original line number Diff line number Diff line # Generated build files gen/com/android/networkstack/** # IntelliJ project files **/.idea **/*.iml **/*.ipr
Android.bp +62 −18 Original line number Diff line number Diff line Loading @@ -45,10 +45,6 @@ package { default_applicable_licenses: ["Android-Apache-2.0"], } // Whether to enable the targets in this file that target current SDKs. // Set to false in branches like mainline-prod where API classes are too old to build current code. enable_current_sdk_targets = false java_defaults { name: "NetworkStackDevApiLevel", min_sdk_version: "29", Loading @@ -57,9 +53,14 @@ java_defaults { java_defaults { name: "NetworkStackReleaseApiLevel", sdk_version: "system_30", sdk_version: "module_31", min_sdk_version: "29", target_sdk_version: "30", target_sdk_version: "31", libs: [ "framework-connectivity", "framework-statsd", "framework-wifi", ] } // Libraries for the API shims Loading @@ -69,6 +70,9 @@ java_defaults { "androidx.annotation_annotation", "networkstack-client", ], static_libs : [ "modules-utils-build_system" ], apex_available: [ "com.android.tethering", "//apex_available:platform", // For InProcessNetworkStack and InProcessTethering Loading Loading @@ -114,6 +118,9 @@ java_library { ], sdk_version: "system_30", visibility: ["//visibility:private"], lint: { baseline_filename: "lint-baseline-api-30-shims.xml", }, } // Shims for APIs being added to the current development version of Android. These APIs are not Loading @@ -121,7 +128,6 @@ java_library { // integer so if the next SDK release happens to use that integer, we don't need to rename them. java_library { name: "NetworkStackApi31Shims", enabled: enable_current_sdk_targets, defaults: ["NetworkStackShimsDefaults"], srcs: [ "apishim/31/**/*.java", Loading @@ -132,6 +138,27 @@ java_library { "NetworkStackApi30Shims", "framework-connectivity", ], sdk_version: "module_31", visibility: ["//visibility:private"], } // Shims for APIs being added to the current development version of Android. These APIs are not // stable and have no defined version number. These could be called 10000, but they use the next // integer so if the next SDK release happens to use that integer, we don't need to rename them. java_library { name: "NetworkStackApi32Shims", defaults: ["NetworkStackShimsDefaults"], srcs: [ "apishim/32/**/*.java", ], libs: [ "NetworkStackShimsCommon", "NetworkStackApi29Shims", "NetworkStackApi30Shims", "NetworkStackApi31Shims", "framework-connectivity", ], sdk_version: "module_current", visibility: ["//visibility:private"], } Loading @@ -141,13 +168,13 @@ java_library { // called directly by the networkstack code. java_library { name: "NetworkStackApiCurrentShims", enabled: enable_current_sdk_targets, defaults: ["NetworkStackShimsDefaults"], static_libs: [ "NetworkStackShimsCommon", "NetworkStackApi29Shims", "NetworkStackApi30Shims", "NetworkStackApi31Shims", "NetworkStackApi32Shims", ], sdk_version: "module_current", visibility: [ Loading @@ -166,9 +193,10 @@ java_library { "NetworkStackShimsCommon", "NetworkStackApi29Shims", "NetworkStackApi30Shims", "NetworkStackApi31Shims", ], jarjar_rules: "apishim/jarjar-rules-compat.txt", sdk_version: "system_30", sdk_version: "module_31", visibility: [ "//packages/modules/Connectivity/Tethering", "//packages/modules/Connectivity/tests/cts/net", Loading Loading @@ -209,7 +237,6 @@ android_library { ], static_libs: ["NetworkStackApiCurrentShims"], manifest: "AndroidManifestBase.xml", enabled: enable_current_sdk_targets, visibility: [ "//frameworks/base/tests/net/integration", "//packages/modules/Connectivity/Tethering/tests/integration", Loading @@ -217,6 +244,9 @@ android_library { "//packages/modules/NetworkStack/tests/unit", "//packages/modules/NetworkStack/tests/integration", ], lint: { baseline_filename: "lint-baseline-current-lib.xml", }, } android_library { Loading @@ -229,12 +259,17 @@ android_library { static_libs: ["NetworkStackApiStableShims"], manifest: "AndroidManifestBase.xml", visibility: [ "//frameworks/base/packages/Connectivity/tests/integration", "//frameworks/base/tests/net/integration", "//packages/modules/Connectivity/Tethering/tests/integration", "//packages/modules/Connectivity/tests/cts/net", "//packages/modules/Connectivity/tests/integration", "//packages/modules/NetworkStack/tests/unit", "//packages/modules/NetworkStack/tests/integration", ], lint: { baseline_filename: "lint-baseline-stable-lib.xml", }, } filegroup { Loading Loading @@ -276,8 +311,10 @@ android_app { // The permission configuration *must* be included to ensure security of the device // The InProcessNetworkStack goes together with the PlatformCaptivePortalLogin, which replaces // the default CaptivePortalLogin. required: ["PlatformNetworkPermissionConfig", "PlatformCaptivePortalLogin"], enabled: enable_current_sdk_targets, required: [ "PlatformNetworkPermissionConfig", "PlatformCaptivePortalLogin", ], } // Pre-merge the AndroidManifest for NetworkStackNext, so that its manifest can be merged on top Loading @@ -285,8 +322,7 @@ android_library { name: "NetworkStackNextManifestBase", defaults: ["NetworkStackAppDefaults", "NetworkStackDevApiLevel"], static_libs: ["NetworkStackApiCurrentLib"], manifest: "AndroidManifest.xml", enabled: enable_current_sdk_targets, manifest: "AndroidManifest.xml" } // NetworkStack build targeting the current API release, for testing on in-development SDK Loading @@ -297,8 +333,10 @@ android_app { certificate: "networkstack", manifest: "AndroidManifest_Next.xml", // The permission configuration *must* be included to ensure security of the device required: ["NetworkPermissionConfig"], enabled: enable_current_sdk_targets, required: [ "NetworkPermissionConfig", "privapp_whitelist_com.android.networkstack", ], } // Updatable network stack for finalized API Loading @@ -309,7 +347,10 @@ android_app { certificate: "networkstack", manifest: "AndroidManifest.xml", // The permission configuration *must* be included to ensure security of the device required: ["NetworkPermissionConfig"], required: [ "NetworkPermissionConfig", "privapp_whitelist_com.android.networkstack", ], updatable: true, } Loading Loading @@ -386,7 +427,10 @@ android_app { certificate: "networkstack", manifest: ":NetworkStackTestAndroidManifest", // The permission configuration *must* be included to ensure security of the device required: ["NetworkPermissionConfig"], required: [ "NetworkPermissionConfig", "privapp_whitelist_com.android.networkstack", ], } // When adding or modifying protos, the jarjar rules and possibly proguard rules need Loading
AndroidManifest.xml +2 −2 Original line number Diff line number Diff line Loading @@ -19,8 +19,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.networkstack" android:sharedUserId="android.uid.networkstack" android:versionCode="309999900" android:versionName="r_aml_309999900" android:versionCode="319999900" android:versionName="s_aml_319999900" > <!-- Permissions must be defined here, and not in the base manifest, as the network stack running in the system server process does not need any permission, and having privileged Loading
AndroidManifest_Next.xml +2 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,6 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.networkstack" android:sharedUserId="android.uid.networkstack" android:versionCode="300000000" android:versionName="R-next"> android:versionCode="320000000" android:versionName="T-next"> </manifest>
OWNERS +2 −0 Original line number Diff line number Diff line Loading @@ -2,5 +2,7 @@ codewiz@google.com jchalard@google.com junyulai@google.com lorenzo@google.com maze@google.com reminv@google.com satk@google.com xiaom@google.com