Merge "Sysui Leaks: Leak check destroyed fragments" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b160141698
@@ -35,6 +35,7 @@ import android.view.View;
|
|||||||
import com.android.settingslib.applications.InterestingConfigChanges;
|
import com.android.settingslib.applications.InterestingConfigChanges;
|
||||||
import com.android.systemui.Dependency;
|
import com.android.systemui.Dependency;
|
||||||
import com.android.systemui.plugins.Plugin;
|
import com.android.systemui.plugins.Plugin;
|
||||||
|
import com.android.systemui.util.leak.LeakDetector;
|
||||||
|
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
@@ -77,6 +78,11 @@ public class FragmentHostManager {
|
|||||||
public void onFragmentViewDestroyed(FragmentManager fm, Fragment f) {
|
public void onFragmentViewDestroyed(FragmentManager fm, Fragment f) {
|
||||||
FragmentHostManager.this.onFragmentViewDestroyed(f);
|
FragmentHostManager.this.onFragmentViewDestroyed(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFragmentDestroyed(FragmentManager fm, Fragment f) {
|
||||||
|
Dependency.get(LeakDetector.class).trackGarbage(f);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
mFragments.getFragmentManager().registerFragmentLifecycleCallbacks(mLifecycleCallbacks,
|
mFragments.getFragmentManager().registerFragmentLifecycleCallbacks(mLifecycleCallbacks,
|
||||||
true);
|
true);
|
||||||
|
|||||||
Reference in New Issue
Block a user