Merge "Clear TestableLoopers in SysuiTestCase" into tm-qpr-dev am: 78f5ef56e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20609771 Change-Id: Idb1fd31227ebce9b50b944add5cdd22d8f950671 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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