From 483e8d9310aea2e8bb88f77b89c0affdb8794427 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 12 Oct 2018 19:36:04 +0530 Subject: 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 * Upgrade gradle plugin and wrapper to latest alpha Signed-off-by: Harsh Shandilya * Don't use alpha gradle plugin Signed-off-by: Harsh Shandilya * Migrate to AndroidX https://developer.android.com/jetpack/androidx/ Signed-off-by: Harsh Shandilya * Upgrade AndroidX dependencies to stable release Signed-off-by: Harsh Shandilya * Enable Jetifier Signed-off-by: Harsh Shandilya * SelectFolderFragment: Fix build Signed-off-by: Harsh Shandilya --- .../java/com/zeapo/pwdstore/DecryptTest.kt | 8 ++--- .../java/com/zeapo/pwdstore/EncryptTest.kt | 18 +++++----- .../com/zeapo/pwdstore/DividerItemDecoration.java | 4 +-- .../java/com/zeapo/pwdstore/PasswordFragment.java | 10 +++--- .../java/com/zeapo/pwdstore/PasswordStore.java | 22 ++++++------ .../com/zeapo/pwdstore/SelectFolderActivity.kt | 4 +-- .../com/zeapo/pwdstore/SelectFolderFragment.java | 16 ++++----- .../main/java/com/zeapo/pwdstore/SshKeyGen.java | 4 +-- .../main/java/com/zeapo/pwdstore/ToCloneOrNot.java | 2 +- .../main/java/com/zeapo/pwdstore/UserPreference.kt | 14 ++++---- .../zeapo/pwdstore/autofill/AutofillActivity.java | 2 +- .../zeapo/pwdstore/autofill/AutofillFragment.java | 6 ++-- .../autofill/AutofillPreferenceActivity.java | 18 +++++----- .../pwdstore/autofill/AutofillRecyclerAdapter.java | 6 ++-- .../zeapo/pwdstore/autofill/AutofillService.java | 2 +- .../java/com/zeapo/pwdstore/crypto/PgpActivity.kt | 39 +++++++++++++++++----- .../java/com/zeapo/pwdstore/git/GitActivity.java | 4 +-- .../java/com/zeapo/pwdstore/git/GitOperation.java | 4 +-- .../com/zeapo/pwdstore/pwgenDialogFragment.java | 5 ++- .../zeapo/pwdstore/utils/EntryRecyclerAdapter.java | 6 ++-- .../pwdstore/utils/FolderRecyclerAdapter.java | 2 +- .../com/zeapo/pwdstore/utils/PasswordItem.java | 2 +- .../pwdstore/utils/PasswordRecyclerAdapter.java | 4 +-- app/src/main/res/layout/activity_git_config.xml | 4 +-- app/src/main/res/layout/autofill_recycler_view.xml | 4 +-- app/src/main/res/layout/fragment_autofill.xml | 4 +-- app/src/main/res/layout/fragment_ssh_keygen.xml | 8 ++--- app/src/main/res/layout/git_passphrase_layout.xml | 4 +-- app/src/main/res/layout/otp_confirm_layout.xml | 4 +-- app/src/main/res/layout/password_recycler_view.xml | 4 +-- app/src/main/res/menu/autofill_preference.xml | 2 +- app/src/main/res/menu/main_menu.xml | 2 +- 32 files changed, 130 insertions(+), 108 deletions(-) (limited to 'app/src') 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(android.support.design.R.id.snackbar_text) + val tv = view.findViewById(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 @@ - - + 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"> - - - @@ -23,7 +23,7 @@ android:hint="URL" android:inputType="textUri" tools:ignore="HardcodedText" /> - + - - + - - +