mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 05:48:09 +00:00
fix an NPE that happens when the user tries to save git settings
This commit is contained in:
parent
ebfdd2ebe5
commit
e02cf0f2d1
@ -414,6 +414,12 @@ public class GitActivity extends AppCompatActivity {
|
|||||||
editor.putString("git_remote_protocol", protocol);
|
editor.putString("git_remote_protocol", protocol);
|
||||||
editor.putString("git_remote_auth", connectionMode);
|
editor.putString("git_remote_auth", connectionMode);
|
||||||
editor.putString("git_remote_port", ((EditText) findViewById(R.id.server_port)).getText().toString());
|
editor.putString("git_remote_port", ((EditText) findViewById(R.id.server_port)).getText().toString());
|
||||||
|
editor.putString("git_remote_uri", ((EditText) findViewById(R.id.clone_uri)).getText().toString());
|
||||||
|
|
||||||
|
if (PasswordRepository.isInitialized()) {
|
||||||
|
PasswordRepository.addRemote("origin", ((EditText) findViewById(R.id.clone_uri)).getText().toString(), true);
|
||||||
|
}
|
||||||
|
|
||||||
editor.apply();
|
editor.apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -424,7 +430,6 @@ public class GitActivity extends AppCompatActivity {
|
|||||||
*/
|
*/
|
||||||
public void saveConfiguration(View view) {
|
public void saveConfiguration(View view) {
|
||||||
saveConfiguration();
|
saveConfiguration();
|
||||||
PasswordRepository.addRemote("origin", ((EditText) findViewById(R.id.clone_uri)).getText().toString(), true);
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user