@@ -76,13 +76,15 @@ public GitOperation setAuthentication(File sshKey, String username, String passp
7676
7777 /**
7878 * Executes the GitCommand in an async task
79+ *
7980 * @param finishOnEnd
8081 */
8182 public abstract void execute (boolean finishOnEnd );
8283
8384 /**
8485 * Executes the GitCommand in an async task after creating the authentication
85- * @param connectionMode the server-connection mode
86+ *
87+ * @param connectionMode the server-connection mode
8688 * @param username the username
8789 * @param sshKey the ssh-key file
8890 * @param finishOnEnd
@@ -93,7 +95,8 @@ public void executeAfterAuthentication(final String connectionMode, final String
9395
9496 /**
9597 * Executes the GitCommand in an async task after creating the authentication
96- * @param connectionMode the server-connection mode
98+ *
99+ * @param connectionMode the server-connection mode
97100 * @param username the username
98101 * @param sshKey the ssh-key file
99102 * @param showError show the passphrase edit text in red
@@ -168,18 +171,20 @@ public void onClick(DialogInterface dialog, int whichButton) {
168171 if (keyPair .decrypt (passphrase .getText ().toString ())) {
169172 // Authenticate using the ssh-key and then execute the command
170173 setAuthentication (sshKey , username , passphrase .getText ().toString ()).execute (finishOnEnd );
174+ callingActivity .finish ();
171175 } else {
172176 // call back the method
173177 executeAfterAuthentication (connectionMode , username , sshKey , true , finishOnEnd );
174178 }
175179 }
176180 }).setNegativeButton (callingActivity .getResources ().getString (R .string .dialog_cancel ), new DialogInterface .OnClickListener () {
177181 public void onClick (DialogInterface dialog , int whichButton ) {
178- // Do nothing.
182+ callingActivity . finish ();
179183 }
180184 }).show ();
181185 } else {
182186 setAuthentication (sshKey , username , "" ).execute (finishOnEnd );
187+ callingActivity .finish ();
183188 }
184189 } catch (JSchException e ) {
185190 new AlertDialog .Builder (callingActivity )
0 commit comments