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

Commit d6fd96f0 authored by Vlad Popa's avatar Vlad Popa Committed by Android (Google) Code Review
Browse files

Merge "Fix leaking the CsdWarningDialog receiver" into main

parents 7d00847a e78c0b99
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -157,6 +157,7 @@ public class CsdWarningDialog extends SystemUIDialog
        if (mCsdWarning == AudioManager.CSD_WARNING_DOSE_REPEATED_5X) {
            // only show a notification in case we reached 500% of dose
            show5XNotification();
            dismissCsdDialog();
            return;
        }
        super.show();
@@ -217,6 +218,10 @@ public class CsdWarningDialog extends SystemUIDialog

    @Override
    public void onDismiss(DialogInterface unused) {
        dismissCsdDialog();
    }

    private void dismissCsdDialog() {
        try {
            mContext.unregisterReceiver(mReceiver);
        } catch (IllegalArgumentException e) {