summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorAndrii Kulian <akulian@google.com>2020-01-29 16:57:32 -0800
committerAndrii Kulian <akulian@google.com>2020-02-20 01:29:25 +0000
commit5877c7d6c083d1150f603e278229fd8a1d8dbb1b (patch)
tree92c6bd68369015b896b2766405aa861fefd06d93 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent5263c11a4c4ca45ab3fc9f5925218dcc760dec86 (diff)
Exempt-From-Owner-Approval: Report non-visual Context misuse
Make obtaining a visual service from non-visual Context instance report a strict mode violation and print the stacktrace. Make calling getDisplay() throw an exception if called on an instance that is not associated with a display. For existing usages introduce a new internal method that does not perform the verification until the usages are properly fixed. Bug: 128338354 Test: StrictModeTest#testIncorrectContextUse_GetSystemService Test: StrictModeTest#testIncorrectContextUse_GetDisplay Change-Id: Id25d590eca6e10066e55d7ed6436d3bc9e433beb
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions