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

Commit 1fd7fe63 authored by Hansen Kurli's avatar Hansen Kurli
Browse files

Use AlertDialog to alert Unsupported VPN type.

Follow up of aosp/2822270. Show an AlertDialog instead of a Toast
when starting an unsupported VPN type.

Test: Manual test
Change-Id: I2ffb1bd48dcb91624012c404b8a6eed1df9b0b8d
parent eea7c3c8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -209,7 +209,9 @@ public class ConfigDialogFragment extends InstrumentedDialogFragment implements
                Toast.makeText(mContext, R.string.vpn_no_network, Toast.LENGTH_LONG).show();
            } catch (UnsupportedOperationException e) {
                Log.e(TAG, "Attempted to start an unsupported VPN type.");
                Toast.makeText(mContext, R.string.vpn_insecure_dialog_subtitle, Toast.LENGTH_LONG)
                final AlertDialog dialog = new AlertDialog.Builder(mContext)
                        .setMessage(R.string.vpn_insecure_dialog_subtitle)
                        .setPositiveButton(android.R.string.ok, null)
                        .show();
            }
        }