summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrion Hodson <oth@google.com>2021-02-08 16:17:07 +0000
committerOrion Hodson <oth@google.com>2021-02-18 09:31:42 +0000
commit0e0351d18937b943b7554c37a7e20225503ab8b7 (patch)
tree3cf6237a3fb264ea15debd92f275a00bd952ad2e
parent3361ca6c5628ed7480a2233093ad8ba6c39b0d6b (diff)
libandroid_runtime,libhwui: use libnativehelper_lazy
This change updates the dependencies of bootanimation to use a new static library, libnativehelper_lazy, that loads libnativehelper on demand. This means boot animation no longer depends on libnativehelper.so. The affected frameworks libraries will load libnativehelper lazily as-needed. This change enables the removal of the ART APEX from the bootstrap APEXes. The ART APEX provides libnativehelper.so and this is no longer required during boot for bootanimation. Removing ART from the bootstrap APEXes allows for compressing the system installed ART APEX after an ART APEX update is applied and saves tens of megabytes of storage. Bug: 179115178 Test: TH Test: manual inspection of the transitive dependencies of bootanimation. Change-Id: I4fd3f34afc120462088e8f2c015d3cb19aca86dd Merged-In: I4fd3f34afc120462088e8f2c015d3cb19aca86dd (cherry picked from commit 33cbf8b14c9805c86a3db7361110d7188f7ad4b6)
-rw-r--r--core/jni/Android.bp10
-rw-r--r--libs/hwui/Android.bp3
2 files changed, 8 insertions, 5 deletions
diff --git a/core/jni/Android.bp b/core/jni/Android.bp
index 877349227406..8d25773cb34a 100644
--- a/core/jni/Android.bp
+++ b/core/jni/Android.bp
@@ -67,11 +67,12 @@ cc_library_shared {
"libhwui",
"liblog",
"libminikin",
- "libnativehelper",
"libz",
"libziparchive",
],
+ static_libs: ["libnativehelper_lazy"],
+
export_include_dirs: [
".",
"include",
@@ -284,12 +285,13 @@ cc_library_shared {
"libstatspull",
],
export_shared_lib_headers: [
- // AndroidRuntime.h depends on nativehelper/jni.h
- "libnativehelper",
-
// our headers include libnativewindow's public headers
"libnativewindow",
],
+ export_static_lib_headers: [
+ // AndroidRuntime.h depends on nativehelper/jni.h
+ "libnativehelper_lazy",
+ ],
header_libs: [
"bionic_libc_platform_headers",
"dnsproxyd_protocol_headers",
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index fdb278e29cc7..6220abed05eb 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -343,12 +343,13 @@ cc_defaults {
"libharfbuzz_ng",
"liblog",
"libminikin",
- "libnativehelper",
"libz",
"libziparchive",
"libjpeg",
],
+ static_libs: ["libnativehelper_lazy"],
+
target: {
android: {
srcs: [ // sources that depend on android only libraries