Merge "Clear TestableLoopers in SysuiTestCase" into tm-qpr-dev
This commit is contained in:
@@ -136,6 +136,8 @@ public abstract class SysuiTestCase {
|
|||||||
InstrumentationRegistry.getArguments());
|
InstrumentationRegistry.getArguments());
|
||||||
if (TestableLooper.get(this) != null) {
|
if (TestableLooper.get(this) != null) {
|
||||||
TestableLooper.get(this).processAllMessages();
|
TestableLooper.get(this).processAllMessages();
|
||||||
|
// Must remove static reference to this test object to prevent leak (b/261039202)
|
||||||
|
TestableLooper.remove(this);
|
||||||
}
|
}
|
||||||
disallowTestableLooperAsMainThread();
|
disallowTestableLooperAsMainThread();
|
||||||
mContext.cleanUpReceivers(this.getClass().getSimpleName());
|
mContext.cleanUpReceivers(this.getClass().getSimpleName());
|
||||||
|
|||||||
Reference in New Issue
Block a user