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

Commit 21535adc authored by sravan voleti's avatar sravan voleti
Browse files

OPP: Fix Window leak in Alert Activity.

Use case:
1) Send or receive file
2) During transfer open on transfer progress
3) do above steps multiple times

Observed Results:
Observed Window Leaked warnings in
Bluetooth Context.

Fix:
Override onDestroye method in custom alert activity
and dismiss Alert Dialog instance to prevent window leaked
issue in Bluetooth.

Bug: 152473345
Test: Performed above use case, issue not seen
Change-Id: Ieb00150fa7ace01ae86238d0abe7412d1e5e524b
parent fcfd6a1f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -112,4 +112,13 @@ public abstract class AlertActivity extends Activity implements DialogInterface.
        if (mAlert == null) return;
        mAlert.getButton(identifier).setEnabled(enable);
    }

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

}