summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2019-05-15 16:14:51 +0900
committerRemi NGUYEN VAN <reminv@google.com>2019-05-15 16:14:51 +0900
commita575119dddb921ff6d3b9819fc8de7bf021b3ea1 (patch)
tree3e906d5b05715913b9493c793b6b1bef635fea9e
parent1cd77f1b06c897eb1c92a2426bff4209bce5fdd4 (diff)
downloadNetworkPermissionConfig-a575119dddb921ff6d3b9819fc8de7bf021b3ea1.tar.gz
Add build targets for non-mainline NetworkStack
Add PlatformCaptivePortalLogin and PlatformNetworkPermissionConfig build targets to override CaptivePortalLogin and NetworkPermissionConfig with platform-key-signed packages easily. The added packages are unused by default but can simplify setup for OEMs that use InProcessNetworkStack. Bug: 132635211 Test: Added the new packages to sailfish build, built image: device has the proper packages signed with the right keys, networking and captive portal working fine. Change-Id: I09656deb6ba928f56b478adebb60268fa6f484b0
-rw-r--r--Android.bp21
1 files changed, 17 insertions, 4 deletions
diff --git a/Android.bp b/Android.bp
index d0d3276..6e50459 100644
--- a/Android.bp
+++ b/Android.bp
@@ -14,15 +14,28 @@
// limitations under the License.
//
-// Stub APK to define permissions for NetworkStack
-android_app {
- name: "NetworkPermissionConfig",
+java_defaults {
+ name: "NetworkPermissionConfigDefaults",
// TODO: mark app as hasCode=false in manifest once soong stops complaining about apps without
// a classes.dex.
srcs: ["src/**/*.java"],
platform_apis: true,
min_sdk_version: "28",
- certificate: "networkstack",
privileged: true,
manifest: "AndroidManifest.xml",
}
+
+// Stub APK to define permissions for NetworkStack
+android_app {
+ name: "NetworkPermissionConfig",
+ defaults: ["NetworkPermissionConfigDefaults"],
+ certificate: "networkstack",
+}
+
+// Alternative stub APK signed with platform certificate. To use with InProcessNetworkStack.
+android_app {
+ name: "PlatformNetworkPermissionConfig",
+ defaults: ["NetworkPermissionConfigDefaults"],
+ certificate: "platform",
+ overrides: ["NetworkPermissionConfig"],
+}