Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void do_connect(String epki_alias) {
- String app_name = "com.project.vpn";
- String proxy_name = null;
- String server = null;
- String username = null;
- String password = null;
- String pk_password = null;
- String response = null;
- boolean is_auth_pwd_save = RETAIN_AUTH;
- String profile_name = selected_profile_name();
- if (this.proxy_group.getVisibility() == 0) {
- ProxyList proxy_list = get_proxy_list();
- if (proxy_list != null) {
- proxy_name = proxy_list.get_enabled(RETAIN_AUTH);
- }
- }
- if (this.server_group.getVisibility() == 0) {
- server = SpinUtil.get_spinner_selected_item(this.server_spin);
- }
- if (this.username_group.getVisibility() == 0) {
- username = this.username_edit.getText().toString();
- if (username.length() > 0) {
- this.prefs.set_string_by_profile(profile_name, "username", username);
- }
- }
- if (this.pk_password_group.getVisibility() == 0) {
- pk_password = this.pk_password_edit.getText().toString();
- boolean is_pk_pwd_save = this.pk_password_save_checkbox.isChecked();
- this.prefs.set_boolean_by_profile(profile_name, "pk_password_save", is_pk_pwd_save);
- if (is_pk_pwd_save) {
- this.pwds.set("pk", profile_name, pk_password);
- } else {
- this.pwds.remove("pk", profile_name);
- }
- }
- if (this.password_group.getVisibility() == 0) {
- password = this.password_edit.getText().toString();
- is_auth_pwd_save = this.password_save_checkbox.isChecked();
- this.prefs.set_boolean_by_profile(profile_name, "auth_password_save", is_auth_pwd_save);
- if (is_auth_pwd_save) {
- this.pwds.set("auth", profile_name, password);
- } else {
- this.pwds.remove("auth", profile_name);
- }
- }
- if (this.cr_group.getVisibility() == 0) {
- response = this.response_edit.getText().toString();
- }
- String vpn_proto = this.prefs.get_string("vpn_proto");
- String conn_timeout = this.prefs.get_string("conn_timeout");
- String compression_mode = this.prefs.get_string("compression_mode");
- clear_stats();
- submitConnectIntent(profile_name, server, vpn_proto, conn_timeout, username, password, is_auth_pwd_save, pk_password, response, epki_alias, compression_mode, proxy_name, null, null, true, get_gui_version(app_name));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement