Migrate to AndroidX (#430)
* Update gradle and external dependencies - Switch away from deprecated compile directive - Remove explicit buildToolsVersion, is defined by the gradle plugin now - Fix build in SelectFolderActivity Signed-off-by: Harsh Shandilya <harsh@prjkt.io> * Upgrade gradle plugin and wrapper to latest alpha Signed-off-by: Harsh Shandilya <harsh@prjkt.io> * Don't use alpha gradle plugin Signed-off-by: Harsh Shandilya <harsh@prjkt.io> * Migrate to AndroidX https://developer.android.com/jetpack/androidx/ Signed-off-by: Harsh Shandilya <harsh@prjkt.io> * Upgrade AndroidX dependencies to stable release Signed-off-by: Harsh Shandilya <harsh@prjkt.io> * Enable Jetifier Signed-off-by: Harsh Shandilya <harsh@prjkt.io> * SelectFolderFragment: Fix build Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
This commit is contained in:
parent
b8c5dd85a6
commit
483e8d9310
35 changed files with 145 additions and 122 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -14,7 +14,6 @@ ant.properties
|
||||||
#Gradle
|
#Gradle
|
||||||
.gradle
|
.gradle
|
||||||
build
|
build
|
||||||
gradle.properties
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
#Maven
|
#Maven
|
||||||
|
|
|
@ -4,15 +4,15 @@ apply plugin: 'kotlin-android-extensions'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 27
|
compileSdkVersion 28
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.zeapo.pwdstore"
|
applicationId "com.zeapo.pwdstore"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 27
|
targetSdkVersion 28
|
||||||
versionCode 95
|
versionCode 95
|
||||||
versionName "1.2.0.75"
|
versionName "1.2.0.75"
|
||||||
|
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
|
@ -55,11 +55,11 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.android.support:appcompat-v7:27.1.1'
|
implementation 'androidx.appcompat:appcompat:1.0.0'
|
||||||
implementation 'com.android.support:recyclerview-v7:27.1.1'
|
implementation 'androidx.recyclerview:recyclerview:1.0.0'
|
||||||
implementation 'com.android.support:cardview-v7:27.1.1'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'com.android.support:design:27.1.1'
|
implementation 'com.google.android.material:material:1.0.0'
|
||||||
implementation 'com.android.support:support-annotations:27.1.1'
|
implementation 'androidx.annotation:annotation:1.0.0'
|
||||||
implementation 'org.sufficientlysecure:openpgp-api:11.0'
|
implementation 'org.sufficientlysecure:openpgp-api:11.0'
|
||||||
implementation 'com.nononsenseapps:filepicker:2.4.2'
|
implementation 'com.nononsenseapps:filepicker:2.4.2'
|
||||||
implementation('org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r') {
|
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 'commons-codec:commons-codec:1.11'
|
||||||
implementation 'com.jayway.android.robotium:robotium-solo:5.3.1'
|
implementation 'com.jayway.android.robotium:robotium-solo:5.3.1'
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
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
|
// Testing-only dependencies
|
||||||
androidTestImplementation 'junit:junit:4.12'
|
androidTestImplementation 'junit:junit:4.12'
|
||||||
androidTestImplementation 'org.mockito:mockito-core:2.18.0'
|
androidTestImplementation 'org.mockito:mockito-core:2.18.0'
|
||||||
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
|
||||||
androidTestImplementation 'com.android.support.test:rules:1.0.2'
|
androidTestImplementation 'androidx.test:rules:1.1.0-alpha4'
|
||||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
|
||||||
androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.2'
|
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0-alpha4'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@ import android.content.ClipboardManager
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.SystemClock
|
import android.os.SystemClock
|
||||||
import android.support.test.InstrumentationRegistry
|
import androidx.test.InstrumentationRegistry
|
||||||
import android.support.test.filters.LargeTest
|
import androidx.test.filters.LargeTest
|
||||||
import android.support.test.rule.ActivityTestRule
|
import androidx.test.rule.ActivityTestRule
|
||||||
import android.support.test.runner.AndroidJUnit4
|
import androidx.test.runner.AndroidJUnit4
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import com.zeapo.pwdstore.crypto.PgpActivity
|
import com.zeapo.pwdstore.crypto.PgpActivity
|
||||||
import kotlinx.android.synthetic.main.decrypt_layout.*
|
import kotlinx.android.synthetic.main.decrypt_layout.*
|
||||||
|
|
|
@ -3,15 +3,15 @@ package com.zeapo.pwdstore
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.support.test.InstrumentationRegistry
|
import androidx.test.InstrumentationRegistry
|
||||||
import android.support.test.espresso.Espresso.onView
|
import androidx.test.espresso.Espresso.onView
|
||||||
import android.support.test.espresso.action.ViewActions.*
|
import androidx.test.espresso.action.ViewActions.*
|
||||||
import android.support.test.espresso.assertion.ViewAssertions
|
import androidx.test.espresso.assertion.ViewAssertions
|
||||||
import android.support.test.espresso.matcher.ViewMatchers.withId
|
import androidx.test.espresso.matcher.ViewMatchers.withId
|
||||||
import android.support.test.espresso.matcher.ViewMatchers.withText
|
import androidx.test.espresso.matcher.ViewMatchers.withText
|
||||||
import android.support.test.filters.LargeTest
|
import androidx.test.filters.LargeTest
|
||||||
import android.support.test.rule.ActivityTestRule
|
import androidx.test.rule.ActivityTestRule
|
||||||
import android.support.test.runner.AndroidJUnit4
|
import androidx.test.runner.AndroidJUnit4
|
||||||
import com.zeapo.pwdstore.crypto.PgpActivity
|
import com.zeapo.pwdstore.crypto.PgpActivity
|
||||||
import org.apache.commons.io.FileUtils
|
import org.apache.commons.io.FileUtils
|
||||||
import org.apache.commons.io.IOUtils
|
import org.apache.commons.io.IOUtils
|
||||||
|
|
|
@ -4,8 +4,8 @@ import android.content.Context;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.Canvas;
|
import android.graphics.Canvas;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.support.v4.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import android.support.v7.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
class DividerItemDecoration extends RecyclerView.ItemDecoration {
|
class DividerItemDecoration extends RecyclerView.ItemDecoration {
|
||||||
|
|
|
@ -4,11 +4,11 @@ import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||||
import android.support.v4.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import android.support.v7.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
|
@ -14,16 +14,16 @@ import android.graphics.drawable.Icon;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.design.widget.Snackbar;
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
import android.support.v4.app.ActivityCompat;
|
import androidx.core.app.ActivityCompat;
|
||||||
import android.support.v4.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import android.support.v4.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
import android.support.v4.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import android.support.v4.view.MenuItemCompat;
|
import androidx.core.view.MenuItemCompat;
|
||||||
import android.support.v7.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.SearchView;
|
import androidx.appcompat.widget.SearchView;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
@ -143,7 +143,7 @@ public class PasswordStore extends AppCompatActivity {
|
||||||
});
|
});
|
||||||
snack.show();
|
snack.show();
|
||||||
View view = snack.getView();
|
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.setTextColor(Color.WHITE);
|
||||||
tv.setMaxLines(10);
|
tv.setMaxLines(10);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2,10 +2,10 @@ package com.zeapo.pwdstore
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.support.v4.app.FragmentManager
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.support.v7.app.AppCompatActivity
|
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
|
import androidx.fragment.app.FragmentManager
|
||||||
import com.zeapo.pwdstore.utils.PasswordRepository
|
import com.zeapo.pwdstore.utils.PasswordRepository
|
||||||
|
|
||||||
// TODO more work needed, this is just an extraction from PgpHandler
|
// TODO more work needed, this is just an extraction from PgpHandler
|
||||||
|
|
|
@ -4,11 +4,11 @@ import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||||
import android.support.v4.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import android.support.v7.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -62,7 +62,7 @@ public class SelectFolderFragment extends Fragment{
|
||||||
View view = inflater.inflate(R.layout.password_recycler_view, container, false);
|
View view = inflater.inflate(R.layout.password_recycler_view, container, false);
|
||||||
|
|
||||||
// use a linear layout manager
|
// 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()));
|
recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
|
||||||
|
|
||||||
// use divider
|
// use divider
|
||||||
|
@ -70,8 +70,8 @@ public class SelectFolderFragment extends Fragment{
|
||||||
|
|
||||||
// Set the adapter
|
// Set the adapter
|
||||||
recyclerView.setAdapter(recyclerAdapter);
|
recyclerView.setAdapter(recyclerAdapter);
|
||||||
FloatingActionButton fab = (FloatingActionButton) view.findViewById(R.id.fab);
|
FloatingActionButton fab = view.findViewById(R.id.fab);
|
||||||
if (fab != null) fab.setVisibility(View.GONE);
|
if (fab != null) fab.hide();
|
||||||
|
|
||||||
registerForContextMenu(recyclerView);
|
registerForContextMenu(recyclerView);
|
||||||
return view;
|
return view;
|
||||||
|
|
|
@ -14,8 +14,8 @@ import android.graphics.Typeface;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.v7.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.zeapo.pwdstore;
|
package com.zeapo.pwdstore;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
|
@ -15,11 +15,11 @@ import android.preference.Preference
|
||||||
import android.preference.PreferenceFragment
|
import android.preference.PreferenceFragment
|
||||||
import android.preference.PreferenceManager
|
import android.preference.PreferenceManager
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import android.support.design.widget.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import android.support.v4.app.ActivityCompat
|
import androidx.core.app.ActivityCompat
|
||||||
import android.support.v4.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import android.support.v7.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import android.support.v7.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.accessibility.AccessibilityManager
|
import android.view.accessibility.AccessibilityManager
|
||||||
|
@ -283,13 +283,13 @@ class UserPreference : AppCompatActivity() {
|
||||||
private fun runWithPermissions(requestedPermission: String, requestCode: Int, reason: String, body: () -> Unit) {
|
private fun runWithPermissions(requestedPermission: String, requestCode: Int, reason: String, body: () -> Unit) {
|
||||||
if (ContextCompat.checkSelfPermission(this, requestedPermission) != PackageManager.PERMISSION_GRANTED) {
|
if (ContextCompat.checkSelfPermission(this, requestedPermission) != PackageManager.PERMISSION_GRANTED) {
|
||||||
if (ActivityCompat.shouldShowRequestPermissionRationale(this, requestedPermission)) {
|
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) {
|
.setAction(R.string.dialog_ok) {
|
||||||
ActivityCompat.requestPermissions(this, arrayOf(requestedPermission), requestCode)
|
ActivityCompat.requestPermissions(this, arrayOf(requestedPermission), requestCode)
|
||||||
}
|
}
|
||||||
snack.show()
|
snack.show()
|
||||||
val view = snack.view
|
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.setTextColor(Color.WHITE)
|
||||||
tv.maxLines = 10
|
tv.maxLines = 10
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import android.content.Intent;
|
||||||
import android.content.IntentSender;
|
import android.content.IntentSender;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.zeapo.pwdstore.PasswordStore;
|
import com.zeapo.pwdstore.PasswordStore;
|
||||||
|
|
|
@ -10,9 +10,9 @@ import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.v4.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import android.support.v7.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
|
@ -8,15 +8,15 @@ import android.content.pm.PackageManager;
|
||||||
import android.content.pm.ResolveInfo;
|
import android.content.pm.ResolveInfo;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||||
import android.support.v4.app.NavUtils;
|
import androidx.core.app.NavUtils;
|
||||||
import android.support.v4.app.TaskStackBuilder;
|
import androidx.core.app.TaskStackBuilder;
|
||||||
import android.support.v4.view.MenuItemCompat;
|
import androidx.core.view.MenuItemCompat;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import android.support.v7.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import android.support.v7.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import android.support.v7.widget.SearchView;
|
import androidx.appcompat.widget.SearchView;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
|
@ -4,9 +4,9 @@ import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.support.v7.util.SortedList;
|
import androidx.recyclerview.widget.SortedList;
|
||||||
import android.support.v7.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import android.support.v7.widget.util.SortedListAdapterCallback;
|
import androidx.recyclerview.widget.SortedListAdapterCallback;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
|
@ -16,7 +16,7 @@ import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.support.v7.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.accessibility.AccessibilityEvent;
|
import android.view.accessibility.AccessibilityEvent;
|
||||||
|
|
|
@ -4,22 +4,39 @@ import android.annotation.SuppressLint
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.app.AlertDialog
|
import android.app.AlertDialog
|
||||||
import android.app.PendingIntent
|
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.graphics.Typeface
|
||||||
import android.os.AsyncTask
|
import android.os.AsyncTask
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Handler
|
|
||||||
import android.os.SystemClock
|
|
||||||
import android.os.ConditionVariable
|
import android.os.ConditionVariable
|
||||||
|
import android.os.Handler
|
||||||
import android.preference.PreferenceManager
|
import android.preference.PreferenceManager
|
||||||
import android.support.v7.app.AppCompatActivity
|
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import android.text.format.DateUtils
|
import android.text.format.DateUtils
|
||||||
import android.text.method.PasswordTransformationMethod
|
import android.text.method.PasswordTransformationMethod
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.*
|
import android.view.LayoutInflater
|
||||||
import android.widget.*
|
import android.view.Menu
|
||||||
import com.zeapo.pwdstore.*
|
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 com.zeapo.pwdstore.utils.Otp
|
||||||
import kotlinx.android.synthetic.main.decrypt_layout.*
|
import kotlinx.android.synthetic.main.decrypt_layout.*
|
||||||
import kotlinx.android.synthetic.main.encrypt_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.IOpenPgpService2
|
||||||
import org.openintents.openpgp.OpenPgpError
|
import org.openintents.openpgp.OpenPgpError
|
||||||
import org.openintents.openpgp.util.OpenPgpApi
|
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 org.openintents.openpgp.util.OpenPgpServiceConnection
|
||||||
import java.io.ByteArrayInputStream
|
import java.io.ByteArrayInputStream
|
||||||
import java.io.ByteArrayOutputStream
|
import java.io.ByteArrayOutputStream
|
||||||
|
|
|
@ -7,8 +7,8 @@ import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.v7.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
|
@ -6,8 +6,8 @@ import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.support.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import android.support.v7.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
|
@ -8,15 +8,14 @@ import android.content.DialogInterface;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.DialogFragment;
|
|
||||||
import android.support.v7.app.AlertDialog;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
import androidx.fragment.app.DialogFragment;
|
||||||
import com.zeapo.pwdstore.pwgen.pwgen;
|
import com.zeapo.pwdstore.pwgen.pwgen;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ package com.zeapo.pwdstore.utils;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.v4.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import android.support.v7.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.zeapo.pwdstore.utils;
|
package com.zeapo.pwdstore.utils;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import com.zeapo.pwdstore.SelectFolderActivity;
|
import com.zeapo.pwdstore.SelectFolderActivity;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.zeapo.pwdstore.utils;
|
package com.zeapo.pwdstore.utils;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.zeapo.pwdstore.utils;
|
package com.zeapo.pwdstore.utils;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import android.support.v7.view.ActionMode;
|
import androidx.appcompat.view.ActionMode;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
|
@ -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:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/scrollView2"
|
android:id="@+id/scrollView2"
|
||||||
|
@ -147,4 +147,4 @@
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/autofill_recycler"
|
android:id="@+id/autofill_recycler"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/fab"
|
android:id="@+id/fab"
|
||||||
android:src="@drawable/ic_add_white_48dp"
|
android:src="@drawable/ic_add_white_48dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
android:paddingRight="24dp"
|
android:paddingRight="24dp"
|
||||||
android:paddingTop="20dp">
|
android:paddingTop="20dp">
|
||||||
|
|
||||||
<android.support.design.widget.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:hintTextAppearance="@style/TextAppearance.AppCompat">
|
app:hintTextAppearance="@style/TextAppearance.AppCompat">
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
android:hint="URL"
|
android:hint="URL"
|
||||||
android:inputType="textUri"
|
android:inputType="textUri"
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
</android.support.design.widget.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
android:id="@+id/autofill_radiogroup"
|
android:id="@+id/autofill_radiogroup"
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:spinnerMode="dropdown" />
|
android:spinnerMode="dropdown" />
|
||||||
|
|
||||||
<android.support.design.widget.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
android:hint="@string/ssh_keygen_passphrase"
|
android:hint="@string/ssh_keygen_passphrase"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
android:inputType="textPassword" />
|
android:inputType="textPassword" />
|
||||||
</android.support.design.widget.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/show_passphrase"
|
android:id="@+id/show_passphrase"
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
android:checked="false"
|
android:checked="false"
|
||||||
android:text="@string/ssh_keygen_show_passphrase" />
|
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_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/ssh_keygen_comment"
|
android:hint="@string/ssh_keygen_comment"
|
||||||
android:inputType="text" />
|
android:inputType="text" />
|
||||||
</android.support.design.widget.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/generate_ssh_key"
|
android:id="@+id/generate_ssh_key"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/linearLayout"
|
android:id="@+id/linearLayout"
|
||||||
|
@ -32,4 +32,4 @@
|
||||||
app:layout_constraintRight_toRightOf="parent"
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/sshkey_passphrase" />
|
app:layout_constraintTop_toBottomOf="@+id/sshkey_passphrase" />
|
||||||
</android.support.constraint.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?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:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -18,4 +18,4 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -7,13 +7,13 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
tools:context="com.zeapo.pwdstore.PasswordFragment">
|
tools:context="com.zeapo.pwdstore.PasswordFragment">
|
||||||
|
|
||||||
<android.support.v7.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/pass_recycler"
|
android:id="@+id/pass_recycler"
|
||||||
android:scrollbars="vertical"
|
android:scrollbars="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"/>
|
android:layout_height="match_parent"/>
|
||||||
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
android:id="@+id/fab"
|
android:id="@+id/fab"
|
||||||
android:src="@drawable/ic_add_white_48dp"
|
android:src="@drawable/ic_add_white_48dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
android:id="@+id/action_search"
|
android:id="@+id/action_search"
|
||||||
android:icon="@drawable/ic_search_white_24dp"
|
android:icon="@drawable/ic_search_white_24dp"
|
||||||
android:title="@string/action_search"
|
android:title="@string/action_search"
|
||||||
pwstore:actionViewClass="android.support.v7.widget.SearchView"
|
pwstore:actionViewClass="androidx.appcompat.widget.SearchView"
|
||||||
pwstore:showAsAction="ifRoom|collapseActionView"/>
|
pwstore:showAsAction="ifRoom|collapseActionView"/>
|
||||||
|
|
||||||
</menu>
|
</menu>
|
|
@ -7,7 +7,7 @@
|
||||||
android:title="@string/action_search"
|
android:title="@string/action_search"
|
||||||
android:icon="@drawable/ic_search_white_24dp"
|
android:icon="@drawable/ic_search_white_24dp"
|
||||||
pwstore:showAsAction="ifRoom|collapseActionView"
|
pwstore:showAsAction="ifRoom|collapseActionView"
|
||||||
pwstore:actionViewClass="android.support.v7.widget.SearchView" />
|
pwstore:actionViewClass="androidx.appcompat.widget.SearchView" />
|
||||||
|
|
||||||
<!--<item android:id="@+id/menu_add_category"-->
|
<!--<item android:id="@+id/menu_add_category"-->
|
||||||
<!--android:title="New category"/>-->
|
<!--android:title="New category"/>-->
|
||||||
|
|
2
gradle.properties
Normal file
2
gradle.properties
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
android.enableJetifier=true
|
||||||
|
android.useAndroidX=true
|
Loading…
Reference in a new issue