Split out the connectivity API surface
Split out connectivity APIs to connectivity module directories. This
prepares future move of the connectivity code into a mainline module,
but still keeps it implemented by framework-minus-apex for now: the API
stubs are moved to framework-connectivity.stubs, but the implementation
on device remains in the same place.
This allows moving the connectivity code in/out of APEX with minimal
changes.
BYPASS_INCLUSIVE_LANGUAGE_REASON=Moving files, can't modify released API
Bug: 171540887
Test: device boots, connectivity working
Change-Id: I21c42f032efa6c10e36c749df3183ce9679303a7
diff --git a/framework/Android.bp b/framework/Android.bp
index c7e261c..86b85e8 100644
--- a/framework/Android.bp
+++ b/framework/Android.bp
@@ -58,3 +58,28 @@
"//packages/modules/Connectivity:__subpackages__",
],
}
+
+java_sdk_library {
+ name: "framework-connectivity",
+ api_only: true,
+ defaults: ["framework-module-defaults"],
+ // TODO: build against module API
+ platform_apis: true,
+ srcs: [
+ ":framework-connectivity-sources",
+ ],
+ aidl: {
+ include_dirs: [
+ // Include directories for parcelables that are part of the stable API, and need a
+ // one-line "parcelable X" .aidl declaration to be used in AIDL interfaces.
+ // TODO(b/180293679): remove these dependencies as they should not be necessary once
+ // the module builds against API (the parcelable declarations exist in framework.aidl)
+ "frameworks/base/core/java", // For framework parcelables
+ "frameworks/native/aidl/binder", // For PersistableBundle.aidl
+ ],
+ },
+ libs: [
+ "unsupportedappusage",
+ ],
+ permitted_packages: ["android.net", "com.android.connectivity.aidl"],
+}