Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb8a11ee authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

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
parent f7b69012
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -157,6 +157,7 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca
        if (mListening) {
            setListening(false);
        }
        mQSCustomizer.setQs(null);
    }

    @Override
+4 −0
Original line number Diff line number Diff line
@@ -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);
        }