From 6a674c9e105bdc5d736c06a4500dcdac1c6c4006 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Fri, 8 Nov 2019 11:55:36 -0800 Subject: GraphicsEnv: refactor to unify the debuggable logic By default, PR_SET_DUMPABLE is 0 for zygote spawned apps, except in the following circumstances: 1. ro.debuggable=1 (global debuggable enabled, i.e., userdebug or eng builds). 2. android:debuggable="true" in the manifest for an individual application. 3. An app which explicitly calls prctl(PR_SET_DUMPABLE, 1). 4. GraphicsEnv calls prctl(PR_SET_DUMPABLE, 1) in the presence of in the application manifest. So checking both ro.debuggable=1 and PR_GET_DUMPABLE is redundant. Bug: 144186877 Test: CtsAngleIntegrationHostTestCases Test: CtsRootlessGpuDebugHostTest Change-Id: I934f64315b67db77ee2c2a9dff50fb23bc0a546a --- vulkan/libvulkan/driver.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'vulkan/libvulkan/driver.cpp') diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp index 0b686f189a..c1994f9976 100644 --- a/vulkan/libvulkan/driver.cpp +++ b/vulkan/libvulkan/driver.cpp @@ -755,10 +755,6 @@ void FreeDeviceData(DeviceData* data, const VkAllocationCallbacks& allocator) { } // anonymous namespace -bool Debuggable() { - return prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) > 0; -} - bool OpenHAL() { return Hal::Open(); } -- cgit v1.2.3-59-g8ed1b