Disable hidden API checks for Am

Am starts its own runtime and its Java code should be exempt from
hidden API checks. Change the logic in runtime.cc to disable hidden
API checks by default and only enable them if:
(a) dex2oat runs without -Xno-hidden-api-checks
(b) zygote forks a new process without DISABLE_HIDDEN_API_CHECKS flag

This logic can be simplified by changing the flag from negative to
positive. Since the cleanup requires touching multiple projects, it
will be done in a future CL.

Bug: 73001007
Bug: 64382372
Test: manual
Change-Id: I8a222f7a16bf88ffe4541558f3ba789f38d7322e
2 files changed