libhardware: load with dlopen if the library is in system.

Originally, it is not allowed to open non-sphal libraries if the device
has sphal namespace. However, some system processes are still using
libhardware to load non-sphal libraries. Since it has no harm to allow
system libraries to be loaded by libhardware, this patch loads the
library from the default namespace if the library is located in system
partition.

Bug: 38435840
Test: sailfish builds and boots
Change-Id: I206da11a2656559fcd0995d32dbd73621a79a683
1 file changed