summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--app/build.gradle26
-rw-r--r--app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt8
-rw-r--r--app/src/androidTest/java/com/zeapo/pwdstore/EncryptTest.kt18
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/DividerItemDecoration.java4
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java10
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/PasswordStore.java22
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/SelectFolderActivity.kt4
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/SelectFolderFragment.java16
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java4
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/ToCloneOrNot.java2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/UserPreference.kt14
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillActivity.java2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java6
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillPreferenceActivity.java18
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java6
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt39
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java4
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/GitOperation.java4
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java5
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/EntryRecyclerAdapter.java6
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/FolderRecyclerAdapter.java2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java4
-rw-r--r--app/src/main/res/layout/activity_git_config.xml4
-rw-r--r--app/src/main/res/layout/autofill_recycler_view.xml4
-rw-r--r--app/src/main/res/layout/fragment_autofill.xml4
-rw-r--r--app/src/main/res/layout/fragment_ssh_keygen.xml8
-rw-r--r--app/src/main/res/layout/git_passphrase_layout.xml4
-rw-r--r--app/src/main/res/layout/otp_confirm_layout.xml4
-rw-r--r--app/src/main/res/layout/password_recycler_view.xml4
-rw-r--r--app/src/main/res/menu/autofill_preference.xml2
-rw-r--r--app/src/main/res/menu/main_menu.xml2
-rw-r--r--gradle.properties2
35 files changed, 145 insertions, 122 deletions
diff --git a/.gitignore b/.gitignore
index 4873def8..5d047d0e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,7 +14,6 @@ ant.properties
#Gradle
.gradle
build
-gradle.properties
.DS_Store
#Maven
diff --git a/app/build.gradle b/app/build.gradle
index 5c4b30d2..28895b1d 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -4,15 +4,15 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'eclipse'
android {
- compileSdkVersion 27
+ compileSdkVersion 28
defaultConfig {
applicationId "com.zeapo.pwdstore"
minSdkVersion 16
- targetSdkVersion 27
+ targetSdkVersion 28
versionCode 95
versionName "1.2.0.75"
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
@@ -55,11 +55,11 @@ android {
}
dependencies {
- implementation 'com.android.support:appcompat-v7:27.1.1'
- implementation 'com.android.support:recyclerview-v7:27.1.1'
- implementation 'com.android.support:cardview-v7:27.1.1'
- implementation 'com.android.support:design:27.1.1'
- implementation 'com.android.support:support-annotations:27.1.1'
+ implementation 'androidx.appcompat:appcompat:1.0.0'
+ implementation 'androidx.recyclerview:recyclerview:1.0.0'
+ implementation 'androidx.cardview:cardview:1.0.0'
+ implementation 'com.google.android.material:material:1.0.0'
+ implementation 'androidx.annotation:annotation:1.0.0'
implementation 'org.sufficientlysecure:openpgp-api:11.0'
implementation 'com.nononsenseapps:filepicker:2.4.2'
implementation('org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r') {
@@ -70,15 +70,15 @@ dependencies {
implementation 'commons-codec:commons-codec:1.11'
implementation 'com.jayway.android.robotium:robotium-solo:5.3.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- implementation 'com.android.support.constraint:constraint-layout:1.1.3'
+ implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
// Testing-only dependencies
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'org.mockito:mockito-core:2.18.0'
- androidTestImplementation 'com.android.support.test:runner:1.0.2'
- androidTestImplementation 'com.android.support.test:rules:1.0.2'
- androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
- androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.2'
+ androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
+ androidTestImplementation 'androidx.test:rules:1.1.0-alpha4'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
+ androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0-alpha4'
}
diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt
index 4de3de88..98921d17 100644
--- a/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt
+++ b/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt
@@ -5,10 +5,10 @@ import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.os.SystemClock
-import android.support.test.InstrumentationRegistry
-import android.support.test.filters.LargeTest
-import android.support.test.rule.ActivityTestRule
-import android.support.test.runner.AndroidJUnit4
+import androidx.test.InstrumentationRegistry
+import androidx.test.filters.LargeTest
+import androidx.test.rule.ActivityTestRule
+import androidx.test.runner.AndroidJUnit4
import android.util.Log
import com.zeapo.pwdstore.crypto.PgpActivity
import kotlinx.android.synthetic.main.decrypt_layout.*
diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/EncryptTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/EncryptTest.kt
index 91ac9ea0..a86db5ee 100644
--- a/app/src/androidTest/java/com/zeapo/pwdstore/EncryptTest.kt
+++ b/app/src/androidTest/java/com/zeapo/pwdstore/EncryptTest.kt
@@ -3,15 +3,15 @@ package com.zeapo.pwdstore
import android.annotation.SuppressLint
import android.content.Context
import android.content.Intent
-import android.support.test.InstrumentationRegistry
-import android.support.test.espresso.Espresso.onView
-import android.support.test.espresso.action.ViewActions.*
-import android.support.test.espresso.assertion.ViewAssertions
-import android.support.test.espresso.matcher.ViewMatchers.withId
-import android.support.test.espresso.matcher.ViewMatchers.withText
-import android.support.test.filters.LargeTest
-import android.support.test.rule.ActivityTestRule
-import android.support.test.runner.AndroidJUnit4
+import androidx.test.InstrumentationRegistry
+import androidx.test.espresso.Espresso.onView
+import androidx.test.espresso.action.ViewActions.*
+import androidx.test.espresso.assertion.ViewAssertions
+import androidx.test.espresso.matcher.ViewMatchers.withId
+import androidx.test.espresso.matcher.ViewMatchers.withText
+import androidx.test.filters.LargeTest
+import androidx.test.rule.ActivityTestRule
+import androidx.test.runner.AndroidJUnit4
import com.zeapo.pwdstore.crypto.PgpActivity
import org.apache.commons.io.FileUtils
import org.apache.commons.io.IOUtils
diff --git a/app/src/main/java/com/zeapo/pwdstore/DividerItemDecoration.java b/app/src/main/java/com/zeapo/pwdstore/DividerItemDecoration.java
index bc174318..21510112 100644
--- a/app/src/main/java/com/zeapo/pwdstore/DividerItemDecoration.java
+++ b/app/src/main/java/com/zeapo/pwdstore/DividerItemDecoration.java
@@ -4,8 +4,8 @@ import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
-import android.support.v4.content.ContextCompat;
-import android.support.v7.widget.RecyclerView;
+import androidx.core.content.ContextCompat;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
class DividerItemDecoration extends RecyclerView.ItemDecoration {
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java
index 58af4a60..f6179703 100644
--- a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java
+++ b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java
@@ -4,11 +4,11 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
-import android.support.design.widget.FloatingActionButton;
-import android.support.v4.app.Fragment;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
+import com.google.android.material.floatingactionbutton.FloatingActionButton;
+import androidx.fragment.app.Fragment;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java
index cc9e2ba8..04a7f9de 100644
--- a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java
+++ b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java
@@ -14,16 +14,16 @@ import android.graphics.drawable.Icon;
import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
-import android.support.annotation.NonNull;
-import android.support.design.widget.Snackbar;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentTransaction;
-import android.support.v4.content.ContextCompat;
-import android.support.v4.view.MenuItemCompat;
-import android.support.v7.app.AlertDialog;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.SearchView;
+import androidx.annotation.NonNull;
+import com.google.android.material.snackbar.Snackbar;
+import androidx.core.app.ActivityCompat;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
+import androidx.core.content.ContextCompat;
+import androidx.core.view.MenuItemCompat;
+import androidx.appcompat.app.AlertDialog;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.SearchView;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
@@ -143,7 +143,7 @@ public class PasswordStore extends AppCompatActivity {
});
snack.show();
View view = snack.getView();
- TextView tv = (TextView) view.findViewById(android.support.design.R.id.snackbar_text);
+ TextView tv = (TextView) view.findViewById(com.google.android.material.R.id.snackbar_text);
tv.setTextColor(Color.WHITE);
tv.setMaxLines(10);
} else {
diff --git a/app/src/main/java/com/zeapo/pwdstore/SelectFolderActivity.kt b/app/src/main/java/com/zeapo/pwdstore/SelectFolderActivity.kt
index d0347cf0..30923ee1 100644
--- a/app/src/main/java/com/zeapo/pwdstore/SelectFolderActivity.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/SelectFolderActivity.kt
@@ -2,10 +2,10 @@ package com.zeapo.pwdstore
import android.app.Activity
import android.os.Bundle
-import android.support.v4.app.FragmentManager
-import android.support.v7.app.AppCompatActivity
+import androidx.appcompat.app.AppCompatActivity
import android.view.Menu
import android.view.MenuItem
+import androidx.fragment.app.FragmentManager
import com.zeapo.pwdstore.utils.PasswordRepository
// TODO more work needed, this is just an extraction from PgpHandler
diff --git a/app/src/main/java/com/zeapo/pwdstore/SelectFolderFragment.java b/app/src/main/java/com/zeapo/pwdstore/SelectFolderFragment.java
index d8c5ff16..f4ec98b2 100644
--- a/app/src/main/java/com/zeapo/pwdstore/SelectFolderFragment.java
+++ b/app/src/main/java/com/zeapo/pwdstore/SelectFolderFragment.java
@@ -4,11 +4,11 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
-import android.support.design.widget.FloatingActionButton;
-import android.support.v4.app.Fragment;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
+import com.google.android.material.floatingactionbutton.FloatingActionButton;
+import androidx.fragment.app.Fragment;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -62,7 +62,7 @@ public class SelectFolderFragment extends Fragment{
View view = inflater.inflate(R.layout.password_recycler_view, container, false);
// use a linear layout manager
- recyclerView = (RecyclerView) view.findViewById(R.id.pass_recycler);
+ recyclerView = view.findViewById(R.id.pass_recycler);
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
// use divider
@@ -70,8 +70,8 @@ public class SelectFolderFragment extends Fragment{
// Set the adapter
recyclerView.setAdapter(recyclerAdapter);
- FloatingActionButton fab = (FloatingActionButton) view.findViewById(R.id.fab);
- if (fab != null) fab.setVisibility(View.GONE);
+ FloatingActionButton fab = view.findViewById(R.id.fab);
+ if (fab != null) fab.hide();
registerForContextMenu(recyclerView);
return view;
diff --git a/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java b/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java
index 3b73541b..380ef659 100644
--- a/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java
+++ b/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java
@@ -14,8 +14,8 @@ import android.graphics.Typeface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.preference.PreferenceManager;
-import android.support.v7.app.AlertDialog;
-import android.support.v7.app.AppCompatActivity;
+import androidx.appcompat.app.AlertDialog;
+import androidx.appcompat.app.AppCompatActivity;
import android.text.InputType;
import android.view.LayoutInflater;
import android.view.View;
diff --git a/app/src/main/java/com/zeapo/pwdstore/ToCloneOrNot.java b/app/src/main/java/com/zeapo/pwdstore/ToCloneOrNot.java
index fb3f4008..f5c25687 100644
--- a/app/src/main/java/com/zeapo/pwdstore/ToCloneOrNot.java
+++ b/app/src/main/java/com/zeapo/pwdstore/ToCloneOrNot.java
@@ -1,7 +1,7 @@
package com.zeapo.pwdstore;
import android.os.Bundle;
-import android.support.v4.app.Fragment;
+import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt
index aa26ecb1..bba9e605 100644
--- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt
@@ -15,11 +15,11 @@ import android.preference.Preference
import android.preference.PreferenceFragment
import android.preference.PreferenceManager
import android.provider.Settings
-import android.support.design.widget.Snackbar
-import android.support.v4.app.ActivityCompat
-import android.support.v4.content.ContextCompat
-import android.support.v7.app.AlertDialog
-import android.support.v7.app.AppCompatActivity
+import com.google.android.material.snackbar.Snackbar
+import androidx.core.app.ActivityCompat
+import androidx.core.content.ContextCompat
+import androidx.appcompat.app.AlertDialog
+import androidx.appcompat.app.AppCompatActivity
import android.util.Log
import android.view.MenuItem
import android.view.accessibility.AccessibilityManager
@@ -283,13 +283,13 @@ class UserPreference : AppCompatActivity() {
private fun runWithPermissions(requestedPermission: String, requestCode: Int, reason: String, body: () -> Unit) {
if (ContextCompat.checkSelfPermission(this, requestedPermission) != PackageManager.PERMISSION_GRANTED) {
if (ActivityCompat.shouldShowRequestPermissionRationale(this, requestedPermission)) {
- val snack = Snackbar.make(prefsFragment.view!!, reason, Snackbar.LENGTH_INDEFINITE)
+ val snack = Snackbar.make(prefsFragment.view, reason, Snackbar.LENGTH_INDEFINITE)
.setAction(R.string.dialog_ok) {
ActivityCompat.requestPermissions(this, arrayOf(requestedPermission), requestCode)
}
snack.show()
val view = snack.view
- val tv = view.findViewById<TextView>(android.support.design.R.id.snackbar_text)
+ val tv = view.findViewById<TextView>(com.google.android.material.R.id.snackbar_text)
tv.setTextColor(Color.WHITE)
tv.maxLines = 10
} else {
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillActivity.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillActivity.java
index d40c5123..0d39e01d 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillActivity.java
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillActivity.java
@@ -6,7 +6,7 @@ import android.content.Intent;
import android.content.IntentSender;
import android.content.SharedPreferences;
import android.os.Bundle;
-import android.support.v7.app.AppCompatActivity;
+import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import com.zeapo.pwdstore.PasswordStore;
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java
index b0eb8fdd..3a3b632d 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillFragment.java
@@ -10,9 +10,9 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.v4.content.ContextCompat;
-import android.support.v7.app.AlertDialog;
+import androidx.annotation.NonNull;
+import androidx.core.content.ContextCompat;
+import androidx.appcompat.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillPreferenceActivity.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillPreferenceActivity.java
index 7696d82e..b85a31c7 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillPreferenceActivity.java
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillPreferenceActivity.java
@@ -8,15 +8,15 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.AsyncTask;
import android.os.Bundle;
-import android.support.design.widget.FloatingActionButton;
-import android.support.v4.app.NavUtils;
-import android.support.v4.app.TaskStackBuilder;
-import android.support.v4.view.MenuItemCompat;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.DividerItemDecoration;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.support.v7.widget.SearchView;
+import com.google.android.material.floatingactionbutton.FloatingActionButton;
+import androidx.core.app.NavUtils;
+import androidx.core.app.TaskStackBuilder;
+import androidx.core.view.MenuItemCompat;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.DividerItemDecoration;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+import androidx.appcompat.widget.SearchView;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java
index b28687d8..0c1ec224 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillRecyclerAdapter.java
@@ -4,9 +4,9 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
-import android.support.v7.util.SortedList;
-import android.support.v7.widget.RecyclerView;
-import android.support.v7.widget.util.SortedListAdapterCallback;
+import androidx.recyclerview.widget.SortedList;
+import androidx.recyclerview.widget.RecyclerView;
+import androidx.recyclerview.widget.SortedListAdapterCallback;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java
index 87c0df75..7a4d59fa 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java
@@ -16,7 +16,7 @@ import android.os.Build;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.provider.Settings;
-import android.support.v7.app.AlertDialog;
+import androidx.appcompat.app.AlertDialog;
import android.util.Log;
import android.view.WindowManager;
import android.view.accessibility.AccessibilityEvent;
diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
index 4afc6e19..74295e6a 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpActivity.kt
@@ -4,22 +4,39 @@ import android.annotation.SuppressLint
import android.app.Activity
import android.app.AlertDialog
import android.app.PendingIntent
-import android.content.*
+import android.content.ClipData
+import android.content.ClipboardManager
+import android.content.Context
+import android.content.Intent
+import android.content.IntentSender
+import android.content.SharedPreferences
import android.graphics.Typeface
import android.os.AsyncTask
import android.os.Bundle
-import android.os.Handler
-import android.os.SystemClock
import android.os.ConditionVariable
+import android.os.Handler
import android.preference.PreferenceManager
-import android.support.v7.app.AppCompatActivity
import android.text.TextUtils
import android.text.format.DateUtils
import android.text.method.PasswordTransformationMethod
import android.util.Log
-import android.view.*
-import android.widget.*
-import com.zeapo.pwdstore.*
+import android.view.LayoutInflater
+import android.view.Menu
+import android.view.MenuItem
+import android.view.MotionEvent
+import android.view.View
+import android.view.WindowManager
+import android.widget.Button
+import android.widget.CheckBox
+import android.widget.LinearLayout
+import android.widget.ProgressBar
+import android.widget.TextView
+import android.widget.Toast
+import androidx.appcompat.app.AppCompatActivity
+import com.zeapo.pwdstore.PasswordEntry
+import com.zeapo.pwdstore.R
+import com.zeapo.pwdstore.UserPreference
+import com.zeapo.pwdstore.pwgenDialogFragment
import com.zeapo.pwdstore.utils.Otp
import kotlinx.android.synthetic.main.decrypt_layout.*
import kotlinx.android.synthetic.main.encrypt_layout.*
@@ -27,7 +44,13 @@ import org.apache.commons.io.FileUtils
import org.openintents.openpgp.IOpenPgpService2
import org.openintents.openpgp.OpenPgpError
import org.openintents.openpgp.util.OpenPgpApi
-import org.openintents.openpgp.util.OpenPgpApi.*
+import org.openintents.openpgp.util.OpenPgpApi.ACTION_DECRYPT_VERIFY
+import org.openintents.openpgp.util.OpenPgpApi.RESULT_CODE
+import org.openintents.openpgp.util.OpenPgpApi.RESULT_CODE_ERROR
+import org.openintents.openpgp.util.OpenPgpApi.RESULT_CODE_SUCCESS
+import org.openintents.openpgp.util.OpenPgpApi.RESULT_CODE_USER_INTERACTION_REQUIRED
+import org.openintents.openpgp.util.OpenPgpApi.RESULT_ERROR
+import org.openintents.openpgp.util.OpenPgpApi.RESULT_INTENT
import org.openintents.openpgp.util.OpenPgpServiceConnection
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java
index 996141a9..b6e9af82 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java
+++ b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java
@@ -7,8 +7,8 @@ import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
-import android.support.v7.app.AlertDialog;
-import android.support.v7.app.AppCompatActivity;
+import androidx.appcompat.app.AlertDialog;
+import androidx.appcompat.app.AppCompatActivity;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.java b/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.java
index d78ca185..a0da14ab 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.java
+++ b/app/src/main/java/com/zeapo/pwdstore/git/GitOperation.java
@@ -6,8 +6,8 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AlertDialog;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AlertDialog;
import android.text.InputType;
import android.view.LayoutInflater;
import android.view.View;
diff --git a/app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java b/app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java
index 8c4ad4a1..0272f43a 100644
--- a/app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java
+++ b/app/src/main/java/com/zeapo/pwdstore/pwgenDialogFragment.java
@@ -8,15 +8,14 @@ import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.graphics.Typeface;
import android.os.Bundle;
-import android.support.v4.app.DialogFragment;
-import android.support.v7.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.TextView;
-
+import androidx.appcompat.app.AlertDialog;
+import androidx.fragment.app.DialogFragment;
import com.zeapo.pwdstore.pwgen.pwgen;
import org.jetbrains.annotations.NotNull;
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/EntryRecyclerAdapter.java b/app/src/main/java/com/zeapo/pwdstore/utils/EntryRecyclerAdapter.java
index b43b2e2d..cabc0dcf 100644
--- a/app/src/main/java/com/zeapo/pwdstore/utils/EntryRecyclerAdapter.java
+++ b/app/src/main/java/com/zeapo/pwdstore/utils/EntryRecyclerAdapter.java
@@ -3,9 +3,9 @@ package com.zeapo.pwdstore.utils;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.graphics.Color;
-import android.support.annotation.NonNull;
-import android.support.v4.content.ContextCompat;
-import android.support.v7.widget.RecyclerView;
+import androidx.annotation.NonNull;
+import androidx.core.content.ContextCompat;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/FolderRecyclerAdapter.java b/app/src/main/java/com/zeapo/pwdstore/utils/FolderRecyclerAdapter.java
index 1888cc7e..d155802f 100644
--- a/app/src/main/java/com/zeapo/pwdstore/utils/FolderRecyclerAdapter.java
+++ b/app/src/main/java/com/zeapo/pwdstore/utils/FolderRecyclerAdapter.java
@@ -1,6 +1,6 @@
package com.zeapo.pwdstore.utils;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import android.view.View;
import com.zeapo.pwdstore.SelectFolderActivity;
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java
index 3261cc58..d02adeda 100644
--- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java
+++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java
@@ -1,6 +1,6 @@
package com.zeapo.pwdstore.utils;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import java.io.File;
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java
index 3e5e1c74..751d8559 100644
--- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java
+++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java
@@ -1,7 +1,7 @@
package com.zeapo.pwdstore.utils;
-import android.support.annotation.NonNull;
-import android.support.v7.view.ActionMode;
+import androidx.annotation.NonNull;
+import androidx.appcompat.view.ActionMode;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
diff --git a/app/src/main/res/layout/activity_git_config.xml b/app/src/main/res/layout/activity_git_config.xml
index 2174ffb6..ec835aab 100644
--- a/app/src/main/res/layout/activity_git_config.xml
+++ b/app/src/main/res/layout/activity_git_config.xml
@@ -1,4 +1,4 @@
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/scrollView2"
@@ -147,4 +147,4 @@
tools:ignore="HardcodedText" />
-</android.support.constraint.ConstraintLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/app/src/main/res/layout/autofill_recycler_view.xml b/app/src/main/res/layout/autofill_recycler_view.xml
index 6260be08..c947d58a 100644
--- a/app/src/main/res/layout/autofill_recycler_view.xml
+++ b/app/src/main/res/layout/autofill_recycler_view.xml
@@ -4,7 +4,7 @@
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
- <android.support.v7.widget.RecyclerView
+ <androidx.recyclerview.widget.RecyclerView
android:id="@+id/autofill_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -19,7 +19,7 @@
android:indeterminate="true"
android:visibility="gone" />
- <android.support.design.widget.FloatingActionButton
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:src="@drawable/ic_add_white_48dp"
android:layout_width="wrap_content"
diff --git a/app/src/main/res/layout/fragment_autofill.xml b/app/src/main/res/layout/fragment_autofill.xml
index 652ea1db..7f09f0cb 100644
--- a/app/src/main/res/layout/fragment_autofill.xml
+++ b/app/src/main/res/layout/fragment_autofill.xml
@@ -11,7 +11,7 @@
android:paddingRight="24dp"
android:paddingTop="20dp">
- <android.support.design.widget.TextInputLayout
+ <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:hintTextAppearance="@style/TextAppearance.AppCompat">
@@ -23,7 +23,7 @@
android:hint="URL"
android:inputType="textUri"
tools:ignore="HardcodedText" />
- </android.support.design.widget.TextInputLayout>
+ </com.google.android.material.textfield.TextInputLayout>
<RadioGroup
android:id="@+id/autofill_radiogroup"
diff --git a/app/src/main/res/layout/fragment_ssh_keygen.xml b/app/src/main/res/layout/fragment_ssh_keygen.xml
index 7ad3b951..12961292 100644
--- a/app/src/main/res/layout/fragment_ssh_keygen.xml
+++ b/app/src/main/res/layout/fragment_ssh_keygen.xml
@@ -24,7 +24,7 @@
android:layout_height="wrap_content"
android:spinnerMode="dropdown" />
- <android.support.design.widget.TextInputLayout
+ <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
@@ -37,7 +37,7 @@
android:hint="@string/ssh_keygen_passphrase"
android:importantForAccessibility="no"
android:inputType="textPassword" />
- </android.support.design.widget.TextInputLayout>
+ </com.google.android.material.textfield.TextInputLayout>
<CheckBox
android:id="@+id/show_passphrase"
@@ -47,7 +47,7 @@
android:checked="false"
android:text="@string/ssh_keygen_show_passphrase" />
- <android.support.design.widget.TextInputLayout
+ <com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
@@ -59,7 +59,7 @@
android:layout_height="wrap_content"
android:hint="@string/ssh_keygen_comment"
android:inputType="text" />
- </android.support.design.widget.TextInputLayout>
+ </com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/generate_ssh_key"
diff --git a/app/src/main/res/layout/git_passphrase_layout.xml b/app/src/main/res/layout/git_passphrase_layout.xml
index 6edd3d02..b1bda920 100644
--- a/app/src/main/res/layout/git_passphrase_layout.xml
+++ b/app/src/main/res/layout/git_passphrase_layout.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/linearLayout"
@@ -32,4 +32,4 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sshkey_passphrase" />
-</android.support.constraint.ConstraintLayout> \ No newline at end of file
+</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/otp_confirm_layout.xml b/app/src/main/res/layout/otp_confirm_layout.xml
index d2cb597e..e9bcfbc5 100644
--- a/app/src/main/res/layout/otp_confirm_layout.xml
+++ b/app/src/main/res/layout/otp_confirm_layout.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
@@ -18,4 +18,4 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
-</android.support.constraint.ConstraintLayout> \ No newline at end of file
+</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/password_recycler_view.xml b/app/src/main/res/layout/password_recycler_view.xml
index 9c56210f..679267d2 100644
--- a/app/src/main/res/layout/password_recycler_view.xml
+++ b/app/src/main/res/layout/password_recycler_view.xml
@@ -7,13 +7,13 @@
android:orientation="vertical"
tools:context="com.zeapo.pwdstore.PasswordFragment">
- <android.support.v7.widget.RecyclerView
+ <androidx.recyclerview.widget.RecyclerView
android:id="@+id/pass_recycler"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
- <android.support.design.widget.FloatingActionButton
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:src="@drawable/ic_add_white_48dp"
android:layout_width="wrap_content"
diff --git a/app/src/main/res/menu/autofill_preference.xml b/app/src/main/res/menu/autofill_preference.xml
index 31f694e0..08736bf9 100644
--- a/app/src/main/res/menu/autofill_preference.xml
+++ b/app/src/main/res/menu/autofill_preference.xml
@@ -6,7 +6,7 @@
android:id="@+id/action_search"
android:icon="@drawable/ic_search_white_24dp"
android:title="@string/action_search"
- pwstore:actionViewClass="android.support.v7.widget.SearchView"
+ pwstore:actionViewClass="androidx.appcompat.widget.SearchView"
pwstore:showAsAction="ifRoom|collapseActionView"/>
</menu> \ No newline at end of file
diff --git a/app/src/main/res/menu/main_menu.xml b/app/src/main/res/menu/main_menu.xml
index 730b7533..f099913b 100644
--- a/app/src/main/res/menu/main_menu.xml
+++ b/app/src/main/res/menu/main_menu.xml
@@ -7,7 +7,7 @@
android:title="@string/action_search"
android:icon="@drawable/ic_search_white_24dp"
pwstore:showAsAction="ifRoom|collapseActionView"
- pwstore:actionViewClass="android.support.v7.widget.SearchView" />
+ pwstore:actionViewClass="androidx.appcompat.widget.SearchView" />
<!--<item android:id="@+id/menu_add_category"-->
<!--android:title="New category"/>-->
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 00000000..dbb7bf70
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,2 @@
+android.enableJetifier=true
+android.useAndroidX=true