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
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user