summaryrefslogtreecommitdiff
path: root/runtime/hidden_api.h
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2018-03-14 13:57:27 +0000
committer David Brazdil <dbrazdil@google.com> 2018-03-15 12:54:42 +0000
commitfc66129b478d49f493b8262f81f8813a5f41459e (patch)
tree305594db27eaf39336175f958ee447536d9bf5d9 /runtime/hidden_api.h
parent8ce3bfaf1da2139a70b67e6b53c0110489801d40 (diff)
Warn on overriding of hidden methods
We could prevent apps from overriding hidden methods in the same manner they cannot override a package-private method - by creating a separate vtable entry for the child method. For now, start by printing a warning when a hidden method is being overridden but do not change the semantics. Bug: 64382372 Test: art/test.py -r -t 674-hiddenapi Change-Id: I9d5bfa6b833a4c0f5aaffa5f82dbe9b1e1f03f1f
Diffstat (limited to 'runtime/hidden_api.h')
-rw-r--r--runtime/hidden_api.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/hidden_api.h b/runtime/hidden_api.h
index 7ca2378a07..f2ea2fdaaa 100644
--- a/runtime/hidden_api.h
+++ b/runtime/hidden_api.h
@@ -38,6 +38,7 @@ enum AccessMethod {
kReflection,
kJNI,
kLinking,
+ kOverride,
};
inline std::ostream& operator<<(std::ostream& os, AccessMethod value) {
@@ -51,6 +52,9 @@ inline std::ostream& operator<<(std::ostream& os, AccessMethod value) {
case kLinking:
os << "linking";
break;
+ case kOverride:
+ os << "override";
+ break;
}
return os;
}