Allow "experimental" class to be always loadable.
Previously, when a class with <clinit> is "experimental", even the "<clinit>" would throw, which would render the class to be unloadable, which would cause lot of problems. Now, "experimental API hook" returns a boolean. If it returns "false" (instead of throwing), we skip the rest of the method body, which essentially simulates `@Ignore`. For now, only <clinit> can return false. It'd be nice if we can support other methods too, but: - <init> must call super.<init>, so we can't inject an early return. - For other methods, generating a stack map frame was kind of painful unless it's void. Supporting non-<clinit> methods isn't really critical at all, so let's just ignore it for now. Bug: 292141694 Flag: TEST_ONLY Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -r Change-Id: I68e5356465a2e6c4ae053d406ef0740b77968685
Loading
Please register or sign in to comment