From c893b46034534a4fbd59ad5e10d793ceea8859fa Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Mon, 28 Oct 2019 15:33:08 +0900 Subject: Replace framework.jar with framework-minus-apex.jar framework.jar is now a build-time only library which has private symbols from framework-minus-apex.jar and public symbols from APEXes. Instead of framework.jar, framework-minus-apex.jar is installed to the device. framework-minus-apex is installed as framework.jar because the name is pretty widespread throughout Android. Keeping the original file name for the backwards compatibility. Bug: 139391334 Test: m, inspect the build system.img and check that system/framework/framework.jar exists Merged-In: Ia12d5984b011a54bd8ef708d0f552298a6ddec8a (cherry picked from commit 617a16478b0f5875084e339553b7b96f3a292e03) Change-Id: I30d5c789c1d67cac7dfe6339f244e66af5114767 --- Android.bp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Android.bp b/Android.bp index a913324aa9ca..7e659247c734 100644 --- a/Android.bp +++ b/Android.bp @@ -374,15 +374,38 @@ filegroup { } java_library { - name: "framework", + name: "framework-minus-apex", defaults: ["framework-defaults"], srcs: [":framework-non-updatable-sources"], + installable: true, javac_shard_size: 150, required: [ "framework-platform-compat-config", "libcore-platform-compat-config", "services-platform-compat-config", ], + // For backwards compatibility. + stem: "framework", +} + +// This "framework" module is NOT installed to the device. It's +// "framework-minus-apex" that gets installed to the device. Note that +// the filename is still framework.jar (via the stem property) for +// compatibility reason. The purpose of this module is to provide +// framework APIs (both public and private) for bundled apps. +// "framework-minus-apex" can't be used for the purpose because 1) +// many apps have already hardcoded the name "framework" and +// 2) it lacks API symbols from updatable modules - as it's clear from +// its suffix "-minus-apex". +java_library { + name: "framework", + defaults: ["framework-aidl-export-defaults"], + installable: false, // this lib is a build-only library + static_libs: [ + "framework-minus-apex", + // TODO(jiyong): add stubs for APEXes here + ], + sdk_version: "core_platform", } java_library { -- cgit v1.2.3-59-g8ed1b