Remove callback on destroy view

Should avoid a memory leak causing CollapsedStatusBarFragment to be
retained by the animation scheduler

Bug: 193413770
Test: manual
Change-Id: I586ebf8456f71a86fdb13697d87dda135331888d
This commit is contained in:
Evan Laird
2021-07-21 20:32:36 +00:00
parent 4b1b5a68dd
commit 1259b44971

View File

@@ -202,6 +202,7 @@ public class CollapsedStatusBarFragment extends Fragment implements CommandQueue
public void onDestroyView() {
super.onDestroyView();
mStatusBarIconController.removeIconGroup(mDarkIconManager);
mAnimationScheduler.removeCallback(this);
if (mNetworkController.hasEmergencyCryptKeeperText()) {
mNetworkController.removeCallback(mSignalCallback);
}