diff options
author | 2019-11-13 20:21:52 +0000 | |
---|---|---|
committer | 2019-11-13 20:21:52 +0000 | |
commit | d64198e6ee5be7da197cce0c8dcf62eddc03ee9c (patch) | |
tree | 456cae9ab3568ae974c773e480d57e68cef63ea2 /libs/graphicsenv/GraphicsEnv.cpp | |
parent | 6883e545bc3a08097f309ae3caddfbf708dea458 (diff) | |
parent | 6a674c9e105bdc5d736c06a4500dcdac1c6c4006 (diff) |
Merge "GraphicsEnv: refactor to unify the debuggable logic"
Diffstat (limited to 'libs/graphicsenv/GraphicsEnv.cpp')
-rw-r--r-- | libs/graphicsenv/GraphicsEnv.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp index 28591110f0..354703b9e4 100644 --- a/libs/graphicsenv/GraphicsEnv.cpp +++ b/libs/graphicsenv/GraphicsEnv.cpp @@ -124,12 +124,8 @@ static const std::string getSystemNativeLibraries(NativeLibrary type) { return env; } -int GraphicsEnv::getCanLoadSystemLibraries() { - if (property_get_bool("ro.debuggable", false) && prctl(PR_GET_DUMPABLE, 0, 0, 0, 0)) { - // Return an integer value since this crosses library boundaries - return 1; - } - return 0; +bool GraphicsEnv::isDebuggable() { + return prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) > 0; } void GraphicsEnv::setDriverPathAndSphalLibraries(const std::string path, |