From 1d2a753ca45003510611767ab972783cabcf17cf Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Sat, 11 Apr 2020 00:54:45 +0900 Subject: Only depend on the latest stable netd AIDL. Currently, various components in the system server depend directly on numbered versions of the netd and dnsresolver AIDL interfaces. Introduce a new build target that only includes the latest stable version, and depend on that instead. This ensures that all components in the system server use the same version of the generated classes. Depending on multiple versions of the generated classes in the same (classloader) has in the past resulted in code compiled using a newer version using a generated class from an older version, and crashing with NoSuchMethodError when it calls a method that didn't exist. Also remove the dependency from wifi code to DNS resolver AIDL interfaces. Wifi does not (and should not) call the DNS resolver directly. Test: m Bug: 143732914 Bug: 153596226 Change-Id: I2c45853171df8d2c9726f4f12204a48862b30bb6 Merged-In: I2c45853171df8d2c9726f4f12204a48862b30bb6 --- services/core/Android.bp | 4 ++-- services/net/Android.bp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/core/Android.bp b/services/core/Android.bp index a2f73a6730b5..d9a534916da6 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp @@ -53,8 +53,8 @@ java_library_static { "android.hardware.configstore-V1.0-java", "android.hardware.contexthub-V1.0-java", "android.hidl.manager-V1.2-java", - "dnsresolver_aidl_interface-V4-java", - "netd_event_listener_interface-java", + "dnsresolver_aidl_interface-java", + "netd_aidl_interfaces-platform-java", ], } diff --git a/services/net/Android.bp b/services/net/Android.bp index bb5409b3e032..8b444b0fed41 100644 --- a/services/net/Android.bp +++ b/services/net/Android.bp @@ -12,8 +12,7 @@ java_library_static { ":services.net-sources", ], static_libs: [ - "dnsresolver_aidl_interface-V4-java", - "netd_aidl_interface-V3-java", + "netd_aidl_interfaces-platform-java", "netlink-client", "networkstack-client", "net-utils-services-common", @@ -44,7 +43,8 @@ java_library { "framework-wifi-util-lib", ], static_libs: [ - "dnsresolver_aidl_interface-V2-java", + // All the classes in netd_aidl_interface must be jarjar so they do not conflict with the + // classes generated by netd_aidl_interfaces-platform-java above. "netd_aidl_interface-V3-java", "netlink-client", "networkstack-client", -- cgit v1.2.3-59-g8ed1b