586fd2cd2df275be642168cf790e84694ab73e43 |
|
09-May-2018 |
David Brazdil <dbrazdil@google.com> |
Implement VMDebug API to mark a class "platform" Add a native implementation of VMDebug.allowHiddenApiReflectionFrom which takes a Class object and sets a new access flag kAccSkipAccessChecks on the corresponding mirror::Class instance. The function will throw a SecurityException if the process has not been forked as Java debuggable. hiddenapi::IsCallerInPlatformDex is extended to take an optional argument of the mirror::Class of the caller. If it is set and the class has kAccSkipAccessChecks, the caller is allowed to acccess non-SDK APIs. Note that the mirror::Class of the caller is only provided for reflection and JNI. The access flag is ignored for other means of access. Bug: 64382372 Test: N/A Merged-In: I2bf0ca7dcb45c17fe91eb2d421c947b892bd6fec Change-Id: I2bf0ca7dcb45c17fe91eb2d421c947b892bd6fec (cherry picked from commit 59a49a6fe102b26aacda906b6a2c466d84819c73)
|