Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a135c3c authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Revert "Revert "Do not allow wildcard matching in GL loader.""" into udc-qpr-dev

parents 0fd2d376 d43ee402
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@


#include <android-base/properties.h>
#include <android-base/properties.h>
#include <android/dlext.h>
#include <android/dlext.h>
#include <cutils/properties.h>
#include <dirent.h>
#include <dirent.h>
#include <dlfcn.h>
#include <dlfcn.h>
#include <graphicsenv/GraphicsEnv.h>
#include <graphicsenv/GraphicsEnv.h>
@@ -261,7 +262,10 @@ void* Loader::open(egl_connection_t* cnx)
        hnd = attempt_to_load_system_driver(cnx, nullptr, true);
        hnd = attempt_to_load_system_driver(cnx, nullptr, true);
    }
    }


    if (!hnd && !failToLoadFromDriverSuffixProperty) {
    if (!hnd && !failToLoadFromDriverSuffixProperty &&
        property_get_int32("ro.vendor.api_level", 0) < __ANDROID_API_U__) {
        // Still can't find the graphics drivers with the exact name. This time try to use wildcard
        // matching if the device is launched before Android 14.
        hnd = attempt_to_load_system_driver(cnx, nullptr, false);
        hnd = attempt_to_load_system_driver(cnx, nullptr, false);
    }
    }