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

Commit 8f6dce44 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

Fix broadcast receiver leak in UsbConfirmActivity



Change-Id: Ie1db70d9a57f16f192178583871994467f50a636
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 015b1eca
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -100,6 +100,14 @@ public class UsbConfirmActivity extends AlertActivity

    }

    @Override
    protected void onDestroy() {
        if (mDisconnectedReceiver != null) {
            unregisterReceiver(mDisconnectedReceiver);
        }
        super.onDestroy();
    }

    public void onClick(DialogInterface dialog, int which) {
        if (which == AlertDialog.BUTTON_POSITIVE) {
            try {