diff options
| author | 2022-12-05 10:23:08 +0000 | |
|---|---|---|
| committer | 2022-12-05 10:23:08 +0000 | |
| commit | b370eea473f906ecbd3ff78d84345f9fdf4f6ee4 (patch) | |
| tree | dc3d9d85572f4bcd39a5dc10a256f4b6e0d3ec5c /libs/graphicsenv/GraphicsEnv.cpp | |
| parent | 4179a7395117637744da3540031a0e8c847809bd (diff) | |
| parent | 383832ff5b2390f3dcd44592db071d504268787d (diff) | |
GraphicsEnv: Fix isDebuggable am: 383832ff5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/20621646
Change-Id: Ic95e71143b14d5e34101cca49de4e8e1a245668a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs/graphicsenv/GraphicsEnv.cpp')
| -rw-r--r-- | libs/graphicsenv/GraphicsEnv.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp index 4a0a839948..5f5f85a2ad 100644 --- a/libs/graphicsenv/GraphicsEnv.cpp +++ b/libs/graphicsenv/GraphicsEnv.cpp @@ -126,7 +126,20 @@ static const std::string getSystemNativeLibraries(NativeLibrary type) { } bool GraphicsEnv::isDebuggable() { - return prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) > 0; + // This flag determines if the application is marked debuggable + bool appDebuggable = prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) > 0; + + // This flag is set only in `debuggable` builds of the platform +#if defined(ANDROID_DEBUGGABLE) + bool platformDebuggable = true; +#else + bool platformDebuggable = false; +#endif + + ALOGV("GraphicsEnv::isDebuggable returning appDebuggable=%s || platformDebuggable=%s", + appDebuggable ? "true" : "false", platformDebuggable ? "true" : "false"); + + return appDebuggable || platformDebuggable; } void GraphicsEnv::setDriverPathAndSphalLibraries(const std::string path, |