Dexopt service-connectivity.

`service-connectivity` is a jar that system_server loads dynamically.
Such jars can be dexopted now. This CL adds `service-connectivity` to a
`systemserverclasspath_fragment`, which does not actually add the jar to
the classpath, but tells the build system to dexopt it.

NOTE: The corresponding `exported_systemserverclasspath_fragments` needs
to be added to the `prebuilt_apex` once a new prebuilt is dropped.

Bug: 203198541
Test: m com.android.tethering
Change-Id: I53745baaf1bc7142cc12a1e6cd8d84c9b338ac9d
Merged-In: I53745baaf1bc7142cc12a1e6cd8d84c9b338ac9d
Merged-In: I9a009493fe0482967ab1f92516514715cfd457d6
This commit is contained in:
Jiakai Zhang
2021-12-20 16:54:13 +00:00
parent e44ea016e1
commit 86c139aedb
2 changed files with 9 additions and 2 deletions

View File

@@ -206,4 +206,5 @@ android_app {
sdk { sdk {
name: "tethering-module-sdk", name: "tethering-module-sdk",
bootclasspath_fragments: ["com.android.tethering-bootclasspath-fragment"], bootclasspath_fragments: ["com.android.tethering-bootclasspath-fragment"],
systemserverclasspath_fragments: ["com.android.tethering-systemserverclasspath-fragment"],
} }

View File

@@ -44,8 +44,8 @@ apex {
bootclasspath_fragments: [ bootclasspath_fragments: [
"com.android.tethering-bootclasspath-fragment", "com.android.tethering-bootclasspath-fragment",
], ],
java_libs: [ systemserverclasspath_fragments: [
"service-connectivity", "com.android.tethering-systemserverclasspath-fragment",
], ],
multilib: { multilib: {
first: { first: {
@@ -114,6 +114,12 @@ bootclasspath_fragment {
}, },
} }
systemserverclasspath_fragment {
name: "com.android.tethering-systemserverclasspath-fragment",
standalone_contents: ["service-connectivity"],
apex_available: ["com.android.tethering"],
}
override_apex { override_apex {
name: "com.android.tethering.inprocess", name: "com.android.tethering.inprocess",
base: "com.android.tethering", base: "com.android.tethering",