summaryrefslogtreecommitdiff
path: root/linker/linker.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-03-23 17:42:49 -0700
committerElliott Hughes <enh@google.com>2017-04-06 10:59:24 -0700
commit9e27e58faa6ff08efbe85fc62943d483ecfed61a (patch)
tree0042c5148071c78240b2915f3f053ac82406402c /linker/linker.cpp
parente06c69d07324f3da67aa063202e698dedd831365 (diff)
Add support for disabling the greylist.
Useful for testing whether apps have actually stopped using greylisted libraries even if they still have references to them in their apk to support old Android releases but also haven't bumped their targetSdkVersion yet. Since we already have two expensive __system_property_get calls and this would add a third, optimize two (but leave the third since it's not obviously amenable to optimization). None of this matters for user builds, but I don't want userdebug/eng to have distractingly different performance. (cherrypick of 7933bec2872aa1c3430149c7649726333c0ac9d8.) Bug: http://b/36106661 Test: ran "can you escape 5" with and without this property Change-Id: Id9a804695c1dca9b4be2ebd0e72f01817bb13cba
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r--linker/linker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 1647db70b..2777d7384 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -185,7 +185,7 @@ static bool is_greylisted(android_namespace_t* ns, const char* name, const soinf
};
// If you're targeting N, you don't get the greylist.
- if (get_application_target_sdk_version() >= __ANDROID_API_N__) {
+ if (g_greylist_disabled || get_application_target_sdk_version() >= __ANDROID_API_N__) {
return false;
}