diff options
author | Jeff Hao <jeffhao@google.com> | 2014-04-01 11:21:30 -0700 |
---|---|---|
committer | Jeff Hao <jeffhao@google.com> | 2014-04-01 18:28:13 +0000 |
commit | 925b687c29ddfe952c29e13e6c05c2491e3b37f7 (patch) | |
tree | de09aba0c9f2419feb880f8842d59202a27f7c9f /runtime/reflection.cc | |
parent | d265a8ab12e1b783af42bf07a264edbb86826d2c (diff) | |
download | art-925b687c29ddfe952c29e13e6c05c2491e3b37f7.zip art-925b687c29ddfe952c29e13e6c05c2491e3b37f7.tar.gz art-925b687c29ddfe952c29e13e6c05c2491e3b37f7.tar.bz2 |
Fix reflection access checks for app compatibility.
Also updates field access test.
Bug: 13740995
Change-Id: I224712cfcb0c05429b831c26980cabad7bdef49a
Diffstat (limited to 'runtime/reflection.cc')
-rw-r--r-- | runtime/reflection.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/reflection.cc b/runtime/reflection.cc index 6ed61f6..f0ba003 100644 --- a/runtime/reflection.cc +++ b/runtime/reflection.cc @@ -799,8 +799,7 @@ bool VerifyAccess(mirror::Object* obj, mirror::Class* declaring_class, uint32_t visitor.WalkStack(); mirror::Class* caller_class = visitor.caller->GetDeclaringClass(); - if ((((access_flags & kAccPublic) != 0) && declaring_class->IsPublic()) || - caller_class == declaring_class) { + if (((access_flags & kAccPublic) != 0) || (caller_class == declaring_class)) { return true; } if ((access_flags & kAccPrivate) != 0) { |