summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/build.gradle12
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/PasswordStore.java14
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.java2
3 files changed, 15 insertions, 13 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 8205e16f..fd778244 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -9,8 +9,8 @@ android {
applicationId "com.zeapo.pwdstore"
minSdkVersion 15
targetSdkVersion 25
- versionCode 77
- versionName "1.2.0.57"
+ versionCode 78
+ versionName "1.2.0.58"
}
compileOptions {
@@ -58,10 +58,10 @@ android {
}
dependencies {
- compile 'com.android.support:appcompat-v7:24.2.1'
- compile 'com.android.support:recyclerview-v7:24.2.1'
- compile 'com.android.support:cardview-v7:24.2.1'
- compile 'com.android.support:design:24.2.1'
+ compile 'com.android.support:appcompat-v7:25.3.1'
+ compile 'com.android.support:recyclerview-v7:25.3.1'
+ compile 'com.android.support:cardview-v7:25.3.1'
+ compile 'com.android.support:design:25.3.1'
compile 'org.sufficientlysecure:openpgp-api:11.0'
compile 'com.nononsenseapps:filepicker:2.4.2'
compile('org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r') {
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java
index 67600259..4f2649b5 100644
--- a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java
+++ b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java
@@ -476,7 +476,7 @@ public class PasswordStore extends AppCompatActivity {
it.remove();
adapter.updateSelectedItems(position, selectedItems);
- commitAdd("[ANDROID PwdStore] Remove " + item + " from store.");
+ commitChange("[ANDROID PwdStore] Remove " + item + " from store.");
deletePasswords(adapter, selectedItems);
}
})
@@ -532,7 +532,7 @@ public class PasswordStore extends AppCompatActivity {
return PasswordRepository.getRepositoryDirectory(getApplicationContext());
}
- private void commitAdd(final String message) {
+ private void commitChange(final String message) {
new GitOperation(PasswordRepository.getRepositoryDirectory(activity), activity) {
@Override
public void execute() {
@@ -556,18 +556,18 @@ public class PasswordStore extends AppCompatActivity {
settings.edit().putBoolean("repository_initialized", true).apply();
break;
case PgpHandler.REQUEST_CODE_DECRYPT_AND_VERIFY:
- // if went from decrypt->edit and user saved changes, we need to commitAdd
+ // if went from decrypt->edit and user saved changes, we need to commitChange
if (data.getBooleanExtra("needCommit", false)) {
- commitAdd(this.getResources().getString(R.string.edit_commit_text) + data.getExtras().getString("NAME"));
+ commitChange(this.getResources().getString(R.string.edit_commit_text) + data.getExtras().getString("NAME"));
refreshListAdapter();
}
break;
case PgpHandler.REQUEST_CODE_ENCRYPT:
- commitAdd(this.getResources().getString(R.string.add_commit_text) + data.getExtras().getString("NAME") + this.getResources().getString(R.string.from_store));
+ commitChange(this.getResources().getString(R.string.add_commit_text) + data.getExtras().getString("NAME") + this.getResources().getString(R.string.from_store));
refreshListAdapter();
break;
case PgpHandler.REQUEST_CODE_EDIT:
- commitAdd(this.getResources().getString(R.string.edit_commit_text) + data.getExtras().getString("NAME"));
+ commitChange(this.getResources().getString(R.string.edit_commit_text) + data.getExtras().getString("NAME"));
refreshListAdapter();
break;
case GitActivity.REQUEST_INIT:
@@ -622,7 +622,7 @@ public class PasswordStore extends AppCompatActivity {
// TODO this should show a warning to the user
Log.e("Moving", "Something went wrong while moving.");
} else {
- commitAdd("[ANDROID PwdStore] Moved "
+ commitChange("[ANDROID PwdStore] Moved "
+ string.replace(PasswordRepository.getRepositoryDirectory(getApplicationContext()) + "/", "")
+ " to "
+ target.getAbsolutePath().replace(PasswordRepository.getRepositoryDirectory(getApplicationContext()) + "/", "")
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.java b/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.java
index f2e689d9..6b0edb7a 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.java
+++ b/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.java
@@ -3,6 +3,7 @@ package com.zeapo.pwdstore.git;
import android.app.Activity;
import android.app.ProgressDialog;
import android.os.AsyncTask;
+import android.util.Log;
import com.zeapo.pwdstore.PasswordStore;
import com.zeapo.pwdstore.R;
@@ -38,6 +39,7 @@ public class GitAsyncTask extends AsyncTask<GitCommand, Integer, String> {
protected String doInBackground(GitCommand... commands) {
Integer nbChanges = null;
for (GitCommand command : commands) {
+ Log.d("doInBackground", "Executing the command <" + command.toString() + ">");
try {
if (command instanceof StatusCommand) {
// in case we have changes, we want to keep track of it