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

Commit 28b97dcd authored by Courtney Goeltzenleuchter's avatar Courtney Goeltzenleuchter
Browse files

Add debug property to enable/disable ANGLE

Due to b/118375731 we suspect that loading & unloading the feature
library is causing issues with spurious segfaults or other errors
when starting other apps. Disable use of feature library by default
until issue is resolved.
Bug: 118375731
Test: manual: adb shell setprop debug.angle.enable 1
      Verify that feature library is loaded
      adb shell setprop debug.angle.enable 0
      Verify that feature library is not loaded

Change-Id: I80528acfe5138420085d24c4e7a3fc4e74903b88
parent 7bdc94ac
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -549,7 +549,14 @@ static void* load_angle(const char* kind, android_namespace_t* ns, egl_connectio
        char model[PROPERTY_VALUE_MAX];
        property_get("ro.product.manufacturer", manufacturer, "UNSET");
        property_get("ro.product.model", model, "UNSET");

        // Check if ANGLE is enabled. Workaround for b/118375731
        // We suspect that loading & unloading a library somehow corrupts
        // the process.
        property_get("debug.angle.enable", prop, "0");
        if (atoi(prop)) {
            so = load_angle_from_namespace("feature_support", ns);
        }
        if (so) {
            ALOGV("Temporarily loaded ANGLE's opt-in/out logic from namespace");
            bool use_version0_API = false;