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

Commit fa1fe439 authored by Julia Reynolds's avatar Julia Reynolds Committed by android-build-merger
Browse files

Only reload callback on configuration change. am: 8d0a4001

am: f2958d4f

Change-Id: I1baa1b6b8e0dcb377362bfaf3e45cba464fc2bd7
parents 2c42bd73 f2958d4f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -977,6 +977,7 @@ public class VolumeDialog implements TunerService.Tunable {
            final int density = newConfig.densityDpi;
            if (density != mDensity) {
                mDialog.dismiss();
                mZenFooter.cleanup();
                initDialog();
            }
            updateWindowWidthH();
+2 −9
Original line number Diff line number Diff line
@@ -79,18 +79,11 @@ public class ZenFooter extends LinearLayout {
        mZen = controller.getZen();
        mConfig = controller.getConfig();
        mController = controller;
        update();
    }

    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        mController.addCallback(mZenCallback);
        update();
    }

    @Override
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
    public void cleanup() {
        mController.removeCallback(mZenCallback);
    }