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

Commit b01a0afb authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Fix QS panel after density changes" into nyc-dev

parents 7de3b2d8 f160edca
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();
    }