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

Commit 8905807a authored by Josh Tsuji's avatar Josh Tsuji Committed by Android (Google) Code Review
Browse files

Merge "Don't crash trying to unregister a receiver twice." into sc-dev

parents a40b1cb4 de5cc511
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -101,7 +101,12 @@ abstract public class SafetyWarningDialog extends SystemUIDialog

    @Override
    public void onDismiss(DialogInterface unused) {
        try {
            mContext.unregisterReceiver(mReceiver);
        } catch (IllegalArgumentException e) {
            // Don't crash if the receiver has already been unregistered.
            e.printStackTrace();
        }
        cleanUp();
    }