summaryrefslogtreecommitdiff
path: root/tools/aapt2/diff/Diff.cpp
diff options
context:
space:
mode:
authorFabian Kozynski <kozynski@google.com>2020-03-18 14:22:26 -0400
committerFabian Kozynski <kozynski@google.com>2020-03-19 09:35:07 -0400
commit8116816493e38ca2ec0bd6adccd8ca0f6aa8cbc4 (patch)
tree1f9ee63f7ca6758a6ca655757f70edb89ef4422f /tools/aapt2/diff/Diff.cpp
parenta7dae49707206bcd1528f2516b569d7866c6d4c4 (diff)
Add warnings for leaked receivers in tests
This CL adds a way to track BroadcastReceivers that are leaking in test cases that use SysuiTestCase (all of SystemUITests). Every receiver that is registered with Context is recorded and those that are not unregistered are logged as a Warning. After each test, receivers are unregistered so they don't polute following tests. Additionally, if a BroadcastDispatcher is instantiated, a Fake is provided that will also track leaked receivers and log them as Info (as BroadcastDispatcher will only keep WeakReferences). This is a separate tracker done directly in SysuiTestableContext instead of using LeakCheckedTest or a LeakChecker as that is usually pretty stringent (it will fail the test). Test: SystemUITests Bug: 151614195 Change-Id: I11afb49ce3bbc51d98fa069ba4074c852d07bcce
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions