diff options
| author | Zeapo <mohamed@zenadi.com> | 2014-08-09 01:08:17 +0100 |
|---|---|---|
| committer | Zeapo <mohamed@zenadi.com> | 2014-08-09 01:08:17 +0100 |
| commit | 79fd5586f937f50764cc6fc5c8cec1e4783877e4 (patch) | |
| tree | a7fc8ecf3d24826648f5626b451b6dad0ce952a6 /app/src/main/java/com/zeapo/pwdstore/GitAsyncTask.java | |
| parent | bac44808d3ed284ab3853e95003ea7e7a56c5596 (diff) | |
| download | HardenedPass-79fd5586f937f50764cc6fc5c8cec1e4783877e4.tar.gz HardenedPass-79fd5586f937f50764cc6fc5c8cec1e4783877e4.zip | |
add and remove are now committing files to git
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/GitAsyncTask.java')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/GitAsyncTask.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/GitAsyncTask.java b/app/src/main/java/com/zeapo/pwdstore/GitAsyncTask.java index cc8938fb..085798ce 100644 --- a/app/src/main/java/com/zeapo/pwdstore/GitAsyncTask.java +++ b/app/src/main/java/com/zeapo/pwdstore/GitAsyncTask.java @@ -1,6 +1,7 @@ package com.zeapo.pwdstore; import android.app.Activity; +import android.app.ProgressDialog; import android.os.AsyncTask; import android.util.Log; @@ -15,10 +16,21 @@ import org.eclipse.jgit.api.errors.TransportException; public class GitAsyncTask extends AsyncTask<GitCommand, Integer, Integer> { private Activity activity; private boolean finishOnEnd; + private ProgressDialog dialog; + public GitAsyncTask(Activity activity, boolean finishOnEnd) { this.activity = activity; this.finishOnEnd = finishOnEnd; + + dialog = new ProgressDialog(this.activity); } + + protected void onPreExecute() { + this.dialog.setMessage("Running command..."); + this.dialog.setCancelable(false); + this.dialog.show(); + } + @Override protected Integer doInBackground(GitCommand... cmd) { int count = cmd.length; @@ -45,6 +57,7 @@ public class GitAsyncTask extends AsyncTask<GitCommand, Integer, Integer> { protected void onPostExecute(Integer result) { Log.i("GIT_ASYNC", result + ""); + this.dialog.dismiss(); if (finishOnEnd) { this.activity.finish(); } |
