ART: Disallow unresolved return types after Q

For apps targeting future releases, do not allow type mismatches
involving unresolved types. The behavior complicates the verifier
and the runtime and does not conform to regular expected behavior.

Historically this has been done for app compatibility when non-native
multidex was a thing. In that situation, even at runtime when an "early"
class is being verified a type might not be available because it is
supplied by a later injected dex file.

Classloader manipulations in this way are no longer supported. Classes
have to be available at verification time to not fail the class.

Bug: 121245951
Test: m test-art-host
Change-Id: I9608c79183be7b85b76892498d6a7007a29f2434
2 files changed