aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorzeapo <mohamed@zenadi.com>2014-12-18 21:28:01 +0100
committerzeapo <mohamed@zenadi.com>2015-01-04 14:53:59 +0100
commit6d898ddf886ce0d6617c384544bfe24d46dfe3e8 (patch)
tree472d65d684a12c7ff3df4a823af150ea21669e66 /app/src
parent88a6876238ecfff3926a5e4ba79b79bd6c2f7faa (diff)
remember the connection mode and the auth mode
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java
index c777d8f2..551f17e3 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java
+++ b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java
@@ -83,7 +83,6 @@ public class GitActivity extends ActionBarActivity {
final Spinner protcol_spinner = (Spinner) findViewById(R.id.clone_protocol);
final Spinner connection_mode_spinner = (Spinner) findViewById(R.id.connection_mode);
-
// init the spinner for connection modes
final ArrayAdapter<CharSequence> connection_mode_adapter = ArrayAdapter.createFromResource(this,
R.array.connection_modes, android.R.layout.simple_spinner_item);
@@ -103,6 +102,13 @@ public class GitActivity extends ActionBarActivity {
}
});
+
+ if (protocol.equals("ssh://")) {
+ protcol_spinner.setSelection(0);
+ } else {
+ protcol_spinner.setSelection(1);
+ }
+
// init the spinner for protocols
ArrayAdapter<CharSequence> protocol_adapter = ArrayAdapter.createFromResource(this,
R.array.clone_protocols, android.R.layout.simple_spinner_item);
@@ -139,6 +145,11 @@ public class GitActivity extends ActionBarActivity {
}
);
+ if (connectionMode.equals("ssh-key")) {
+ protcol_spinner.setSelection(0);
+ } else {
+ protcol_spinner.setSelection(1);
+ }
// init the server information
final EditText server_url = ((EditText) findViewById(R.id.server_url));
@@ -503,7 +514,8 @@ public class GitActivity extends ActionBarActivity {
//This is what happens when jgit fails :(
//TODO Handle the diffent cases of exceptions
e.printStackTrace();
- } }
+ }
+ }
}
/**