OSDN Git Service

Configurable hidden API exemptions.
authorMathew Inwood <mathewi@google.com>
Fri, 16 Mar 2018 14:26:08 +0000 (14:26 +0000)
committerMathew Inwood <mathewi@google.com>
Wed, 28 Mar 2018 10:54:17 +0000 (11:54 +0100)
commit8faeab8735f1a5759b24583d55853a488639546b
treee2f52f6b11e88dfb6f8001fd4e72d659f8788d4f
parent77e0b7b821a4d334606f07c7626aa59f9bee8446
Configurable hidden API exemptions.

Extend the existing hidden_api_blacklist_exemptions config to support a
list of API signature prefixes to exclude from hidden API enforcement.

Push this list down to the zygote process when that process is created,
and when the list changes. This minimizes overhead, but should also ensure
that all new processes get the latest whitelist.

Test: $ adb shell settings put global hidden_api_blacklist_exemptions \
Test:    Landroid/view/RemoteAnimationDefinition\\\;:Landroid/app/ActivityManager\\\$TaskDescription\\\;
Test: Manually verify logcat output from app which uses named APIs
Bug: 73337509

(cherry picked from commit 2c6f97d4c9e09a89ef3b0a96539bf6a9ab8d326c)

Merged-In: Ib1245b69da4dac50c6968f1be62f1a74591dc433
Change-Id: I7b590f272fdcfcda5f18e216788ac34bc58beaed
core/java/android/os/ZygoteProcess.java
core/java/com/android/internal/os/ZygoteConnection.java
core/java/com/android/internal/os/ZygoteInit.java
services/core/java/com/android/server/am/ActivityManagerService.java