Skip to content
Commit 097a3062 authored by Yiwei Zhang's avatar Yiwei Zhang
Browse files

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
   <meta-data android:name="com.android.graphics.injectLayers.enable"
              android:value="true"/>
   in the application manifest.

So checking both ro.debuggable=1 and PR_GET_DUMPABLE is redundant.

Bug: 144186877
Test: CtsAngleIntegrationHostTestCases
Test: CtsRootlessGpuDebugHostTest
Change-Id: Ica49254df2c7c090808411935cdeb8efd4e3cb51
parent 5a234006
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment