Reland: Make default namespace an "alias" for runtime rather than the other
way around.

This relands http://r.android.com/952236:

There isn't a way to make a namespace properly an alias for another - just
adding a link with allow_all_shared_libs true doesn't quite do it since
links aren't transitive. That meant that "runtime" in the previous setup did
not pass on links to "default" when "classloader-namespace" in
libnativeloader added links to "runtime".

With this we link from "default" to "runtime" instead, and only APEX
binaries will start in "default" - nothing else should create links to that
namespace when this config is in use.

This also ensures no libraries are actually loaded in "default", which could
otherwise create duplicate instances with libraries loaded in "runtime".

Also make the "platform" namespace visible, to work with
android_link_namespace() in the classloader-namespace setup, and update the
reason why those namespaces need visibility.

Test: Flash and boot
Test: Run a target run test similar to art/test/run-test:
  Push libarttest.so to the test directory, then
  ANDROID_ADDITIONAL_PUBLIC_LIBRARIES=libc++.so:libbacktrace.so:libbase.so:libnativehelper.so:libart.so:libdexfile.so:libprofile.so:libartbase.so \
  dalvikvm -Djava.library.path=. -cp 203-multi-checkpoint.jar Main arttest
Test: lunch aosp_cf_x86_phone-eng;
  atest android.compilation.cts.AdbRootDependentCompilationTest#testCompile_curProfile \
    com.android.cts.dexmetadata.InstallDexMetadataHostTest#testProfileSnapshotAfterInstall \
    installd_dexopt_test
Bug: 130293232
Bug: 121117762
Change-Id: Ica4cea3103c061e01bdcbecce4dc1cb9690ee186
1 file changed