Remove refs to QSFragment
Make sure that the tiles are not connected to QSFragment when the QSPanel is detached. Test: build, destroy fragment a couple times Fixes: 157069009 Change-Id: I8298a6a0ebf8e3764038857b633f70816fe0b2db
This commit is contained in:
@@ -157,6 +157,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
|
||||
if (mListening) {
|
||||
setListening(false);
|
||||
}
|
||||
mQSCustomizer.setQs(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -361,9 +361,13 @@ public class QSPanel extends LinearLayout implements Tunable, Callback, Brightne
|
||||
if (mHost != null) {
|
||||
mHost.removeCallback(this);
|
||||
}
|
||||
if (mTileLayout != null) {
|
||||
mTileLayout.setListening(false);
|
||||
}
|
||||
for (TileRecord record : mRecords) {
|
||||
record.tile.removeCallbacks();
|
||||
}
|
||||
mRecords.clear();
|
||||
if (mBrightnessMirrorController != null) {
|
||||
mBrightnessMirrorController.removeCallback(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user