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

Commit f160edca authored by Jason Monk's avatar Jason Monk
Browse files

Fix QS panel after density changes

Fixes: 27744717
Change-Id: Ic3724b39e027379bb81e94e7059e67d2bbe30e88
parent 4ea6657d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -119,12 +119,18 @@ public class QSPanel extends LinearLayout implements Tunable, Callback {
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        TunerService.get(mContext).addTunable(this, QS_SHOW_BRIGHTNESS);
        if (mHost != null) {
            setTiles(mHost.getTiles());
        }
    }

    @Override
    protected void onDetachedFromWindow() {
        TunerService.get(mContext).removeTunable(this);
        mHost.removeCallback(this);
        for (TileRecord record : mRecords) {
            record.tile.removeCallbacks();
        }
        super.onDetachedFromWindow();
    }