Fixing activity being referred after destroying.

This is perhaps not a leak, but it conflicts with how StrictMode
activity leak detection works.

Bug: 139137636
Change-Id: I1608e348d8b238142c42ed81ae125fd07ef6b673
This commit is contained in:
vadimt
2020-03-02 18:34:34 -08:00
parent d7ac763b98
commit b1eaa1752e

View File

@@ -64,6 +64,7 @@ public class SimpleActivityRule<T extends Activity> implements TestRule {
mBase.evaluate();
} finally {
app.unregisterActivityLifecycleCallbacks(this);
mActivity = null;
}
}