Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 81c63e9

Browse files
committed
little refactor and version bump
1 parent 87a26c8 commit 81c63e9

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ android {
99
applicationId "com.zeapo.pwdstore"
1010
minSdkVersion 15
1111
targetSdkVersion 25
12-
versionCode 77
13-
versionName "1.2.0.57"
12+
versionCode 78
13+
versionName "1.2.0.58"
1414
}
1515

1616
compileOptions {
@@ -58,10 +58,10 @@ android {
5858
}
5959

6060
dependencies {
61-
compile 'com.android.support:appcompat-v7:24.2.1'
62-
compile 'com.android.support:recyclerview-v7:24.2.1'
63-
compile 'com.android.support:cardview-v7:24.2.1'
64-
compile 'com.android.support:design:24.2.1'
61+
compile 'com.android.support:appcompat-v7:25.3.1'
62+
compile 'com.android.support:recyclerview-v7:25.3.1'
63+
compile 'com.android.support:cardview-v7:25.3.1'
64+
compile 'com.android.support:design:25.3.1'
6565
compile 'org.sufficientlysecure:openpgp-api:11.0'
6666
compile 'com.nononsenseapps:filepicker:2.4.2'
6767
compile('org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r') {

app/src/main/java/com/zeapo/pwdstore/PasswordStore.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ public void onClick(DialogInterface dialogInterface, int i) {
476476
it.remove();
477477
adapter.updateSelectedItems(position, selectedItems);
478478

479-
commitAdd("[ANDROID PwdStore] Remove " + item + " from store.");
479+
commitChange("[ANDROID PwdStore] Remove " + item + " from store.");
480480
deletePasswords(adapter, selectedItems);
481481
}
482482
})
@@ -532,7 +532,7 @@ private File getCurrentDir() {
532532
return PasswordRepository.getRepositoryDirectory(getApplicationContext());
533533
}
534534

535-
private void commitAdd(final String message) {
535+
private void commitChange(final String message) {
536536
new GitOperation(PasswordRepository.getRepositoryDirectory(activity), activity) {
537537
@Override
538538
public void execute() {
@@ -556,18 +556,18 @@ protected void onActivityResult(int requestCode, int resultCode,
556556
settings.edit().putBoolean("repository_initialized", true).apply();
557557
break;
558558
case PgpHandler.REQUEST_CODE_DECRYPT_AND_VERIFY:
559-
// if went from decrypt->edit and user saved changes, we need to commitAdd
559+
// if went from decrypt->edit and user saved changes, we need to commitChange
560560
if (data.getBooleanExtra("needCommit", false)) {
561-
commitAdd(this.getResources().getString(R.string.edit_commit_text) + data.getExtras().getString("NAME"));
561+
commitChange(this.getResources().getString(R.string.edit_commit_text) + data.getExtras().getString("NAME"));
562562
refreshListAdapter();
563563
}
564564
break;
565565
case PgpHandler.REQUEST_CODE_ENCRYPT:
566-
commitAdd(this.getResources().getString(R.string.add_commit_text) + data.getExtras().getString("NAME") + this.getResources().getString(R.string.from_store));
566+
commitChange(this.getResources().getString(R.string.add_commit_text) + data.getExtras().getString("NAME") + this.getResources().getString(R.string.from_store));
567567
refreshListAdapter();
568568
break;
569569
case PgpHandler.REQUEST_CODE_EDIT:
570-
commitAdd(this.getResources().getString(R.string.edit_commit_text) + data.getExtras().getString("NAME"));
570+
commitChange(this.getResources().getString(R.string.edit_commit_text) + data.getExtras().getString("NAME"));
571571
refreshListAdapter();
572572
break;
573573
case GitActivity.REQUEST_INIT:
@@ -622,7 +622,7 @@ protected void onActivityResult(int requestCode, int resultCode,
622622
// TODO this should show a warning to the user
623623
Log.e("Moving", "Something went wrong while moving.");
624624
} else {
625-
commitAdd("[ANDROID PwdStore] Moved "
625+
commitChange("[ANDROID PwdStore] Moved "
626626
+ string.replace(PasswordRepository.getRepositoryDirectory(getApplicationContext()) + "/", "")
627627
+ " to "
628628
+ target.getAbsolutePath().replace(PasswordRepository.getRepositoryDirectory(getApplicationContext()) + "/", "")

app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.app.Activity;
44
import android.app.ProgressDialog;
55
import android.os.AsyncTask;
6+
import android.util.Log;
67

78
import com.zeapo.pwdstore.PasswordStore;
89
import com.zeapo.pwdstore.R;
@@ -38,6 +39,7 @@ protected void onPreExecute() {
3839
protected String doInBackground(GitCommand... commands) {
3940
Integer nbChanges = null;
4041
for (GitCommand command : commands) {
42+
Log.d("doInBackground", "Executing the command <" + command.toString() + ">");
4143
try {
4244
if (command instanceof StatusCommand) {
4345
// in case we have changes, we want to keep track of it

0 commit comments

Comments
 (0)