Improve reflection IllegalArgumentException detail messages.

Also add a missing InstanceOf check that was causing CheckJNI to kill us
if someone tried to pass an inappropriate reference type through
Method.invoke. (Amusingly, CheckJNI produced pretty much the exact detail
message that Method.invoke should have.)

Plus a new test for this stuff.

Bug: 6504175
Change-Id: Ice95eecbdba5a0927c6eaf68e56d6500dc52ad2e
8 files changed
tree: c2d0f408237ad5a30bfd67819e5c9a72cc3ac45e
  1. build/
  2. jdwpspy/
  3. src/
  4. test/
  5. tools/
  6. .gitignore
  7. Android.mk