Loading libs/graphicsenv/Android.bp +14 −2 Original line number Diff line number Diff line Loading @@ -27,10 +27,13 @@ cc_library_shared { srcs: [ "GpuStatsInfo.cpp", "GraphicsEnv.cpp", "IGpuService.cpp" "IGpuService.cpp", ], cflags: ["-Wall", "-Werror"], cflags: [ "-Wall", "-Werror", ], shared_libs: [ "libbase", Loading @@ -46,4 +49,13 @@ cc_library_shared { ], export_include_dirs: ["include"], product_variables: { // `debuggable` is set for eng and userdebug builds debuggable: { cflags: [ "-DANDROID_DEBUGGABLE", ], }, }, } libs/graphicsenv/GraphicsEnv.cpp +14 −1 Original line number Diff line number Diff line Loading @@ -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, Loading libs/graphicsenv/include/graphicsenv/GraphicsEnv.h +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ public: // Check if the process is debuggable. It returns false except in any of the // following circumstances: // 1. ro.debuggable=1 (global debuggable enabled). // 1. ANDROID_DEBUGGABLE is defined (global debuggable enabled). // 2. android:debuggable="true" in the manifest for an individual app. // 3. An app which explicitly calls prctl(PR_SET_DUMPABLE, 1). // 4. GraphicsEnv calls prctl(PR_SET_DUMPABLE, 1) in the presence of Loading Loading
libs/graphicsenv/Android.bp +14 −2 Original line number Diff line number Diff line Loading @@ -27,10 +27,13 @@ cc_library_shared { srcs: [ "GpuStatsInfo.cpp", "GraphicsEnv.cpp", "IGpuService.cpp" "IGpuService.cpp", ], cflags: ["-Wall", "-Werror"], cflags: [ "-Wall", "-Werror", ], shared_libs: [ "libbase", Loading @@ -46,4 +49,13 @@ cc_library_shared { ], export_include_dirs: ["include"], product_variables: { // `debuggable` is set for eng and userdebug builds debuggable: { cflags: [ "-DANDROID_DEBUGGABLE", ], }, }, }
libs/graphicsenv/GraphicsEnv.cpp +14 −1 Original line number Diff line number Diff line Loading @@ -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, Loading
libs/graphicsenv/include/graphicsenv/GraphicsEnv.h +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ public: // Check if the process is debuggable. It returns false except in any of the // following circumstances: // 1. ro.debuggable=1 (global debuggable enabled). // 1. ANDROID_DEBUGGABLE is defined (global debuggable enabled). // 2. android:debuggable="true" in the manifest for an individual app. // 3. An app which explicitly calls prctl(PR_SET_DUMPABLE, 1). // 4. GraphicsEnv calls prctl(PR_SET_DUMPABLE, 1) in the presence of Loading