Remove system_server_current related work arounds
(cherry picked from db3ad82810879ba236946259867af66fdb017fc1)
Previously, a library that set sdk_version: "system_server_current"
could only access system-server or public APIs from other libraries.
After change r.android.com/2238635 they will be able to access the
following (in order):
* system-server
* module-lib
* system
* public
Bug: 204176972
Test: m com.android.tethering
# Without change r.android.com/2238635 the affected libraries
# fail to compile due to missing symbols that are not in the
# public API. With that change it compiles correctly.
Change-Id: Id6aad00aed0af6b724afec663a7be287058e625e
Merged-In: Id6aad00aed0af6b724afec663a7be287058e625e
diff --git a/service/Android.bp b/service/Android.bp
index 0a00362..d850015 100644
--- a/service/Android.bp
+++ b/service/Android.bp
@@ -148,12 +148,20 @@
libs: [
"framework-annotations-lib",
"framework-connectivity-pre-jarjar",
+ // The framework-connectivity-t library is only available on T+ platforms
+ // so any calls to it must be protected with a check to ensure that it is
+ // available. The linter will detect any unprotected calls through an API
+ // but not direct calls to the implementation. So, this depends on the
+ // module lib stubs directly to ensure the linter will work correctly
+ // as depending on framework-connectivity-t would cause it to be compiled
+ // against the implementation because the two libraries are in the same
+ // APEX.
"framework-connectivity-t.stubs.module_lib",
- "framework-tethering.stubs.module_lib",
- "framework-wifi.stubs.module_lib",
+ "framework-tethering",
+ "framework-wifi",
"unsupportedappusage",
"ServiceConnectivityResources",
- "framework-statsd.stubs.module_lib",
+ "framework-statsd",
],
static_libs: [
// Do not add libs here if they are already included
@@ -194,7 +202,7 @@
libs: [
"framework-annotations-lib",
"framework-connectivity-pre-jarjar",
- "framework-wifi.stubs.module_lib",
+ "framework-wifi",
"service-connectivity-pre-jarjar",
],
visibility: [
@@ -216,7 +224,9 @@
apex_available: [
"com.android.tethering",
],
- lint: { strict_updatability_linting: true },
+ lint: {
+ strict_updatability_linting: true,
+ },
}
java_defaults {
@@ -246,8 +256,8 @@
"framework-annotations-lib",
"framework-connectivity.impl",
"framework-connectivity-t.impl",
- "framework-tethering.stubs.module_lib",
- "framework-wifi.stubs.module_lib",
+ "framework-tethering",
+ "framework-wifi",
"libprotobuf-java-nano",
],
jarjar_rules: ":connectivity-jarjar-rules",
@@ -257,7 +267,9 @@
optimize: {
proguard_flags_files: ["proguard.flags"],
},
- lint: { strict_updatability_linting: true },
+ lint: {
+ strict_updatability_linting: true,
+ },
}
// A special library created strictly for use by the tests as they need the
@@ -337,8 +349,8 @@
}
genrule {
- name: "statslog-connectivity-java-gen",
- tools: ["stats-log-api-gen"],
- cmd: "$(location stats-log-api-gen) --java $(out) --module connectivity --javaPackage com.android.server --javaClass ConnectivityStatsLog",
- out: ["com/android/server/ConnectivityStatsLog.java"],
+ name: "statslog-connectivity-java-gen",
+ tools: ["stats-log-api-gen"],
+ cmd: "$(location stats-log-api-gen) --java $(out) --module connectivity --javaPackage com.android.server --javaClass ConnectivityStatsLog",
+ out: ["com/android/server/ConnectivityStatsLog.java"],
}