Add OverlayManagerImpl to create frro, idmap and get overlayInfos
Add OverlayManagerImpl to let applications create frro and idmap files
for overlaying itself's android resources.
* OverlayManagerImpl.java
* check the FabricatedOverlayInternal.
* com_android_internal_content_om_OverlayManagerImpl.cpp
* convert and read Java objects to native data.
* call the APIs in libidmap2 to create frro and idmap files.
Add OverlayManagerImpl.cpp into AndroidRuntime by modifying Android.bp
* Add register_com_android_internal_content_om_OverlayManagerImpl
register JNI methods
* add com_android_internal_content_om_OverlayManagerImpl.cpp
* It's a adapter to delegate the tasks to SelfTargeting.cpp
* dynamic link with libidmap2 by using dlopen and dlsym to call
functions in libidmap2.
Add SelfTargeting.cpp into libidmap2
* createFrroFile
* createIdmapFile
* getFabricatedOverlayInfo
for interoperability between libandroid_runtime and libidmap2.
* move OverlayManifestInfo from libidmap2 to libandroidfw
* add FabricatedOverlayEntryParameters into libandroidfw
Bug: 205919743
Test: build
Test: atest \
OverlayHostTests \
OverlayDeviceTests \
SelfTargetingOverlayDeviceTests \
OverlayRemountedTest \
FrameworksServicesTests:com.android.server.om \
CtsContentTestCases:android.content.om.cts \
idmap2_tests
Change-Id: I5425f3229e9a3858e57427ef84e6abaf32e89b6e
diff --git a/cmds/idmap2/Android.bp b/cmds/idmap2/Android.bp
index 7a08cbd..5f06c97 100644
--- a/cmds/idmap2/Android.bp
+++ b/cmds/idmap2/Android.bp
@@ -71,6 +71,7 @@
host_supported: true,
srcs: [
"libidmap2/**/*.cpp",
+ "self_targeting/*.cpp",
],
export_include_dirs: ["include"],
target: {