platform_build_soong/dexpreopt
Ulya Trafimovich 78a7155c17 Assume any <uses-library> is shared, add only toplevel ones to manifest.
This patch reworks the approach introduced in
https://r.android.com/1450819. That patch based the decision which
libraries should be added to the manifest <uses-library> tags by the
manifest_fixer on the "shared" status of the library.

That approach is incorrect for two reasons:

  - It doesn't make sense to have a non-shared library in class loader
    context ("shared" libraries are those specified in
    frameworks/base/data/etc/platform.xml, and they are the only ones
    that PackageManager knows about).

  - It doesn't make sense to add anything but the top-level of the
    class loader context tree to the manifest, because this part of the
    tree is flattened to a sequence, and PackageManager cannot restore
    it to the previous tree shape (there is an information loss).

This patch removes the "shared" bit of information from class loader
context elements and assumes that all libraries that end up in class
loader context are shared. Consequently, only the top-level libraries
should be passed to manifest_fixer.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Bug: 168686456
Change-Id: I902690f0f38f1047fa79cf6ccbe956077eceaab0
2020-11-25 14:47:05 +00:00
..
dexpreopt_gen Fix bpfmt issues and add bpfmt to preupload checks 2020-06-29 09:14:08 +02:00
Android.bp Add unit tests for class loader context. 2020-10-29 17:47:34 +00:00
OWNERS Add an owners file for dexpreopt files. 2018-12-18 20:28:06 +00:00
class_loader_context.go Assume any <uses-library> is shared, add only toplevel ones to manifest. 2020-11-25 14:47:05 +00:00
class_loader_context_test.go Assume any <uses-library> is shared, add only toplevel ones to manifest. 2020-11-25 14:47:05 +00:00
config.go Merge "Replace android.WriteFile rule with android.WriteFileRule" 2020-11-16 23:11:41 +00:00
dexpreopt.go Rework class loader context implementation. 2020-11-03 15:15:46 +00:00
dexpreopt_test.go Rework class loader context implementation. 2020-11-03 15:15:46 +00:00
testing.go Reland: Get the dex2oat host tool path from module dependency on the 2020-02-13 17:46:48 +00:00