From 76fee048fcd9cfcb76578882ff7cc1779dbf5df2 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 3 Apr 2018 12:45:41 +0100 Subject: [veridex] Detect more reflection uses. 1) Look at all types referenced by a dex file. 2) Add field names (without type) in the hidden lists. bug: 64382372 bug: 77513322 Test: m Change-Id: Ib21a3091c0f5dfd928772ed14888050c01a0d511 --- tools/veridex/hidden_api.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/veridex/hidden_api.cc') diff --git a/tools/veridex/hidden_api.cc b/tools/veridex/hidden_api.cc index 93f921a25f..17fa1b8513 100644 --- a/tools/veridex/hidden_api.cc +++ b/tools/veridex/hidden_api.cc @@ -61,6 +61,11 @@ void HiddenApi::FillList(const char* filename, std::set& entries) { // Add the class->method name (so stripping the signature). entries.insert(str.substr(0, pos)); } + pos = str.find(':'); + if (pos != std::string::npos) { + // Add the class->field name (so stripping the type). + entries.insert(str.substr(0, pos)); + } } } } -- cgit v1.2.3-59-g8ed1b