Merge "Don't fall back to system driver when driver apk fails."
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp
index f07c231..befabee 100644
--- a/libs/graphicsenv/GraphicsEnv.cpp
+++ b/libs/graphicsenv/GraphicsEnv.cpp
@@ -611,6 +611,10 @@
return mDriverNamespace;
}
+std::string GraphicsEnv::getDriverPath() const {
+ return mDriverPath;
+}
+
android_namespace_t* GraphicsEnv::getAngleNamespace() {
std::lock_guard<std::mutex> lock(mNamespaceMutex);
diff --git a/libs/graphicsenv/include/graphicsenv/GraphicsEnv.h b/libs/graphicsenv/include/graphicsenv/GraphicsEnv.h
index 2219074..22a2332 100644
--- a/libs/graphicsenv/include/graphicsenv/GraphicsEnv.h
+++ b/libs/graphicsenv/include/graphicsenv/GraphicsEnv.h
@@ -58,6 +58,7 @@
void setDriverPathAndSphalLibraries(const std::string path, const std::string sphalLibraries);
// Get the updatable driver namespace.
android_namespace_t* getDriverNamespace();
+ std::string getDriverPath() const;
/*
* Apis for GpuStats
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index e143260..06944bb 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -238,6 +238,11 @@
bool failToLoadFromDriverSuffixProperty = false;
if (!hnd) {
+ // If updated driver apk is set but fail to load, abort here.
+ if (android::GraphicsEnv::getInstance().getDriverNamespace()) {
+ LOG_ALWAYS_FATAL("couldn't find an OpenGL ES implementation from %s",
+ android::GraphicsEnv::getInstance().getDriverPath().c_str());
+ }
// Finally, try to load system driver, start by searching for the library name appended by
// the system properties of the GLES userspace driver in both locations.
// i.e.: