From 7c8af94d47bf3e714bce8f01992044533d8d0b79 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 8 Jul 2020 18:35:51 +0000 Subject: Avoid TREBLE_TESTING_OVERRIDE This is moved from an environmental variable to a function since getenv is problematic in multi-threaded testing environments. Bug: 156668058 Test: N/A (b/160796914) Change-Id: I065a13e295b368150b1a4a1fc87faa2432ec359b --- services/surfaceflinger/SurfaceFlinger.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'services/surfaceflinger/SurfaceFlinger.cpp') diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 60b3cf0feb..c033290018 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -401,7 +402,7 @@ SurfaceFlinger::SurfaceFlinger(Factory& factory) : SurfaceFlinger(factory, SkipI // deriving the setting from the set service name, but it // would be brittle if the name that's not 'default' is used // for production purposes later on. - setenv("TREBLE_TESTING_OVERRIDE", "true", true); + android::hardware::details::setTrebleTestingOverride(true); } } -- cgit v1.2.3-59-g8ed1b