OSDN Git Service

Only keep methods with correct signature for view/menu click
authorJake Wharton <jakew@google.com>
Mon, 11 Jun 2018 16:24:11 +0000 (12:24 -0400)
committerJake Wharton <jakew@google.com>
Mon, 11 Jun 2018 21:21:28 +0000 (17:21 -0400)
commit3001f0311ddf4a6cc8b328ae697314feb1fd00f7
tree0dd7ae595263f5e063f46842012053df56fdea47
parent420785e6d0bdecd6849aa9e609e39fb1906a5bc0
Only keep methods with correct signature for view/menu click

For View's onClick attribute the method must have a single argument of type android.view.View. For a MenuItem's onClick attribute the method must have a single argument of type android.view.MenuItem. Since these rules match all types and any return type, matching by signature is the only available specificity that can be added.

Bug: 37123156
Test: make aapt2_tests
Change-Id: I4b82f5ef9e62a8ecffaab424e269df627825709e
tools/aapt2/java/ProguardRules.cpp
tools/aapt2/java/ProguardRules.h
tools/aapt2/java/ProguardRules_test.cpp