Revert "Revert "Allow dlopen("/system/lib/<soname>") for pre-Q""

This reverts commit 1906e77665758c61b0d97c35f3d64225f296504a
and fixes dlopen(nullptr)

It's enabled for the following .so libraries
libicuuc.so
libicui18n.so

This CL does not move the .so files into a APEX.
Thus, no visible effect before moving .so files.

Bug: 121248172
Test: dlfcn#dlopen_from_nullptr
Test: Perform the following test after moving libicuuc to /apex
      dlopen("/system/lib64/libicuuc.so") for targetSdkVersion < Q
Change-Id: Ia310ea566485fe00ca28e2203f4bffbd92243638
diff --git a/tests/dlext_test.cpp b/tests/dlext_test.cpp
index c9ecd2e..aff5e37 100644
--- a/tests/dlext_test.cpp
+++ b/tests/dlext_test.cpp
@@ -232,6 +232,12 @@
   dlclose(handle);
 }
 
+TEST(dlfcn, dlopen_from_nullptr_android_api_level) {
+  // Regression test for http://b/123972211. Testing dlopen(nullptr) when target sdk is P
+  android_set_application_target_sdk_version(__ANDROID_API_P__);
+  ASSERT_TRUE(dlopen(nullptr, RTLD_NOW) != nullptr);
+}
+
 TEST(dlfcn, dlopen_from_zip_absolute_path) {
   const std::string lib_zip_path = "/libdlext_test_zip/libdlext_test_zip_zipaligned.zip";
   const std::string lib_path = GetTestlibRoot() + lib_zip_path;