Remove unnecessary V2 suffix
This commit is contained in:
parent
bcf33e90a5
commit
a1f838151e
15 changed files with 50 additions and 53 deletions
|
@ -49,7 +49,7 @@
|
||||||
android:windowSoftInputMode="adjustResize" />
|
android:windowSoftInputMode="adjustResize" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.crypto.DecryptActivityV2"
|
android:name=".ui.crypto.DecryptActivity"
|
||||||
android:exported="true" />
|
android:exported="true" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
android:parentActivityName=".ui.passwords.PasswordStore" />
|
android:parentActivityName=".ui.passwords.PasswordStore" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.crypto.PasswordCreationActivityV2"
|
android:name=".ui.crypto.PasswordCreationActivity"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:label="@string/new_password_title"
|
android:label="@string/new_password_title"
|
||||||
android:windowSoftInputMode="adjustResize" />
|
android:windowSoftInputMode="adjustResize" />
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
android:label="@string/pref_ssh_keygen_title"
|
android:label="@string/pref_ssh_keygen_title"
|
||||||
android:windowSoftInputMode="adjustResize" />
|
android:windowSoftInputMode="adjustResize" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.autofill.AutofillDecryptActivityV2"
|
android:name=".ui.autofill.AutofillDecryptActivity"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:theme="@style/NoBackgroundThemeM3" />
|
android:theme="@style/NoBackgroundThemeM3" />
|
||||||
<activity
|
<activity
|
||||||
|
|
|
@ -40,7 +40,7 @@ import logcat.logcat
|
||||||
|
|
||||||
@RequiresApi(26)
|
@RequiresApi(26)
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class AutofillDecryptActivityV2 : AppCompatActivity() {
|
class AutofillDecryptActivity : AppCompatActivity() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class AutofillDecryptActivityV2 : AppCompatActivity() {
|
||||||
private var decryptFileRequestCode = 1
|
private var decryptFileRequestCode = 1
|
||||||
|
|
||||||
fun makeDecryptFileIntent(file: File, forwardedExtras: Bundle, context: Context): Intent {
|
fun makeDecryptFileIntent(file: File, forwardedExtras: Bundle, context: Context): Intent {
|
||||||
return Intent(context, AutofillDecryptActivityV2::class.java).apply {
|
return Intent(context, AutofillDecryptActivity::class.java).apply {
|
||||||
putExtras(forwardedExtras)
|
putExtras(forwardedExtras)
|
||||||
putExtra(EXTRA_SEARCH_ACTION, true)
|
putExtra(EXTRA_SEARCH_ACTION, true)
|
||||||
putExtra(EXTRA_FILE_PATH, file.absolutePath)
|
putExtra(EXTRA_FILE_PATH, file.absolutePath)
|
||||||
|
@ -59,7 +59,7 @@ class AutofillDecryptActivityV2 : AppCompatActivity() {
|
||||||
|
|
||||||
fun makeDecryptFileIntentSender(file: File, context: Context): IntentSender {
|
fun makeDecryptFileIntentSender(file: File, context: Context): IntentSender {
|
||||||
val intent =
|
val intent =
|
||||||
Intent(context, AutofillDecryptActivityV2::class.java).apply {
|
Intent(context, AutofillDecryptActivity::class.java).apply {
|
||||||
putExtra(EXTRA_SEARCH_ACTION, false)
|
putExtra(EXTRA_SEARCH_ACTION, false)
|
||||||
putExtra(EXTRA_FILE_PATH, file.absolutePath)
|
putExtra(EXTRA_FILE_PATH, file.absolutePath)
|
||||||
}
|
}
|
||||||
|
@ -87,14 +87,14 @@ class AutofillDecryptActivityV2 : AppCompatActivity() {
|
||||||
val filePath =
|
val filePath =
|
||||||
intent?.getStringExtra(EXTRA_FILE_PATH)
|
intent?.getStringExtra(EXTRA_FILE_PATH)
|
||||||
?: run {
|
?: run {
|
||||||
logcat(ERROR) { "AutofillDecryptActivityV2 started without EXTRA_FILE_PATH" }
|
logcat(ERROR) { "AutofillDecryptActivity started without EXTRA_FILE_PATH" }
|
||||||
finish()
|
finish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val clientState =
|
val clientState =
|
||||||
intent?.getBundleExtra(AutofillManager.EXTRA_CLIENT_STATE)
|
intent?.getBundleExtra(AutofillManager.EXTRA_CLIENT_STATE)
|
||||||
?: run {
|
?: run {
|
||||||
logcat(ERROR) { "AutofillDecryptActivityV2 started without EXTRA_CLIENT_STATE" }
|
logcat(ERROR) { "AutofillDecryptActivity started without EXTRA_CLIENT_STATE" }
|
||||||
finish()
|
finish()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ class AutofillDecryptActivityV2 : AppCompatActivity() {
|
||||||
} else {
|
} else {
|
||||||
val fillInDataset =
|
val fillInDataset =
|
||||||
AutofillResponseBuilder.makeFillInDataset(
|
AutofillResponseBuilder.makeFillInDataset(
|
||||||
this@AutofillDecryptActivityV2,
|
this@AutofillDecryptActivity,
|
||||||
credentials,
|
credentials,
|
||||||
clientState,
|
clientState,
|
||||||
action
|
action
|
|
@ -227,7 +227,7 @@ class AutofillFilterView : AppCompatActivity() {
|
||||||
AutofillMatcher.addMatchFor(applicationContext, formOrigin, item.file)
|
AutofillMatcher.addMatchFor(applicationContext, formOrigin, item.file)
|
||||||
// intent?.extras? is checked to be non-null in onCreate
|
// intent?.extras? is checked to be non-null in onCreate
|
||||||
decryptAction.launch(
|
decryptAction.launch(
|
||||||
AutofillDecryptActivityV2.makeDecryptFileIntent(item.file, intent!!.extras!!, this)
|
AutofillDecryptActivity.makeDecryptFileIntent(item.file, intent!!.extras!!, this)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ import androidx.annotation.RequiresApi
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.os.bundleOf
|
import androidx.core.os.bundleOf
|
||||||
import app.passwordstore.data.repo.PasswordRepository
|
import app.passwordstore.data.repo.PasswordRepository
|
||||||
import app.passwordstore.ui.crypto.PasswordCreationActivityV2
|
import app.passwordstore.ui.crypto.PasswordCreationActivity
|
||||||
import app.passwordstore.util.autofill.AutofillMatcher
|
import app.passwordstore.util.autofill.AutofillMatcher
|
||||||
import app.passwordstore.util.autofill.AutofillPreferences
|
import app.passwordstore.util.autofill.AutofillPreferences
|
||||||
import app.passwordstore.util.autofill.AutofillResponseBuilder
|
import app.passwordstore.util.autofill.AutofillResponseBuilder
|
||||||
|
@ -108,14 +108,14 @@ class AutofillSaveActivity : AppCompatActivity() {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
val repo = PasswordRepository.getRepositoryDirectory()
|
val repo = PasswordRepository.getRepositoryDirectory()
|
||||||
val saveIntent =
|
val saveIntent =
|
||||||
Intent(this, PasswordCreationActivityV2::class.java).apply {
|
Intent(this, PasswordCreationActivity::class.java).apply {
|
||||||
putExtras(
|
putExtras(
|
||||||
bundleOf(
|
bundleOf(
|
||||||
"REPO_PATH" to repo.absolutePath,
|
"REPO_PATH" to repo.absolutePath,
|
||||||
"FILE_PATH" to repo.resolve(intent.getStringExtra(EXTRA_FOLDER_NAME)!!).absolutePath,
|
"FILE_PATH" to repo.resolve(intent.getStringExtra(EXTRA_FOLDER_NAME)!!).absolutePath,
|
||||||
PasswordCreationActivityV2.EXTRA_FILE_NAME to intent.getStringExtra(EXTRA_NAME),
|
PasswordCreationActivity.EXTRA_FILE_NAME to intent.getStringExtra(EXTRA_NAME),
|
||||||
PasswordCreationActivityV2.EXTRA_PASSWORD to intent.getStringExtra(EXTRA_PASSWORD),
|
PasswordCreationActivity.EXTRA_PASSWORD to intent.getStringExtra(EXTRA_PASSWORD),
|
||||||
PasswordCreationActivityV2.EXTRA_GENERATE_PASSWORD to
|
PasswordCreationActivity.EXTRA_GENERATE_PASSWORD to
|
||||||
intent.getBooleanExtra(EXTRA_GENERATE_PASSWORD, false)
|
intent.getBooleanExtra(EXTRA_GENERATE_PASSWORD, false)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -38,12 +38,12 @@ import kotlinx.coroutines.withContext
|
||||||
|
|
||||||
@OptIn(ExperimentalTime::class)
|
@OptIn(ExperimentalTime::class)
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class DecryptActivityV2 : BasePgpActivity() {
|
class DecryptActivity : BasePgpActivity() {
|
||||||
|
|
||||||
private val binding by viewBinding(DecryptLayoutBinding::inflate)
|
private val binding by viewBinding(DecryptLayoutBinding::inflate)
|
||||||
|
private val relativeParentPath by unsafeLazy { getParentPath(fullPath, repoPath) }
|
||||||
@Inject lateinit var passwordEntryFactory: PasswordEntry.Factory
|
@Inject lateinit var passwordEntryFactory: PasswordEntry.Factory
|
||||||
@Inject lateinit var repository: CryptoRepository
|
@Inject lateinit var repository: CryptoRepository
|
||||||
private val relativeParentPath by unsafeLazy { getParentPath(fullPath, repoPath) }
|
|
||||||
|
|
||||||
private var passwordEntry: PasswordEntry? = null
|
private var passwordEntry: PasswordEntry? = null
|
||||||
private var retries = 0
|
private var retries = 0
|
||||||
|
@ -103,16 +103,13 @@ class DecryptActivityV2 : BasePgpActivity() {
|
||||||
* result triggers they can be repopulated with new data.
|
* result triggers they can be repopulated with new data.
|
||||||
*/
|
*/
|
||||||
private fun editPassword() {
|
private fun editPassword() {
|
||||||
val intent = Intent(this, PasswordCreationActivityV2::class.java)
|
val intent = Intent(this, PasswordCreationActivity::class.java)
|
||||||
intent.putExtra("FILE_PATH", relativeParentPath)
|
intent.putExtra("FILE_PATH", relativeParentPath)
|
||||||
intent.putExtra("REPO_PATH", repoPath)
|
intent.putExtra("REPO_PATH", repoPath)
|
||||||
intent.putExtra(PasswordCreationActivityV2.EXTRA_FILE_NAME, name)
|
intent.putExtra(PasswordCreationActivity.EXTRA_FILE_NAME, name)
|
||||||
intent.putExtra(PasswordCreationActivityV2.EXTRA_PASSWORD, passwordEntry?.password)
|
intent.putExtra(PasswordCreationActivity.EXTRA_PASSWORD, passwordEntry?.password)
|
||||||
intent.putExtra(
|
intent.putExtra(PasswordCreationActivity.EXTRA_EXTRA_CONTENT, passwordEntry?.extraContentString)
|
||||||
PasswordCreationActivityV2.EXTRA_EXTRA_CONTENT,
|
intent.putExtra(PasswordCreationActivity.EXTRA_EDITING, true)
|
||||||
passwordEntry?.extraContentString
|
|
||||||
)
|
|
||||||
intent.putExtra(PasswordCreationActivityV2.EXTRA_EDITING, true)
|
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
|
@ -65,7 +65,7 @@ import logcat.asLog
|
||||||
import logcat.logcat
|
import logcat.logcat
|
||||||
|
|
||||||
@AndroidEntryPoint
|
@AndroidEntryPoint
|
||||||
class PasswordCreationActivityV2 : BasePgpActivity() {
|
class PasswordCreationActivity : BasePgpActivity() {
|
||||||
|
|
||||||
private val binding by viewBinding(PasswordCreationActivityBinding::inflate)
|
private val binding by viewBinding(PasswordCreationActivityBinding::inflate)
|
||||||
@Inject lateinit var passwordEntryFactory: PasswordEntry.Factory
|
@Inject lateinit var passwordEntryFactory: PasswordEntry.Factory
|
||||||
|
@ -142,7 +142,7 @@ class PasswordCreationActivityV2 : BasePgpActivity() {
|
||||||
otpImportButton.setOnClickListener {
|
otpImportButton.setOnClickListener {
|
||||||
supportFragmentManager.setFragmentResultListener(
|
supportFragmentManager.setFragmentResultListener(
|
||||||
OTP_RESULT_REQUEST_KEY,
|
OTP_RESULT_REQUEST_KEY,
|
||||||
this@PasswordCreationActivityV2
|
this@PasswordCreationActivity
|
||||||
) { requestKey, bundle ->
|
) { requestKey, bundle ->
|
||||||
if (requestKey == OTP_RESULT_REQUEST_KEY) {
|
if (requestKey == OTP_RESULT_REQUEST_KEY) {
|
||||||
val contents = bundle.getString(RESULT)
|
val contents = bundle.getString(RESULT)
|
||||||
|
@ -160,12 +160,12 @@ class PasswordCreationActivityV2 : BasePgpActivity() {
|
||||||
getString(R.string.otp_import_from_file),
|
getString(R.string.otp_import_from_file),
|
||||||
getString(R.string.otp_import_manual_entry),
|
getString(R.string.otp_import_manual_entry),
|
||||||
)
|
)
|
||||||
MaterialAlertDialogBuilder(this@PasswordCreationActivityV2)
|
MaterialAlertDialogBuilder(this@PasswordCreationActivity)
|
||||||
.setItems(items) { _, index ->
|
.setItems(items) { _, index ->
|
||||||
when (index) {
|
when (index) {
|
||||||
0 ->
|
0 ->
|
||||||
otpImportAction.launch(
|
otpImportAction.launch(
|
||||||
IntentIntegrator(this@PasswordCreationActivityV2)
|
IntentIntegrator(this@PasswordCreationActivity)
|
||||||
.setOrientationLocked(false)
|
.setOrientationLocked(false)
|
||||||
.setBeepEnabled(false)
|
.setBeepEnabled(false)
|
||||||
.setDesiredBarcodeFormats(QR_CODE)
|
.setDesiredBarcodeFormats(QR_CODE)
|
||||||
|
@ -205,7 +205,7 @@ class PasswordCreationActivityV2 : BasePgpActivity() {
|
||||||
// FileBased.
|
// FileBased.
|
||||||
if (
|
if (
|
||||||
suggestedName == null &&
|
suggestedName == null &&
|
||||||
AutofillPreferences.directoryStructure(this@PasswordCreationActivityV2) ==
|
AutofillPreferences.directoryStructure(this@PasswordCreationActivity) ==
|
||||||
DirectoryStructure.FileBased
|
DirectoryStructure.FileBased
|
||||||
) {
|
) {
|
||||||
encryptUsername.apply {
|
encryptUsername.apply {
|
||||||
|
@ -415,7 +415,7 @@ class PasswordCreationActivityV2 : BasePgpActivity() {
|
||||||
val oldFile = File("$repoPath/${oldCategory?.trim('/')}/$oldFileName.gpg")
|
val oldFile = File("$repoPath/${oldCategory?.trim('/')}/$oldFileName.gpg")
|
||||||
if (oldFile.path != file.path && !oldFile.delete()) {
|
if (oldFile.path != file.path && !oldFile.delete()) {
|
||||||
setResult(RESULT_CANCELED)
|
setResult(RESULT_CANCELED)
|
||||||
MaterialAlertDialogBuilder(this@PasswordCreationActivityV2)
|
MaterialAlertDialogBuilder(this@PasswordCreationActivity)
|
||||||
.setTitle(R.string.password_creation_file_fail_title)
|
.setTitle(R.string.password_creation_file_fail_title)
|
||||||
.setMessage(
|
.setMessage(
|
||||||
getString(R.string.password_creation_file_delete_fail_message, oldFileName)
|
getString(R.string.password_creation_file_delete_fail_message, oldFileName)
|
||||||
|
@ -443,7 +443,7 @@ class PasswordCreationActivityV2 : BasePgpActivity() {
|
||||||
if (e is IOException) {
|
if (e is IOException) {
|
||||||
logcat(ERROR) { e.asLog("Failed to write password file") }
|
logcat(ERROR) { e.asLog("Failed to write password file") }
|
||||||
setResult(RESULT_CANCELED)
|
setResult(RESULT_CANCELED)
|
||||||
MaterialAlertDialogBuilder(this@PasswordCreationActivityV2)
|
MaterialAlertDialogBuilder(this@PasswordCreationActivity)
|
||||||
.setTitle(getString(R.string.password_creation_file_fail_title))
|
.setTitle(getString(R.string.password_creation_file_fail_title))
|
||||||
.setMessage(getString(R.string.password_creation_file_write_fail_message))
|
.setMessage(getString(R.string.password_creation_file_write_fail_message))
|
||||||
.setCancelable(false)
|
.setCancelable(false)
|
|
@ -19,7 +19,7 @@ import app.passwordstore.R
|
||||||
import app.passwordstore.databinding.FragmentPwgenDicewareBinding
|
import app.passwordstore.databinding.FragmentPwgenDicewareBinding
|
||||||
import app.passwordstore.injection.prefs.PasswordGeneratorPreferences
|
import app.passwordstore.injection.prefs.PasswordGeneratorPreferences
|
||||||
import app.passwordstore.passgen.diceware.DicewarePassphraseGenerator
|
import app.passwordstore.passgen.diceware.DicewarePassphraseGenerator
|
||||||
import app.passwordstore.ui.crypto.PasswordCreationActivityV2
|
import app.passwordstore.ui.crypto.PasswordCreationActivity
|
||||||
import app.passwordstore.util.extensions.getString
|
import app.passwordstore.util.extensions.getString
|
||||||
import app.passwordstore.util.settings.PreferenceKeys.DICEWARE_LENGTH
|
import app.passwordstore.util.settings.PreferenceKeys.DICEWARE_LENGTH
|
||||||
import app.passwordstore.util.settings.PreferenceKeys.DICEWARE_SEPARATOR
|
import app.passwordstore.util.settings.PreferenceKeys.DICEWARE_SEPARATOR
|
||||||
|
@ -58,8 +58,8 @@ class DicewarePasswordGeneratorDialogFragment : DialogFragment() {
|
||||||
setTitle(R.string.pwgen_title)
|
setTitle(R.string.pwgen_title)
|
||||||
setPositiveButton(R.string.dialog_ok) { _, _ ->
|
setPositiveButton(R.string.dialog_ok) { _, _ ->
|
||||||
setFragmentResult(
|
setFragmentResult(
|
||||||
PasswordCreationActivityV2.PASSWORD_RESULT_REQUEST_KEY,
|
PasswordCreationActivity.PASSWORD_RESULT_REQUEST_KEY,
|
||||||
bundleOf(PasswordCreationActivityV2.RESULT to "${binding.passwordText.text}")
|
bundleOf(PasswordCreationActivity.RESULT to "${binding.passwordText.text}")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
setNeutralButton(R.string.dialog_cancel) { _, _ -> }
|
setNeutralButton(R.string.dialog_cancel) { _, _ -> }
|
||||||
|
|
|
@ -13,7 +13,7 @@ import androidx.core.os.bundleOf
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import androidx.fragment.app.setFragmentResult
|
import androidx.fragment.app.setFragmentResult
|
||||||
import app.passwordstore.databinding.FragmentManualOtpEntryBinding
|
import app.passwordstore.databinding.FragmentManualOtpEntryBinding
|
||||||
import app.passwordstore.ui.crypto.PasswordCreationActivityV2
|
import app.passwordstore.ui.crypto.PasswordCreationActivity
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
|
|
||||||
class OtpImportDialogFragment : DialogFragment() {
|
class OtpImportDialogFragment : DialogFragment() {
|
||||||
|
@ -24,8 +24,8 @@ class OtpImportDialogFragment : DialogFragment() {
|
||||||
builder.setView(binding.root)
|
builder.setView(binding.root)
|
||||||
builder.setPositiveButton(android.R.string.ok) { _, _ ->
|
builder.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||||
setFragmentResult(
|
setFragmentResult(
|
||||||
PasswordCreationActivityV2.OTP_RESULT_REQUEST_KEY,
|
PasswordCreationActivity.OTP_RESULT_REQUEST_KEY,
|
||||||
bundleOf(PasswordCreationActivityV2.RESULT to getTOTPUri(binding))
|
bundleOf(PasswordCreationActivity.RESULT to getTOTPUri(binding))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
val dialog = builder.create()
|
val dialog = builder.create()
|
||||||
|
|
|
@ -26,7 +26,7 @@ import app.passwordstore.passgen.random.NoCharactersIncludedException
|
||||||
import app.passwordstore.passgen.random.PasswordGenerator
|
import app.passwordstore.passgen.random.PasswordGenerator
|
||||||
import app.passwordstore.passgen.random.PasswordLengthTooShortException
|
import app.passwordstore.passgen.random.PasswordLengthTooShortException
|
||||||
import app.passwordstore.passgen.random.PasswordOption
|
import app.passwordstore.passgen.random.PasswordOption
|
||||||
import app.passwordstore.ui.crypto.PasswordCreationActivityV2
|
import app.passwordstore.ui.crypto.PasswordCreationActivity
|
||||||
import app.passwordstore.util.settings.PreferenceKeys
|
import app.passwordstore.util.settings.PreferenceKeys
|
||||||
import com.github.michaelbull.result.getOrElse
|
import com.github.michaelbull.result.getOrElse
|
||||||
import com.github.michaelbull.result.runCatching
|
import com.github.michaelbull.result.runCatching
|
||||||
|
@ -72,8 +72,8 @@ class PasswordGeneratorDialogFragment : DialogFragment() {
|
||||||
setTitle(R.string.pwgen_title)
|
setTitle(R.string.pwgen_title)
|
||||||
setPositiveButton(R.string.dialog_ok) { _, _ ->
|
setPositiveButton(R.string.dialog_ok) { _, _ ->
|
||||||
setFragmentResult(
|
setFragmentResult(
|
||||||
PasswordCreationActivityV2.PASSWORD_RESULT_REQUEST_KEY,
|
PasswordCreationActivity.PASSWORD_RESULT_REQUEST_KEY,
|
||||||
bundleOf(PasswordCreationActivityV2.RESULT to "${binding.passwordText.text}")
|
bundleOf(PasswordCreationActivity.RESULT to "${binding.passwordText.text}")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
setNeutralButton(R.string.dialog_cancel) { _, _ -> }
|
setNeutralButton(R.string.dialog_cancel) { _, _ -> }
|
||||||
|
|
|
@ -11,7 +11,7 @@ import android.os.Looper
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.content.edit
|
import androidx.core.content.edit
|
||||||
import app.passwordstore.ui.crypto.BasePgpActivity
|
import app.passwordstore.ui.crypto.BasePgpActivity
|
||||||
import app.passwordstore.ui.crypto.DecryptActivityV2
|
import app.passwordstore.ui.crypto.DecryptActivity
|
||||||
import app.passwordstore.ui.passwords.PasswordStore
|
import app.passwordstore.ui.passwords.PasswordStore
|
||||||
import app.passwordstore.util.auth.BiometricAuthenticator
|
import app.passwordstore.util.auth.BiometricAuthenticator
|
||||||
import app.passwordstore.util.auth.BiometricAuthenticator.Result
|
import app.passwordstore.util.auth.BiometricAuthenticator.Result
|
||||||
|
@ -52,7 +52,7 @@ class LaunchActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getDecryptIntent(): Intent {
|
private fun getDecryptIntent(): Intent {
|
||||||
return Intent(this, DecryptActivityV2::class.java)
|
return Intent(this, DecryptActivity::class.java)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun startTargetActivity(noAuth: Boolean) {
|
private fun startTargetActivity(noAuth: Boolean) {
|
||||||
|
|
|
@ -29,8 +29,8 @@ import app.passwordstore.data.password.PasswordItem
|
||||||
import app.passwordstore.data.repo.PasswordRepository
|
import app.passwordstore.data.repo.PasswordRepository
|
||||||
import app.passwordstore.ui.crypto.BasePgpActivity
|
import app.passwordstore.ui.crypto.BasePgpActivity
|
||||||
import app.passwordstore.ui.crypto.BasePgpActivity.Companion.getLongName
|
import app.passwordstore.ui.crypto.BasePgpActivity.Companion.getLongName
|
||||||
import app.passwordstore.ui.crypto.DecryptActivityV2
|
import app.passwordstore.ui.crypto.DecryptActivity
|
||||||
import app.passwordstore.ui.crypto.PasswordCreationActivityV2
|
import app.passwordstore.ui.crypto.PasswordCreationActivity
|
||||||
import app.passwordstore.ui.dialogs.FolderCreationDialogFragment
|
import app.passwordstore.ui.dialogs.FolderCreationDialogFragment
|
||||||
import app.passwordstore.ui.folderselect.SelectFolderActivity
|
import app.passwordstore.ui.folderselect.SelectFolderActivity
|
||||||
import app.passwordstore.ui.git.base.BaseGitActivity
|
import app.passwordstore.ui.git.base.BaseGitActivity
|
||||||
|
@ -383,7 +383,7 @@ class PasswordStore : BaseGitActivity() {
|
||||||
val authDecryptIntent = item.createAuthEnabledIntent(this)
|
val authDecryptIntent = item.createAuthEnabledIntent(this)
|
||||||
val decryptIntent =
|
val decryptIntent =
|
||||||
(authDecryptIntent.clone() as Intent).setComponent(
|
(authDecryptIntent.clone() as Intent).setComponent(
|
||||||
ComponentName(this, DecryptActivityV2::class.java)
|
ComponentName(this, DecryptActivity::class.java)
|
||||||
)
|
)
|
||||||
|
|
||||||
startActivity(decryptIntent)
|
startActivity(decryptIntent)
|
||||||
|
@ -407,7 +407,7 @@ class PasswordStore : BaseGitActivity() {
|
||||||
if (!validateState()) return
|
if (!validateState()) return
|
||||||
val currentDir = currentDir
|
val currentDir = currentDir
|
||||||
logcat(INFO) { "Adding file to : ${currentDir.absolutePath}" }
|
logcat(INFO) { "Adding file to : ${currentDir.absolutePath}" }
|
||||||
val intent = Intent(this, PasswordCreationActivityV2::class.java)
|
val intent = Intent(this, PasswordCreationActivity::class.java)
|
||||||
intent.putExtra(BasePgpActivity.EXTRA_FILE_PATH, currentDir.absolutePath)
|
intent.putExtra(BasePgpActivity.EXTRA_FILE_PATH, currentDir.absolutePath)
|
||||||
intent.putExtra(
|
intent.putExtra(
|
||||||
BasePgpActivity.EXTRA_REPO_PATH,
|
BasePgpActivity.EXTRA_REPO_PATH,
|
||||||
|
|
|
@ -15,7 +15,7 @@ import android.view.inputmethod.InlineSuggestionsRequest
|
||||||
import android.widget.inline.InlinePresentationSpec
|
import android.widget.inline.InlinePresentationSpec
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import app.passwordstore.autofill.oreo.ui.AutofillSmsActivity
|
import app.passwordstore.autofill.oreo.ui.AutofillSmsActivity
|
||||||
import app.passwordstore.ui.autofill.AutofillDecryptActivityV2
|
import app.passwordstore.ui.autofill.AutofillDecryptActivity
|
||||||
import app.passwordstore.ui.autofill.AutofillFilterView
|
import app.passwordstore.ui.autofill.AutofillFilterView
|
||||||
import app.passwordstore.ui.autofill.AutofillPublisherChangedActivity
|
import app.passwordstore.ui.autofill.AutofillPublisherChangedActivity
|
||||||
import app.passwordstore.ui.autofill.AutofillSaveActivity
|
import app.passwordstore.ui.autofill.AutofillSaveActivity
|
||||||
|
@ -81,7 +81,7 @@ constructor(
|
||||||
): Dataset? {
|
): Dataset? {
|
||||||
if (!scenario.hasFieldsToFillOn(AutofillAction.Match)) return null
|
if (!scenario.hasFieldsToFillOn(AutofillAction.Match)) return null
|
||||||
val metadata = makeFillMatchMetadata(context, file)
|
val metadata = makeFillMatchMetadata(context, file)
|
||||||
val intentSender = AutofillDecryptActivityV2.makeDecryptFileIntentSender(file, context)
|
val intentSender = AutofillDecryptActivity.makeDecryptFileIntentSender(file, context)
|
||||||
return makeIntentDataset(context, AutofillAction.Match, intentSender, metadata, imeSpec)
|
return makeIntentDataset(context, AutofillAction.Match, intentSender, metadata, imeSpec)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import android.service.autofill.FillResponse
|
||||||
import android.service.autofill.SaveInfo
|
import android.service.autofill.SaveInfo
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import app.passwordstore.autofill.oreo.ui.AutofillSmsActivity
|
import app.passwordstore.autofill.oreo.ui.AutofillSmsActivity
|
||||||
import app.passwordstore.ui.autofill.AutofillDecryptActivityV2
|
import app.passwordstore.ui.autofill.AutofillDecryptActivity
|
||||||
import app.passwordstore.ui.autofill.AutofillFilterView
|
import app.passwordstore.ui.autofill.AutofillFilterView
|
||||||
import app.passwordstore.ui.autofill.AutofillPublisherChangedActivity
|
import app.passwordstore.ui.autofill.AutofillPublisherChangedActivity
|
||||||
import app.passwordstore.ui.autofill.AutofillSaveActivity
|
import app.passwordstore.ui.autofill.AutofillSaveActivity
|
||||||
|
@ -70,7 +70,7 @@ constructor(
|
||||||
private fun makeMatchDataset(context: Context, file: File): Dataset? {
|
private fun makeMatchDataset(context: Context, file: File): Dataset? {
|
||||||
if (!scenario.hasFieldsToFillOn(AutofillAction.Match)) return null
|
if (!scenario.hasFieldsToFillOn(AutofillAction.Match)) return null
|
||||||
val metadata = makeFillMatchMetadata(context, file)
|
val metadata = makeFillMatchMetadata(context, file)
|
||||||
val intentSender = AutofillDecryptActivityV2.makeDecryptFileIntentSender(file, context)
|
val intentSender = AutofillDecryptActivity.makeDecryptFileIntentSender(file, context)
|
||||||
return makeIntentDataset(context, AutofillAction.Match, intentSender, metadata)
|
return makeIntentDataset(context, AutofillAction.Match, intentSender, metadata)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="16dp"
|
android:paddingTop="16dp"
|
||||||
tools:context="app.passwordstore.ui.crypto.DecryptActivityV2">
|
tools:context="app.passwordstore.ui.crypto.DecryptActivity">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/password_category"
|
android:id="@+id/password_category"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="false"
|
android:fillViewport="false"
|
||||||
tools:context="app.passwordstore.ui.crypto.PasswordCreationActivityV2">
|
tools:context="app.passwordstore.ui.crypto.PasswordCreationActivity">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in a new issue