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

Commit 36b314c6 authored by sj.cha's avatar sj.cha
Browse files

Fix code for NPE when click add and cancel repeatly VPN profile



Symptom: NPE is happened when click add and cancel repeatly VPN profile

Root Cause: Exception handling for ConfigDialog object

Steps to reproduce :
1. Go to VPN menu in Settings without Secure LockScreen
2. Click add VPN profile button
3. Keyguard dialog show
4. Click cancel button
5. Repeat 2 - 4 step

Test: refer a "Steps to reproduce"

Solution: Add exception handling for ConfigDialog object. This is a very rare case. But exception handling code should be needed.

Signed-off-by: default avatarSangJin Cha <sj.cha@lge.com>
Change-Id: I4c680b383f94c86a1c806d986e56f9f00d2be10e
parent f467ee4a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -143,6 +143,10 @@ public class ConfigDialogFragment extends InstrumentedDialogFragment implements
    @Override
    public void onClick(DialogInterface dialogInterface, int button) {
        ConfigDialog dialog = (ConfigDialog) getDialog();
        if (dialog == null) {
            Log.e(TAG, "ConfigDialog object is null");
            return;
        }
        VpnProfile profile = dialog.getProfile();

        if (button == DialogInterface.BUTTON_POSITIVE) {