Set linker namespaces to null if VNDK namespace is not available

The ANGLE namespace will be non-null if the VNDK namespace is not
available, meaning subsequent calls to getAngleNamespace will return a
non-null value even though the first call to getAngleNamespace will
return nullptr. Set mAngleNamespace to nullptr if an error occurs when
retrieving the VNDK namespace as well.

The same applies to the graphics driver namespace.

Test: lunch aosp_arm64-eng && m

Bug: 321123035

Change-Id: Iac55c51d904f42536fe2056bb108f4d768b029e3
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp
index 394a000..50c05f4 100644
--- a/libs/graphicsenv/GraphicsEnv.cpp
+++ b/libs/graphicsenv/GraphicsEnv.cpp
@@ -265,7 +265,8 @@
 
     auto vndkNamespace = android_get_exported_namespace("vndk");
     if (!vndkNamespace) {
-        return nullptr;
+        mDriverNamespace = nullptr;
+        return mDriverNamespace;
     }
 
     mDriverNamespace = android_create_namespace("updatable gfx driver",
@@ -617,7 +618,8 @@
 
     auto vndkNamespace = android_get_exported_namespace("vndk");
     if (!vndkNamespace) {
-        return nullptr;
+        mAngleNamespace = nullptr;
+        return mAngleNamespace;
     }
 
     if (!linkDriverNamespaceLocked(mAngleNamespace, vndkNamespace, "")) {