Refactor package structure (#1233)

* idea: default test runner to Gradle

* Kick off package structure revamp

* Reparent all classes under dev.msfjarvis.aps

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-12-05 06:07:18 +05:30 committed by GitHub
parent 8eb55f18a1
commit 5e66d99c85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 589 additions and 550 deletions

View file

@ -4,7 +4,7 @@
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="testRunner" value="PLATFORM" />
<option name="testRunner" value="GRADLE" />
<option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$USER_HOME$/.sdkman/candidates/gradle/current" />

View file

@ -3,11 +3,11 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.model
package dev.msfjarvis.aps.data.password
import com.github.michaelbull.result.get
import com.zeapo.pwdstore.utils.Otp
import com.zeapo.pwdstore.utils.UriTotpFinder
import dev.msfjarvis.aps.util.totp.Otp
import dev.msfjarvis.aps.util.totp.UriTotpFinder
import java.util.Date
import kotlin.test.assertEquals
import kotlin.test.assertFalse

View file

@ -5,15 +5,13 @@
@file:Suppress("DEPRECATION")
package com.zeapo.pwdstore
package dev.msfjarvis.aps.util.settings
import android.content.Context
import androidx.core.content.edit
import com.zeapo.pwdstore.git.config.AuthMode
import com.zeapo.pwdstore.git.config.Protocol
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.Application
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.util.totp
import kotlin.test.assertEquals
import org.junit.Test

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore
package dev.msfjarvis.aps.util.viewmodel
import kotlin.test.assertFalse
import kotlin.test.assertNull

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.autofill.oreo.ui
package dev.msfjarvis.aps.autofill.oreo.ui
import android.content.Context
import android.content.IntentSender

View file

@ -5,7 +5,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.zeapo.pwdstore"
package="dev.msfjarvis.aps"
android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET" />
@ -25,7 +25,7 @@
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".PasswordStore"
android:name=".ui.passwords.PasswordStore"
android:configChanges="orientation|screenSize"
android:label="@string/app_name" />
@ -37,7 +37,7 @@
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".LaunchActivity"
android:name=".ui.main.LaunchActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/NoBackgroundTheme">
@ -56,48 +56,48 @@
tools:node="replace" />
<activity
android:name=".git.GitServerConfigActivity"
android:name=".ui.git.config.GitServerConfigActivity"
android:label="@string/title_activity_git_clone"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".git.GitConfigActivity"
android:name=".ui.git.config.GitConfigActivity"
android:label="@string/title_activity_git_config"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".git.log.GitLogActivity"
android:name=".ui.git.log.GitLogActivity"
android:label="@string/title_activity_git_log" />
<activity
android:name=".UserPreference"
android:name=".ui.settings.UserPreference"
android:label="@string/action_settings"
android:parentActivityName=".PasswordStore" />
android:parentActivityName=".ui.passwords.PasswordStore" />
<activity
android:name=".crypto.PasswordCreationActivity"
android:name=".ui.crypto.PasswordCreationActivity"
android:label="@string/new_password_title"
android:parentActivityName=".PasswordStore"
android:parentActivityName=".ui.passwords.PasswordStore"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".crypto.DecryptActivity"
android:parentActivityName=".PasswordStore"
android:name=".ui.crypto.DecryptActivity"
android:parentActivityName=".ui.passwords.PasswordStore"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".crypto.GetKeyIdsActivity"
android:parentActivityName=".PasswordStore"
android:name=".ui.crypto.GetKeyIdsActivity"
android:parentActivityName=".ui.passwords.PasswordStore"
android:theme="@style/NoBackgroundTheme" />
<service
android:name=".ClipboardService"
android:name=".util.services.ClipboardService"
android:process=":clipboard_service_process" />
<service
android:name=".PasswordExportService"
android:name=".util.services.PasswordExportService"
android:process=":password_export_service_process" />
<service
android:name=".autofill.oreo.OreoAutofillService"
android:name=".util.services.OreoAutofillService"
android:permission="android.permission.BIND_AUTOFILL_SERVICE">
<intent-filter>
<action android:name="android.service.autofill.AutofillService" />
@ -107,21 +107,21 @@
android:resource="@xml/oreo_autofill_service" />
</service>
<activity android:name=".SelectFolderActivity" />
<activity android:name=".ui.folderselect.SelectFolderActivity" />
<activity
android:name=".sshkeygen.SshKeyGenActivity"
android:name=".ui.sshkeygen.SshKeyGenActivity"
android:label="@string/pref_ssh_keygen_title"
android:windowSoftInputMode="adjustResize" />
<activity
android:name=".autofill.oreo.ui.AutofillDecryptActivity"
android:name=".ui.autofill.AutofillDecryptActivity"
android:theme="@style/NoBackgroundTheme" />
<activity
android:name=".autofill.oreo.ui.AutofillFilterView"
android:name=".ui.autofill.AutofillFilterView"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/DialogLikeTheme"
android:windowSoftInputMode="adjustNothing" />
<activity
android:name=".autofill.oreo.ui.AutofillSaveActivity"
android:name=".ui.autofill.AutofillSaveActivity"
android:theme="@style/NoBackgroundTheme" />
<activity
android:name=".autofill.oreo.ui.AutofillSmsActivity"
@ -129,7 +129,7 @@
android:theme="@style/DialogLikeTheme"
android:windowSoftInputMode="adjustNothing" />
<activity
android:name=".autofill.oreo.ui.AutofillPublisherChangedActivity"
android:name=".ui.autofill.AutofillPublisherChangedActivity"
android:configChanges="orientation|keyboardHidden"
android:theme="@style/DialogLikeTheme"
android:windowSoftInputMode="adjustNothing" />

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore
package dev.msfjarvis.aps
import android.content.SharedPreferences
import androidx.appcompat.app.AppCompatDelegate
@ -12,11 +12,12 @@ import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_NO
import androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_YES
import com.github.ajalt.timberkt.Timber.DebugTree
import com.github.ajalt.timberkt.Timber.plant
import com.zeapo.pwdstore.git.sshj.setUpBouncyCastleForSshj
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.ProxyUtils
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.util.git.sshj.setUpBouncyCastleForSshj
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.proxy.ProxyUtils
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import dev.msfjarvis.aps.util.settings.runMigrations
@Suppress("Unused")
class Application : android.app.Application(), SharedPreferences.OnSharedPreferenceChangeListener {

View file

@ -2,12 +2,12 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.model
package dev.msfjarvis.aps.data.password
import com.github.michaelbull.result.get
import com.zeapo.pwdstore.utils.Otp
import com.zeapo.pwdstore.utils.TotpFinder
import com.zeapo.pwdstore.utils.UriTotpFinder
import dev.msfjarvis.aps.util.totp.Otp
import dev.msfjarvis.aps.util.totp.TotpFinder
import dev.msfjarvis.aps.util.totp.UriTotpFinder
import java.io.ByteArrayOutputStream
import java.io.UnsupportedEncodingException
import java.util.Date

View file

@ -2,9 +2,9 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.data.password
import com.zeapo.pwdstore.crypto.BasePgpActivity
import dev.msfjarvis.aps.ui.crypto.BasePgpActivity
import java.io.File
data class PasswordItem(

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.data.repo
import android.os.Build
import androidx.annotation.RequiresApi
@ -10,7 +10,12 @@ import androidx.core.content.edit
import com.github.michaelbull.result.getOrElse
import com.github.michaelbull.result.onFailure
import com.github.michaelbull.result.runCatching
import com.zeapo.pwdstore.Application
import dev.msfjarvis.aps.Application
import dev.msfjarvis.aps.data.password.PasswordItem
import dev.msfjarvis.aps.util.settings.PasswordSortOrder
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import java.io.File
import java.io.FileFilter
import java.nio.file.Files

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.ui.adapters
package dev.msfjarvis.aps.ui.adapters
import android.text.SpannableString
import android.text.style.RelativeSizeSpan
@ -13,10 +13,10 @@ import androidx.appcompat.widget.AppCompatTextView
import androidx.recyclerview.selection.ItemDetailsLookup
import androidx.recyclerview.selection.Selection
import androidx.recyclerview.widget.RecyclerView
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.SearchableRepositoryAdapter
import com.zeapo.pwdstore.stableId
import com.zeapo.pwdstore.utils.PasswordItem
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.data.password.PasswordItem
import dev.msfjarvis.aps.util.viewmodel.SearchableRepositoryAdapter
import dev.msfjarvis.aps.util.viewmodel.stableId
open class PasswordItemRecyclerAdapter :
SearchableRepositoryAdapter<PasswordItemRecyclerAdapter.PasswordItemViewHolder>(
@ -57,7 +57,8 @@ open class PasswordItemRecyclerAdapter :
name.text = spannable
if (item.type == PasswordItem.TYPE_CATEGORY) {
folderIndicator.visibility = View.VISIBLE
val count = item.file.listFiles { path -> path.isDirectory || path.extension == "gpg" }?.size ?: 0
val count = item.file.listFiles { path -> path.isDirectory || path.extension == "gpg" }?.size
?: 0
childCount.visibility = if (count > 0) View.VISIBLE else View.GONE
childCount.text = "$count"
} else {

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.autofill.oreo.ui
package dev.msfjarvis.aps.ui.autofill
import android.app.PendingIntent
import android.content.Context
@ -24,11 +24,11 @@ import com.github.michaelbull.result.onSuccess
import com.github.michaelbull.result.runCatching
import com.github.androidpasswordstore.autofillparser.AutofillAction
import com.github.androidpasswordstore.autofillparser.Credentials
import com.zeapo.pwdstore.autofill.oreo.AutofillPreferences
import com.zeapo.pwdstore.autofill.oreo.AutofillResponseBuilder
import com.zeapo.pwdstore.autofill.oreo.DirectoryStructure
import com.zeapo.pwdstore.model.PasswordEntry
import com.zeapo.pwdstore.utils.OPENPGP_PROVIDER
import dev.msfjarvis.aps.util.autofill.AutofillPreferences
import dev.msfjarvis.aps.util.autofill.AutofillResponseBuilder
import dev.msfjarvis.aps.util.autofill.DirectoryStructure
import dev.msfjarvis.aps.data.password.PasswordEntry
import dev.msfjarvis.aps.util.extensions.OPENPGP_PROVIDER
import java.io.ByteArrayOutputStream
import java.io.File
import java.io.InputStream
@ -53,9 +53,9 @@ class AutofillDecryptActivity : AppCompatActivity(), CoroutineScope {
companion object {
private const val EXTRA_FILE_PATH = "com.zeapo.pwdstore.autofill.oreo.EXTRA_FILE_PATH"
private const val EXTRA_FILE_PATH = "dev.msfjarvis.aps.autofill.oreo.EXTRA_FILE_PATH"
private const val EXTRA_SEARCH_ACTION =
"com.zeapo.pwdstore.autofill.oreo.EXTRA_SEARCH_ACTION"
"dev.msfjarvis.aps.autofill.oreo.EXTRA_SEARCH_ACTION"
private var decryptFileRequestCode = 1
@ -195,7 +195,7 @@ class AutofillDecryptActivity : AppCompatActivity(), CoroutineScope {
runCatching {
val entry = withContext(Dispatchers.IO) {
@Suppress("BlockingMethodInNonBlockingContext")
PasswordEntry(decryptedOutput)
(PasswordEntry(decryptedOutput))
}
AutofillPreferences.credentialsFromStoreEntry(this, file, entry, directoryStructure)
}.getOrElse { e ->

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.autofill.oreo.ui
package dev.msfjarvis.aps.ui.autofill
import android.annotation.TargetApi
import android.app.PendingIntent
@ -25,18 +25,18 @@ import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.LinearLayoutManager
import com.github.ajalt.timberkt.e
import com.github.androidpasswordstore.autofillparser.FormOrigin
import com.zeapo.pwdstore.FilterMode
import com.zeapo.pwdstore.ListMode
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.SearchMode
import com.zeapo.pwdstore.SearchableRepositoryAdapter
import com.zeapo.pwdstore.SearchableRepositoryViewModel
import com.zeapo.pwdstore.autofill.oreo.AutofillMatcher
import com.zeapo.pwdstore.autofill.oreo.AutofillPreferences
import com.zeapo.pwdstore.autofill.oreo.DirectoryStructure
import com.zeapo.pwdstore.databinding.ActivityOreoAutofillFilterBinding
import com.zeapo.pwdstore.utils.PasswordItem
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.autofill.AutofillMatcher
import dev.msfjarvis.aps.util.autofill.AutofillPreferences
import dev.msfjarvis.aps.util.autofill.DirectoryStructure
import dev.msfjarvis.aps.databinding.ActivityOreoAutofillFilterBinding
import dev.msfjarvis.aps.data.password.PasswordItem
import dev.msfjarvis.aps.util.extensions.viewBinding
import dev.msfjarvis.aps.util.viewmodel.FilterMode
import dev.msfjarvis.aps.util.viewmodel.ListMode
import dev.msfjarvis.aps.util.viewmodel.SearchMode
import dev.msfjarvis.aps.util.viewmodel.SearchableRepositoryAdapter
import dev.msfjarvis.aps.util.viewmodel.SearchableRepositoryViewModel
@TargetApi(Build.VERSION_CODES.O)
class AutofillFilterView : AppCompatActivity() {
@ -47,9 +47,9 @@ class AutofillFilterView : AppCompatActivity() {
private const val WIDTH_PERCENTAGE = 0.75
private const val EXTRA_FORM_ORIGIN_WEB =
"com.zeapo.pwdstore.autofill.oreo.ui.EXTRA_FORM_ORIGIN_WEB"
"dev.msfjarvis.aps.autofill.oreo.ui.EXTRA_FORM_ORIGIN_WEB"
private const val EXTRA_FORM_ORIGIN_APP =
"com.zeapo.pwdstore.autofill.oreo.ui.EXTRA_FORM_ORIGIN_APP"
"dev.msfjarvis.aps.autofill.oreo.ui.EXTRA_FORM_ORIGIN_APP"
private var matchAndDecryptFileRequestCode = 1
fun makeMatchAndDecryptFileIntentSender(

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.autofill.oreo.ui
package dev.msfjarvis.aps.ui.autofill
import android.annotation.TargetApi
import android.app.PendingIntent
@ -22,11 +22,11 @@ import com.github.androidpasswordstore.autofillparser.FormOrigin
import com.github.androidpasswordstore.autofillparser.computeCertificatesHash
import com.github.michaelbull.result.onFailure
import com.github.michaelbull.result.runCatching
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.autofill.oreo.AutofillMatcher
import com.zeapo.pwdstore.autofill.oreo.AutofillPublisherChangedException
import com.zeapo.pwdstore.databinding.ActivityOreoAutofillPublisherChangedBinding
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.autofill.AutofillMatcher
import dev.msfjarvis.aps.util.autofill.AutofillPublisherChangedException
import dev.msfjarvis.aps.databinding.ActivityOreoAutofillPublisherChangedBinding
import dev.msfjarvis.aps.util.extensions.viewBinding
@TargetApi(Build.VERSION_CODES.O)
class AutofillPublisherChangedActivity : AppCompatActivity() {
@ -34,9 +34,9 @@ class AutofillPublisherChangedActivity : AppCompatActivity() {
companion object {
private const val EXTRA_APP_PACKAGE =
"com.zeapo.pwdstore.autofill.oreo.ui.EXTRA_APP_PACKAGE"
"dev.msfjarvis.aps.autofill.oreo.ui.EXTRA_APP_PACKAGE"
private const val EXTRA_FILL_RESPONSE_AFTER_RESET =
"com.zeapo.pwdstore.autofill.oreo.ui.EXTRA_FILL_RESPONSE_AFTER_RESET"
"dev.msfjarvis.aps.autofill.oreo.ui.EXTRA_FILL_RESPONSE_AFTER_RESET"
private var publisherChangedRequestCode = 1
fun makePublisherChangedIntentSender(

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.autofill.oreo.ui
package dev.msfjarvis.aps.ui.autofill
import android.app.PendingIntent
import android.content.Context
@ -19,11 +19,11 @@ import com.github.ajalt.timberkt.e
import com.github.androidpasswordstore.autofillparser.AutofillAction
import com.github.androidpasswordstore.autofillparser.Credentials
import com.github.androidpasswordstore.autofillparser.FormOrigin
import com.zeapo.pwdstore.autofill.oreo.AutofillMatcher
import com.zeapo.pwdstore.autofill.oreo.AutofillPreferences
import com.zeapo.pwdstore.autofill.oreo.AutofillResponseBuilder
import com.zeapo.pwdstore.crypto.PasswordCreationActivity
import com.zeapo.pwdstore.utils.PasswordRepository
import dev.msfjarvis.aps.util.autofill.AutofillMatcher
import dev.msfjarvis.aps.util.autofill.AutofillPreferences
import dev.msfjarvis.aps.util.autofill.AutofillResponseBuilder
import dev.msfjarvis.aps.ui.crypto.PasswordCreationActivity
import dev.msfjarvis.aps.data.repo.PasswordRepository
import java.io.File
@RequiresApi(Build.VERSION_CODES.O)
@ -32,15 +32,15 @@ class AutofillSaveActivity : AppCompatActivity() {
companion object {
private const val EXTRA_FOLDER_NAME =
"com.zeapo.pwdstore.autofill.oreo.ui.EXTRA_FOLDER_NAME"
private const val EXTRA_PASSWORD = "com.zeapo.pwdstore.autofill.oreo.ui.EXTRA_PASSWORD"
private const val EXTRA_NAME = "com.zeapo.pwdstore.autofill.oreo.ui.EXTRA_NAME"
"dev.msfjarvis.aps.autofill.oreo.ui.EXTRA_FOLDER_NAME"
private const val EXTRA_PASSWORD = "dev.msfjarvis.aps.autofill.oreo.ui.EXTRA_PASSWORD"
private const val EXTRA_NAME = "dev.msfjarvis.aps.autofill.oreo.ui.EXTRA_NAME"
private const val EXTRA_SHOULD_MATCH_APP =
"com.zeapo.pwdstore.autofill.oreo.ui.EXTRA_SHOULD_MATCH_APP"
"dev.msfjarvis.aps.autofill.oreo.ui.EXTRA_SHOULD_MATCH_APP"
private const val EXTRA_SHOULD_MATCH_WEB =
"com.zeapo.pwdstore.autofill.oreo.ui.EXTRA_SHOULD_MATCH_WEB"
"dev.msfjarvis.aps.autofill.oreo.ui.EXTRA_SHOULD_MATCH_WEB"
private const val EXTRA_GENERATE_PASSWORD =
"com.zeapo.pwdstore.autofill.oreo.ui.EXTRA_GENERATE_PASSWORD"
"dev.msfjarvis.aps.autofill.oreo.ui.EXTRA_GENERATE_PASSWORD"
private var saveRequestCode = 1

View file

@ -2,12 +2,12 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.autofill.oreo.ui
package dev.msfjarvis.aps.ui.autofill
import android.view.View
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.zeapo.pwdstore.R
import dev.msfjarvis.aps.R
class PasswordViewHolder(view: View) : RecyclerView.ViewHolder(view) {

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.crypto
package dev.msfjarvis.aps.ui.crypto
import android.app.PendingIntent
import android.content.ClipData
@ -25,14 +25,14 @@ import com.github.michaelbull.result.getOr
import com.github.michaelbull.result.runCatching
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.Snackbar
import com.zeapo.pwdstore.ClipboardService
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.utils.OPENPGP_PROVIDER
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.clipboard
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.sharedPrefs
import com.zeapo.pwdstore.utils.snackbar
import dev.msfjarvis.aps.util.services.ClipboardService
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.extensions.OPENPGP_PROVIDER
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.clipboard
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import dev.msfjarvis.aps.util.extensions.snackbar
import java.io.File
import me.msfjarvis.openpgpktx.util.OpenPgpApi
import me.msfjarvis.openpgpktx.util.OpenPgpServiceConnection

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.crypto
package dev.msfjarvis.aps.ui.crypto
import android.content.Intent
import android.graphics.Typeface
@ -18,11 +18,11 @@ import androidx.lifecycle.lifecycleScope
import com.github.ajalt.timberkt.e
import com.github.michaelbull.result.onFailure
import com.github.michaelbull.result.runCatching
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.DecryptLayoutBinding
import com.zeapo.pwdstore.model.PasswordEntry
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.databinding.DecryptLayoutBinding
import dev.msfjarvis.aps.data.password.PasswordEntry
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.viewBinding
import java.io.ByteArrayOutputStream
import java.io.File
import kotlin.time.ExperimentalTime

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.crypto
package dev.msfjarvis.aps.ui.crypto
import android.content.Intent
import android.os.Bundle

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.crypto
package dev.msfjarvis.aps.ui.crypto
import android.content.Context
import android.content.Intent
@ -26,21 +26,21 @@ import com.github.michaelbull.result.runCatching
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.zxing.integration.android.IntentIntegrator
import com.google.zxing.integration.android.IntentIntegrator.QR_CODE
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.autofill.oreo.AutofillPreferences
import com.zeapo.pwdstore.autofill.oreo.DirectoryStructure
import com.zeapo.pwdstore.databinding.PasswordCreationActivityBinding
import com.zeapo.pwdstore.model.PasswordEntry
import com.zeapo.pwdstore.ui.dialogs.PasswordGeneratorDialogFragment
import com.zeapo.pwdstore.ui.dialogs.XkPasswordGeneratorDialogFragment
import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.base64
import com.zeapo.pwdstore.utils.commitChange
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.isInsideRepository
import com.zeapo.pwdstore.utils.snackbar
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.data.password.PasswordEntry
import dev.msfjarvis.aps.util.autofill.AutofillPreferences
import dev.msfjarvis.aps.util.autofill.DirectoryStructure
import dev.msfjarvis.aps.ui.dialogs.PasswordGeneratorDialogFragment
import dev.msfjarvis.aps.ui.dialogs.XkPasswordGeneratorDialogFragment
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.databinding.PasswordCreationActivityBinding
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.base64
import dev.msfjarvis.aps.util.extensions.commitChange
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.isInsideRepository
import dev.msfjarvis.aps.util.extensions.snackbar
import dev.msfjarvis.aps.util.extensions.viewBinding
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.File

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.ui.dialogs
package dev.msfjarvis.aps.ui.dialogs
import android.content.Context
import android.graphics.drawable.GradientDrawable
@ -18,10 +18,10 @@ import androidx.core.view.isVisible
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.BasicBottomSheetBinding
import com.zeapo.pwdstore.utils.resolveAttribute
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.databinding.BasicBottomSheetBinding
import dev.msfjarvis.aps.util.extensions.resolveAttribute
import dev.msfjarvis.aps.util.extensions.viewBinding
/**
* [BottomSheetDialogFragment] that exposes a simple [androidx.appcompat.app.AlertDialog] like

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.ui.dialogs
package dev.msfjarvis.aps.ui.dialogs
import android.app.Dialog
import android.content.Intent
@ -17,13 +17,13 @@ import com.google.android.material.checkbox.MaterialCheckBox
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputEditText
import com.google.android.material.textfield.TextInputLayout
import com.zeapo.pwdstore.PasswordStore
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.crypto.BasePgpActivity
import com.zeapo.pwdstore.crypto.GetKeyIdsActivity
import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.commitChange
import com.zeapo.pwdstore.utils.requestInputFocusOnView
import dev.msfjarvis.aps.ui.passwords.PasswordStore
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.ui.crypto.BasePgpActivity
import dev.msfjarvis.aps.ui.crypto.GetKeyIdsActivity
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.util.extensions.commitChange
import dev.msfjarvis.aps.util.extensions.requestInputFocusOnView
import java.io.File
import kotlinx.coroutines.launch
import me.msfjarvis.openpgpktx.util.OpenPgpApi

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.ui.dialogs
package dev.msfjarvis.aps.ui.dialogs
import android.graphics.drawable.GradientDrawable
import android.os.Bundle
@ -16,12 +16,12 @@ import androidx.fragment.app.setFragmentResult
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.zeapo.pwdstore.PasswordFragment.Companion.ACTION_FOLDER
import com.zeapo.pwdstore.PasswordFragment.Companion.ACTION_KEY
import com.zeapo.pwdstore.PasswordFragment.Companion.ACTION_PASSWORD
import com.zeapo.pwdstore.PasswordFragment.Companion.ITEM_CREATION_REQUEST_KEY
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.utils.resolveAttribute
import dev.msfjarvis.aps.ui.passwords.PasswordFragment.Companion.ACTION_FOLDER
import dev.msfjarvis.aps.ui.passwords.PasswordFragment.Companion.ACTION_KEY
import dev.msfjarvis.aps.ui.passwords.PasswordFragment.Companion.ACTION_PASSWORD
import dev.msfjarvis.aps.ui.passwords.PasswordFragment.Companion.ITEM_CREATION_REQUEST_KEY
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.extensions.resolveAttribute
class ItemCreationBottomSheet : BottomSheetDialogFragment() {

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.ui.dialogs
package dev.msfjarvis.aps.ui.dialogs
import android.annotation.SuppressLint
import android.app.AlertDialog
@ -20,12 +20,12 @@ import androidx.fragment.app.DialogFragment
import com.github.michaelbull.result.getOrElse
import com.github.michaelbull.result.runCatching
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.pwgen.PasswordGenerator
import com.zeapo.pwdstore.pwgen.PasswordGenerator.generate
import com.zeapo.pwdstore.pwgen.PasswordGenerator.setPrefs
import com.zeapo.pwdstore.pwgen.PasswordOption
import com.zeapo.pwdstore.utils.PreferenceKeys
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.pwgen.PasswordGenerator
import dev.msfjarvis.aps.util.pwgen.PasswordGenerator.generate
import dev.msfjarvis.aps.util.pwgen.PasswordGenerator.setPrefs
import dev.msfjarvis.aps.util.pwgen.PasswordOption
import dev.msfjarvis.aps.util.settings.PreferenceKeys
class PasswordGeneratorDialogFragment : DialogFragment() {

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.ui.dialogs
package dev.msfjarvis.aps.ui.dialogs
import android.app.Dialog
import android.content.Context
@ -20,11 +20,11 @@ import com.github.michaelbull.result.fold
import com.github.michaelbull.result.getOr
import com.github.michaelbull.result.runCatching
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.FragmentXkpwgenBinding
import com.zeapo.pwdstore.pwgenxkpwd.CapsType
import com.zeapo.pwdstore.pwgenxkpwd.PasswordBuilder
import com.zeapo.pwdstore.utils.getString
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.databinding.FragmentXkpwgenBinding
import dev.msfjarvis.aps.util.pwgenxkpwd.CapsType
import dev.msfjarvis.aps.util.pwgenxkpwd.PasswordBuilder
import dev.msfjarvis.aps.util.extensions.getString
/** A placeholder fragment containing a simple view. */
class XkPasswordGeneratorDialogFragment : DialogFragment() {

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore
package dev.msfjarvis.aps.ui.folderselect
import android.os.Bundle
import android.view.Menu
@ -10,7 +10,10 @@ import android.view.MenuItem
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.commit
import com.zeapo.pwdstore.utils.PasswordRepository
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.ui.passwords.PASSWORD_FRAGMENT_TAG
import dev.msfjarvis.aps.ui.passwords.PasswordStore
class SelectFolderActivity : AppCompatActivity(R.layout.select_folder_layout) {

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore
package dev.msfjarvis.aps.ui.folderselect
import android.content.Context
import android.os.Bundle
@ -13,10 +13,14 @@ import androidx.fragment.app.activityViewModels
import androidx.recyclerview.widget.LinearLayoutManager
import com.github.michaelbull.result.onFailure
import com.github.michaelbull.result.runCatching
import com.zeapo.pwdstore.databinding.PasswordRecyclerViewBinding
import com.zeapo.pwdstore.ui.adapters.PasswordItemRecyclerAdapter
import com.zeapo.pwdstore.utils.PasswordItem
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.util.viewmodel.ListMode
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.viewmodel.SearchableRepositoryViewModel
import dev.msfjarvis.aps.databinding.PasswordRecyclerViewBinding
import dev.msfjarvis.aps.ui.adapters.PasswordItemRecyclerAdapter
import dev.msfjarvis.aps.data.password.PasswordItem
import dev.msfjarvis.aps.ui.passwords.PasswordStore
import dev.msfjarvis.aps.util.extensions.viewBinding
import java.io.File
import me.zhanghai.android.fastscroll.FastScrollerBuilder

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git
package dev.msfjarvis.aps.ui.git.base
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.edit
@ -12,18 +12,19 @@ import com.github.michaelbull.result.Result
import com.github.michaelbull.result.andThen
import com.github.michaelbull.result.mapError
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.git.config.GitSettings
import com.zeapo.pwdstore.git.operation.BreakOutOfDetached
import com.zeapo.pwdstore.git.operation.CloneOperation
import com.zeapo.pwdstore.git.operation.PullOperation
import com.zeapo.pwdstore.git.operation.PushOperation
import com.zeapo.pwdstore.git.operation.ResetToRemoteOperation
import com.zeapo.pwdstore.git.operation.SyncOperation
import com.zeapo.pwdstore.git.sshj.ContinuationContainerActivity
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.getEncryptedGitPrefs
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.settings.GitSettings
import dev.msfjarvis.aps.util.git.operation.BreakOutOfDetached
import dev.msfjarvis.aps.util.git.operation.CloneOperation
import dev.msfjarvis.aps.util.git.operation.PullOperation
import dev.msfjarvis.aps.util.git.operation.PushOperation
import dev.msfjarvis.aps.util.git.operation.ResetToRemoteOperation
import dev.msfjarvis.aps.util.git.operation.SyncOperation
import dev.msfjarvis.aps.util.git.sshj.ContinuationContainerActivity
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.getEncryptedGitPrefs
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import dev.msfjarvis.aps.util.git.ErrorMessages
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import net.schmizz.sshj.common.DisconnectReason
@ -40,6 +41,7 @@ abstract class BaseGitActivity : ContinuationContainerActivity() {
* Enum of possible Git operations than can be run through [launchGitOperation].
*/
enum class GitOp {
BREAK_OUT_OF_DETACHED,
CLONE,
PULL,

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git
package dev.msfjarvis.aps.ui.git.config
import android.content.Intent
import android.os.Bundle
@ -19,12 +19,13 @@ import com.github.michaelbull.result.onFailure
import com.github.michaelbull.result.runCatching
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.Snackbar
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.ActivityGitConfigBinding
import com.zeapo.pwdstore.git.config.GitSettings
import com.zeapo.pwdstore.git.log.GitLogActivity
import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.databinding.ActivityGitConfigBinding
import dev.msfjarvis.aps.util.settings.GitSettings
import dev.msfjarvis.aps.ui.git.log.GitLogActivity
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.ui.git.base.BaseGitActivity
import dev.msfjarvis.aps.util.extensions.viewBinding
import kotlinx.coroutines.launch
import org.eclipse.jgit.lib.Constants
import org.eclipse.jgit.lib.Repository
@ -93,36 +94,36 @@ class GitConfigActivity : BaseGitActivity() {
binding.gitAbortRebase.setOnClickListener {
lifecycleScope.launch {
launchGitOperation(GitOp.BREAK_OUT_OF_DETACHED).fold(
success = {
MaterialAlertDialogBuilder(this@GitConfigActivity).run {
setTitle(resources.getString(R.string.git_abort_and_push_title))
setMessage(resources.getString(
R.string.git_break_out_of_detached_success,
GitSettings.branch,
"conflicting-${GitSettings.branch}-...",
))
setOnDismissListener() { finish() }
setPositiveButton(resources.getString(R.string.dialog_ok)) { _, _ -> }
show()
}
},
failure = { err ->
promptOnErrorHandler(err) {
finish()
}
},
success = {
MaterialAlertDialogBuilder(this@GitConfigActivity).run {
setTitle(resources.getString(R.string.git_abort_and_push_title))
setMessage(resources.getString(
R.string.git_break_out_of_detached_success,
GitSettings.branch,
"conflicting-${GitSettings.branch}-...",
))
setOnDismissListener { finish() }
setPositiveButton(resources.getString(R.string.dialog_ok)) { _, _ -> }
show()
}
},
failure = { err ->
promptOnErrorHandler(err) {
finish()
}
},
)
}
}
binding.gitResetToRemote.setOnClickListener {
lifecycleScope.launch {
launchGitOperation(GitOp.RESET).fold(
success = ::finishOnSuccessHandler,
failure = { err ->
promptOnErrorHandler(err) {
finish()
}
},
success = ::finishOnSuccessHandler,
failure = { err ->
promptOnErrorHandler(err) {
finish()
}
},
)
}
}

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git
package dev.msfjarvis.aps.ui.git.config
import android.content.Context
import android.content.Intent
@ -21,15 +21,16 @@ import com.github.michaelbull.result.onFailure
import com.github.michaelbull.result.runCatching
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.Snackbar
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.ActivityGitCloneBinding
import com.zeapo.pwdstore.git.config.AuthMode
import com.zeapo.pwdstore.git.config.GitSettings
import com.zeapo.pwdstore.git.config.Protocol
import com.zeapo.pwdstore.ui.dialogs.BasicBottomSheet
import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.snackbar
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.databinding.ActivityGitCloneBinding
import dev.msfjarvis.aps.util.settings.AuthMode
import dev.msfjarvis.aps.util.settings.GitSettings
import dev.msfjarvis.aps.util.settings.Protocol
import dev.msfjarvis.aps.ui.dialogs.BasicBottomSheet
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.ui.git.base.BaseGitActivity
import dev.msfjarvis.aps.util.extensions.snackbar
import dev.msfjarvis.aps.util.extensions.viewBinding
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@ -254,6 +255,7 @@ class GitServerConfigActivity : BaseGitActivity() {
}
companion object {
private val PORT_REGEX = ":[0-9]{1,5}/".toRegex()
fun createCloneIntent(context: Context): Intent {

View file

@ -3,15 +3,15 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.log
package dev.msfjarvis.aps.ui.git.log
import android.os.Bundle
import android.view.MenuItem
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import com.zeapo.pwdstore.databinding.ActivityGitLogBinding
import com.zeapo.pwdstore.git.BaseGitActivity
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.databinding.ActivityGitLogBinding
import dev.msfjarvis.aps.ui.git.base.BaseGitActivity
import dev.msfjarvis.aps.util.extensions.viewBinding
/**
* Displays the repository's git commits in git-log fashion.

View file

@ -3,13 +3,15 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.log
package dev.msfjarvis.aps.ui.git.log
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.github.ajalt.timberkt.e
import com.zeapo.pwdstore.databinding.GitLogRowLayoutBinding
import dev.msfjarvis.aps.databinding.GitLogRowLayoutBinding
import dev.msfjarvis.aps.util.git.GitCommit
import dev.msfjarvis.aps.util.git.GitLogModel
import java.text.DateFormat
import java.util.Date

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore
package dev.msfjarvis.aps.ui.main
import android.content.Intent
import android.os.Bundle
@ -10,10 +10,11 @@ import android.os.Handler
import android.os.Looper
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.edit
import com.zeapo.pwdstore.crypto.DecryptActivity
import com.zeapo.pwdstore.utils.BiometricAuthenticator
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.ui.crypto.DecryptActivity
import dev.msfjarvis.aps.ui.passwords.PasswordStore
import dev.msfjarvis.aps.util.auth.BiometricAuthenticator
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.sharedPrefs
class LaunchActivity : AppCompatActivity() {

View file

@ -3,11 +3,11 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.ui.onboarding.activity
package dev.msfjarvis.aps.ui.onboarding.activity
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.zeapo.pwdstore.R
import dev.msfjarvis.aps.R
class OnboardingActivity : AppCompatActivity(R.layout.activity_onboarding) {

View file

@ -4,7 +4,7 @@
*
*/
package com.zeapo.pwdstore.ui.onboarding.fragments
package dev.msfjarvis.aps.ui.onboarding.fragments
import android.os.Bundle
import android.view.View
@ -12,14 +12,14 @@ import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.edit
import androidx.fragment.app.Fragment
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.FragmentCloneBinding
import com.zeapo.pwdstore.git.GitServerConfigActivity
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.finish
import com.zeapo.pwdstore.utils.performTransactionWithBackStack
import com.zeapo.pwdstore.utils.sharedPrefs
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.databinding.FragmentCloneBinding
import dev.msfjarvis.aps.ui.git.config.GitServerConfigActivity
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.finish
import dev.msfjarvis.aps.util.extensions.performTransactionWithBackStack
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import dev.msfjarvis.aps.util.extensions.viewBinding
class CloneFragment : Fragment(R.layout.fragment_clone) {

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.ui.onboarding.fragments
package dev.msfjarvis.aps.ui.onboarding.fragments
import android.content.Intent
import android.os.Bundle
@ -13,15 +13,15 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.edit
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.crypto.GetKeyIdsActivity
import com.zeapo.pwdstore.databinding.FragmentKeySelectionBinding
import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.commitChange
import com.zeapo.pwdstore.utils.finish
import com.zeapo.pwdstore.utils.sharedPrefs
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.ui.crypto.GetKeyIdsActivity
import dev.msfjarvis.aps.databinding.FragmentKeySelectionBinding
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.commitChange
import dev.msfjarvis.aps.util.extensions.finish
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import dev.msfjarvis.aps.util.extensions.viewBinding
import java.io.File
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

View file

@ -4,7 +4,7 @@
*
*/
package com.zeapo.pwdstore.ui.onboarding.fragments
package dev.msfjarvis.aps.ui.onboarding.fragments
import android.Manifest
import android.os.Bundle
@ -18,19 +18,19 @@ import com.github.ajalt.timberkt.e
import com.github.michaelbull.result.onFailure
import com.github.michaelbull.result.runCatching
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.UserPreference
import com.zeapo.pwdstore.databinding.FragmentRepoLocationBinding
import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.PasswordSortOrder
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.finish
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.isPermissionGranted
import com.zeapo.pwdstore.utils.listFilesRecursively
import com.zeapo.pwdstore.utils.performTransactionWithBackStack
import com.zeapo.pwdstore.utils.sharedPrefs
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.ui.settings.UserPreference
import dev.msfjarvis.aps.databinding.FragmentRepoLocationBinding
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.util.settings.PasswordSortOrder
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.finish
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.isPermissionGranted
import dev.msfjarvis.aps.util.extensions.listFilesRecursively
import dev.msfjarvis.aps.util.extensions.performTransactionWithBackStack
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import dev.msfjarvis.aps.util.extensions.viewBinding
import java.io.File
class RepoLocationFragment : Fragment(R.layout.fragment_repo_location) {

View file

@ -3,18 +3,18 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.ui.onboarding.fragments
package dev.msfjarvis.aps.ui.onboarding.fragments
import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.annotation.Keep
import androidx.fragment.app.Fragment
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.UserPreference
import com.zeapo.pwdstore.databinding.FragmentWelcomeBinding
import com.zeapo.pwdstore.utils.performTransactionWithBackStack
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.ui.settings.UserPreference
import dev.msfjarvis.aps.databinding.FragmentWelcomeBinding
import dev.msfjarvis.aps.util.extensions.performTransactionWithBackStack
import dev.msfjarvis.aps.util.extensions.viewBinding
@Keep
@Suppress("unused")

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore
package dev.msfjarvis.aps.ui.passwords
import android.content.Context
import android.content.SharedPreferences
@ -24,23 +24,25 @@ import androidx.recyclerview.widget.LinearLayoutManager
import com.github.michaelbull.result.fold
import com.github.michaelbull.result.runCatching
import com.github.michaelbull.result.onFailure
import com.zeapo.pwdstore.databinding.PasswordRecyclerViewBinding
import com.zeapo.pwdstore.git.BaseGitActivity
import com.zeapo.pwdstore.git.GitServerConfigActivity
import com.zeapo.pwdstore.git.config.AuthMode
import com.zeapo.pwdstore.git.config.GitSettings
import com.zeapo.pwdstore.ui.OnOffItemAnimator
import com.zeapo.pwdstore.ui.adapters.PasswordItemRecyclerAdapter
import com.zeapo.pwdstore.ui.dialogs.BasicBottomSheet
import com.zeapo.pwdstore.ui.dialogs.ItemCreationBottomSheet
import com.zeapo.pwdstore.utils.PasswordItem
import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.PasswordSortOrder
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.base64
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.sharedPrefs
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.viewmodel.SearchableRepositoryViewModel
import dev.msfjarvis.aps.databinding.PasswordRecyclerViewBinding
import dev.msfjarvis.aps.ui.git.base.BaseGitActivity
import dev.msfjarvis.aps.ui.git.config.GitServerConfigActivity
import dev.msfjarvis.aps.util.settings.AuthMode
import dev.msfjarvis.aps.util.settings.GitSettings
import dev.msfjarvis.aps.ui.util.OnOffItemAnimator
import dev.msfjarvis.aps.ui.adapters.PasswordItemRecyclerAdapter
import dev.msfjarvis.aps.ui.dialogs.BasicBottomSheet
import dev.msfjarvis.aps.ui.dialogs.ItemCreationBottomSheet
import dev.msfjarvis.aps.data.password.PasswordItem
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.util.settings.PasswordSortOrder
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.base64
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import dev.msfjarvis.aps.util.extensions.viewBinding
import java.io.File
import kotlinx.coroutines.launch
import me.zhanghai.android.fastscroll.FastScrollerBuilder

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore
package dev.msfjarvis.aps.ui.passwords
import android.Manifest
import android.annotation.SuppressLint
@ -38,28 +38,33 @@ import com.github.michaelbull.result.onFailure
import com.github.michaelbull.result.runCatching
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputEditText
import com.zeapo.pwdstore.autofill.oreo.AutofillMatcher
import com.zeapo.pwdstore.crypto.BasePgpActivity.Companion.getLongName
import com.zeapo.pwdstore.crypto.DecryptActivity
import com.zeapo.pwdstore.crypto.PasswordCreationActivity
import com.zeapo.pwdstore.git.BaseGitActivity
import com.zeapo.pwdstore.git.config.AuthMode
import com.zeapo.pwdstore.git.config.GitSettings
import com.zeapo.pwdstore.ui.dialogs.BasicBottomSheet
import com.zeapo.pwdstore.ui.dialogs.FolderCreationDialogFragment
import com.zeapo.pwdstore.ui.onboarding.activity.OnboardingActivity
import com.zeapo.pwdstore.utils.PasswordItem
import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.base64
import com.zeapo.pwdstore.utils.commitChange
import com.zeapo.pwdstore.utils.contains
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.isInsideRepository
import com.zeapo.pwdstore.utils.isPermissionGranted
import com.zeapo.pwdstore.utils.listFilesRecursively
import com.zeapo.pwdstore.utils.requestInputFocusOnView
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.ui.main.LaunchActivity
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.viewmodel.SearchableRepositoryViewModel
import dev.msfjarvis.aps.ui.folderselect.SelectFolderActivity
import dev.msfjarvis.aps.ui.settings.UserPreference
import dev.msfjarvis.aps.util.autofill.AutofillMatcher
import dev.msfjarvis.aps.ui.crypto.BasePgpActivity.Companion.getLongName
import dev.msfjarvis.aps.ui.crypto.DecryptActivity
import dev.msfjarvis.aps.ui.crypto.PasswordCreationActivity
import dev.msfjarvis.aps.ui.git.base.BaseGitActivity
import dev.msfjarvis.aps.util.settings.AuthMode
import dev.msfjarvis.aps.util.settings.GitSettings
import dev.msfjarvis.aps.ui.dialogs.BasicBottomSheet
import dev.msfjarvis.aps.ui.dialogs.FolderCreationDialogFragment
import dev.msfjarvis.aps.ui.onboarding.activity.OnboardingActivity
import dev.msfjarvis.aps.data.password.PasswordItem
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.base64
import dev.msfjarvis.aps.util.extensions.commitChange
import dev.msfjarvis.aps.util.extensions.contains
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.isInsideRepository
import dev.msfjarvis.aps.util.extensions.isPermissionGranted
import dev.msfjarvis.aps.util.extensions.listFilesRecursively
import dev.msfjarvis.aps.util.extensions.requestInputFocusOnView
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import java.io.File
import java.lang.Character.UnicodeBlock
import kotlinx.coroutines.Dispatchers

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.ui.proxy
package dev.msfjarvis.aps.ui.proxy
import android.os.Bundle
import android.os.Handler
@ -13,14 +13,14 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.edit
import androidx.core.os.postDelayed
import androidx.core.widget.doOnTextChanged
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.ActivityProxySelectorBinding
import com.zeapo.pwdstore.git.config.GitSettings
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.ProxyUtils
import com.zeapo.pwdstore.utils.getEncryptedProxyPrefs
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.databinding.ActivityProxySelectorBinding
import dev.msfjarvis.aps.util.settings.GitSettings
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.proxy.ProxyUtils
import dev.msfjarvis.aps.util.extensions.getEncryptedProxyPrefs
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.viewBinding
private val IP_ADDRESS_REGEX = Patterns.IP_ADDRESS.toRegex()
private val WEB_ADDRESS_REGEX = Patterns.WEB_URL.toRegex()

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore
package dev.msfjarvis.aps.ui.settings
import android.annotation.SuppressLint
import android.content.Context
@ -41,21 +41,24 @@ import com.github.michaelbull.result.getOr
import com.github.michaelbull.result.onFailure
import com.github.michaelbull.result.runCatching
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.crypto.BasePgpActivity
import com.zeapo.pwdstore.git.GitConfigActivity
import com.zeapo.pwdstore.git.GitServerConfigActivity
import com.zeapo.pwdstore.git.sshj.SshKey
import com.zeapo.pwdstore.pwgenxkpwd.XkpwdDictionary
import com.zeapo.pwdstore.sshkeygen.ShowSshKeyFragment
import com.zeapo.pwdstore.sshkeygen.SshKeyGenActivity
import com.zeapo.pwdstore.ui.proxy.ProxySelectorActivity
import com.zeapo.pwdstore.utils.BiometricAuthenticator
import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.autofillManager
import com.zeapo.pwdstore.utils.getEncryptedGitPrefs
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.BuildConfig
import dev.msfjarvis.aps.util.services.PasswordExportService
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.ui.crypto.BasePgpActivity
import dev.msfjarvis.aps.ui.git.config.GitConfigActivity
import dev.msfjarvis.aps.ui.git.config.GitServerConfigActivity
import dev.msfjarvis.aps.util.git.sshj.SshKey
import dev.msfjarvis.aps.util.pwgenxkpwd.XkpwdDictionary
import dev.msfjarvis.aps.ui.sshkeygen.ShowSshKeyFragment
import dev.msfjarvis.aps.ui.sshkeygen.SshKeyGenActivity
import dev.msfjarvis.aps.ui.proxy.ProxySelectorActivity
import dev.msfjarvis.aps.util.auth.BiometricAuthenticator
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.autofillManager
import dev.msfjarvis.aps.util.extensions.getEncryptedGitPrefs
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import java.io.File
typealias ClickListener = Preference.OnPreferenceClickListener

View file

@ -2,15 +2,15 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.sshkeygen
package dev.msfjarvis.aps.ui.sshkeygen
import android.app.Dialog
import android.content.Intent
import android.os.Bundle
import androidx.fragment.app.DialogFragment
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.git.sshj.SshKey
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.git.sshj.SshKey
class ShowSshKeyFragment : DialogFragment() {

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.sshkeygen
package dev.msfjarvis.aps.ui.sshkeygen
import android.os.Bundle
import android.security.keystore.UserNotAuthenticatedException
@ -16,13 +16,13 @@ import androidx.lifecycle.lifecycleScope
import com.github.michaelbull.result.fold
import com.github.michaelbull.result.runCatching
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.databinding.ActivitySshKeygenBinding
import com.zeapo.pwdstore.git.sshj.SshKey
import com.zeapo.pwdstore.utils.BiometricAuthenticator
import com.zeapo.pwdstore.utils.getEncryptedGitPrefs
import com.zeapo.pwdstore.utils.keyguardManager
import com.zeapo.pwdstore.utils.viewBinding
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.databinding.ActivitySshKeygenBinding
import dev.msfjarvis.aps.util.git.sshj.SshKey
import dev.msfjarvis.aps.util.auth.BiometricAuthenticator
import dev.msfjarvis.aps.util.extensions.getEncryptedGitPrefs
import dev.msfjarvis.aps.util.extensions.keyguardManager
import dev.msfjarvis.aps.util.extensions.viewBinding
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
import kotlinx.coroutines.Dispatchers

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.ui
package dev.msfjarvis.aps.ui.util
import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.RecyclerView

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.util.auth
import android.app.KeyguardManager
import androidx.annotation.StringRes
@ -14,7 +14,7 @@ import androidx.core.content.getSystemService
import androidx.fragment.app.FragmentActivity
import com.github.ajalt.timberkt.Timber.tag
import com.github.ajalt.timberkt.d
import com.zeapo.pwdstore.R
import dev.msfjarvis.aps.R
object BiometricAuthenticator {

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.autofill.oreo
package dev.msfjarvis.aps.util.autofill
import android.content.Context
import android.content.IntentSender
@ -20,11 +20,11 @@ import com.github.androidpasswordstore.autofillparser.AutofillAction
import com.github.androidpasswordstore.autofillparser.FillableForm
import com.github.androidpasswordstore.autofillparser.fillWith
import com.github.michaelbull.result.fold
import com.zeapo.pwdstore.autofill.oreo.ui.AutofillDecryptActivity
import com.zeapo.pwdstore.autofill.oreo.ui.AutofillFilterView
import com.zeapo.pwdstore.autofill.oreo.ui.AutofillPublisherChangedActivity
import com.zeapo.pwdstore.autofill.oreo.ui.AutofillSaveActivity
import com.zeapo.pwdstore.autofill.oreo.ui.AutofillSmsActivity
import dev.msfjarvis.aps.ui.autofill.AutofillDecryptActivity
import dev.msfjarvis.aps.ui.autofill.AutofillFilterView
import dev.msfjarvis.aps.ui.autofill.AutofillPublisherChangedActivity
import dev.msfjarvis.aps.ui.autofill.AutofillSaveActivity
import dev.msfjarvis.aps.autofill.oreo.ui.AutofillSmsActivity
import java.io.File
/**

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.autofill.oreo
package dev.msfjarvis.aps.util.autofill
import android.content.Context
import android.content.SharedPreferences
@ -16,7 +16,7 @@ import com.github.michaelbull.result.Ok
import com.github.michaelbull.result.Result
import com.github.androidpasswordstore.autofillparser.FormOrigin
import com.github.androidpasswordstore.autofillparser.computeCertificatesHash
import com.zeapo.pwdstore.R
import dev.msfjarvis.aps.R
import java.io.File
private const val PREFERENCES_AUTOFILL_APP_MATCHES = "oreo_autofill_app_matches"

View file

@ -2,14 +2,15 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.autofill.oreo
package dev.msfjarvis.aps.util.autofill
import android.content.Context
import android.os.Build
import androidx.annotation.RequiresApi
import com.github.androidpasswordstore.autofillparser.Credentials
import com.zeapo.pwdstore.model.PasswordEntry
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.data.password.PasswordEntry
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import dev.msfjarvis.aps.util.services.getDefaultUsername
import java.io.File
import java.nio.file.Paths

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.autofill.oreo
package dev.msfjarvis.aps.util.autofill
import android.content.Context
import android.content.IntentSender
@ -20,15 +20,16 @@ import com.github.androidpasswordstore.autofillparser.Credentials
import com.github.androidpasswordstore.autofillparser.FillableForm
import com.github.androidpasswordstore.autofillparser.fillWith
import com.github.michaelbull.result.fold
import com.zeapo.pwdstore.autofill.oreo.ui.AutofillDecryptActivity
import com.zeapo.pwdstore.autofill.oreo.ui.AutofillFilterView
import com.zeapo.pwdstore.autofill.oreo.ui.AutofillPublisherChangedActivity
import com.zeapo.pwdstore.autofill.oreo.ui.AutofillSaveActivity
import com.zeapo.pwdstore.autofill.oreo.ui.AutofillSmsActivity
import dev.msfjarvis.aps.ui.autofill.AutofillDecryptActivity
import dev.msfjarvis.aps.ui.autofill.AutofillFilterView
import dev.msfjarvis.aps.ui.autofill.AutofillPublisherChangedActivity
import dev.msfjarvis.aps.ui.autofill.AutofillSaveActivity
import dev.msfjarvis.aps.autofill.oreo.ui.AutofillSmsActivity
import java.io.File
@RequiresApi(Build.VERSION_CODES.O)
class AutofillResponseBuilder(form: FillableForm) {
private val formOrigin = form.formOrigin
private val scenario = form.scenario
private val ignoredIds = form.ignoredIds
@ -175,6 +176,7 @@ class AutofillResponseBuilder(form: FillableForm) {
}
companion object {
fun makeFillInDataset(
context: Context,
credentials: Credentials,

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.autofill.oreo
package dev.msfjarvis.aps.util.autofill
import android.annotation.SuppressLint
import android.app.PendingIntent
@ -18,9 +18,9 @@ import android.widget.inline.InlinePresentationSpec
import androidx.annotation.DrawableRes
import androidx.autofill.inline.UiVersions
import androidx.autofill.inline.v1.InlineSuggestionUi
import com.zeapo.pwdstore.PasswordStore
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.utils.PasswordRepository
import dev.msfjarvis.aps.ui.passwords.PasswordStore
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.data.repo.PasswordRepository
import java.io.File
data class DatasetMetadata(val title: String, val subtitle: String?, @DrawableRes val iconRes: Int)

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.util.extensions
import android.app.KeyguardManager
import android.content.ClipboardManager
@ -29,8 +29,9 @@ import com.github.ajalt.timberkt.d
import com.github.michaelbull.result.Ok
import com.github.michaelbull.result.Result
import com.google.android.material.snackbar.Snackbar
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.git.operation.GitOperation
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.util.git.operation.GitOperation
/**
* Extension function for [AlertDialog] that requests focus for the

View file

@ -2,10 +2,11 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.util.extensions
import com.github.michaelbull.result.getOrElse
import com.github.michaelbull.result.runCatching
import dev.msfjarvis.aps.data.repo.PasswordRepository
import java.io.File
import java.util.Date
import org.eclipse.jgit.lib.ObjectId

View file

@ -1,10 +1,10 @@
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.util.extensions
import androidx.annotation.IdRes
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.commit
import com.zeapo.pwdstore.R
import dev.msfjarvis.aps.R
/**
* Check if [permission] is granted to the app. Aliases to [isPermissionGranted] internally.

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.util.extensions
import android.view.LayoutInflater

View file

@ -3,12 +3,12 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git
package dev.msfjarvis.aps.util.git
import android.os.RemoteException
import androidx.annotation.StringRes
import com.zeapo.pwdstore.Application
import com.zeapo.pwdstore.R
import dev.msfjarvis.aps.Application
import dev.msfjarvis.aps.R
import java.net.UnknownHostException
/**

View file

@ -3,19 +3,19 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git
package dev.msfjarvis.aps.util.git
import android.widget.Toast
import androidx.fragment.app.FragmentActivity
import com.github.michaelbull.result.Result
import com.github.michaelbull.result.runCatching
import com.google.android.material.snackbar.Snackbar
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.git.GitException.PullException
import com.zeapo.pwdstore.git.GitException.PushException
import com.zeapo.pwdstore.git.config.GitSettings
import com.zeapo.pwdstore.git.operation.GitOperation
import com.zeapo.pwdstore.utils.snackbar
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.git.GitException.PullException
import dev.msfjarvis.aps.util.git.GitException.PushException
import dev.msfjarvis.aps.util.settings.GitSettings
import dev.msfjarvis.aps.util.git.operation.GitOperation
import dev.msfjarvis.aps.util.extensions.snackbar
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.eclipse.jgit.api.CommitCommand

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.log
package dev.msfjarvis.aps.util.git
import java.util.Date

View file

@ -3,14 +3,14 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.log
package dev.msfjarvis.aps.util.git
import com.github.ajalt.timberkt.e
import com.github.michaelbull.result.getOrElse
import com.github.michaelbull.result.runCatching
import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.hash
import com.zeapo.pwdstore.utils.time
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.util.extensions.hash
import dev.msfjarvis.aps.util.extensions.time
import org.eclipse.jgit.api.Git
import org.eclipse.jgit.revwalk.RevCommit

View file

@ -2,11 +2,11 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.operation
package dev.msfjarvis.aps.util.git.operation
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.git.sshj.ContinuationContainerActivity
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.git.sshj.ContinuationContainerActivity
import org.eclipse.jgit.api.RebaseCommand
class BreakOutOfDetached(callingActivity: ContinuationContainerActivity) : GitOperation(callingActivity) {

View file

@ -2,9 +2,9 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.operation
package dev.msfjarvis.aps.util.git.operation
import com.zeapo.pwdstore.git.sshj.ContinuationContainerActivity
import dev.msfjarvis.aps.util.git.sshj.ContinuationContainerActivity
import org.eclipse.jgit.api.Git
import org.eclipse.jgit.api.GitCommand

View file

@ -1,4 +1,4 @@
package com.zeapo.pwdstore.git.operation
package dev.msfjarvis.aps.util.git.operation
import android.annotation.SuppressLint
import android.view.LayoutInflater
@ -10,12 +10,12 @@ import com.google.android.material.checkbox.MaterialCheckBox
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.textfield.TextInputEditText
import com.google.android.material.textfield.TextInputLayout
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.git.config.AuthMode
import com.zeapo.pwdstore.git.sshj.InteractivePasswordFinder
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.getEncryptedGitPrefs
import com.zeapo.pwdstore.utils.requestInputFocusOnView
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.settings.AuthMode
import dev.msfjarvis.aps.util.git.sshj.InteractivePasswordFinder
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.getEncryptedGitPrefs
import dev.msfjarvis.aps.util.extensions.requestInputFocusOnView
import kotlin.coroutines.Continuation
import kotlin.coroutines.resume

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.operation
package dev.msfjarvis.aps.util.git.operation
import android.content.Intent
import android.widget.Toast
@ -14,17 +14,17 @@ import com.github.michaelbull.result.Result
import com.github.michaelbull.result.onFailure
import com.github.michaelbull.result.runCatching
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.UserPreference
import com.zeapo.pwdstore.git.GitCommandExecutor
import com.zeapo.pwdstore.git.config.AuthMode
import com.zeapo.pwdstore.git.config.GitSettings
import com.zeapo.pwdstore.git.sshj.ContinuationContainerActivity
import com.zeapo.pwdstore.git.sshj.SshAuthMethod
import com.zeapo.pwdstore.git.sshj.SshKey
import com.zeapo.pwdstore.git.sshj.SshjSessionFactory
import com.zeapo.pwdstore.utils.BiometricAuthenticator
import com.zeapo.pwdstore.utils.PasswordRepository
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.ui.settings.UserPreference
import dev.msfjarvis.aps.util.git.GitCommandExecutor
import dev.msfjarvis.aps.util.settings.AuthMode
import dev.msfjarvis.aps.util.settings.GitSettings
import dev.msfjarvis.aps.util.git.sshj.ContinuationContainerActivity
import dev.msfjarvis.aps.util.git.sshj.SshAuthMethod
import dev.msfjarvis.aps.util.git.sshj.SshKey
import dev.msfjarvis.aps.util.git.sshj.SshjSessionFactory
import dev.msfjarvis.aps.util.auth.BiometricAuthenticator
import dev.msfjarvis.aps.data.repo.PasswordRepository
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
import kotlinx.coroutines.Dispatchers

View file

@ -2,9 +2,9 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.operation
package dev.msfjarvis.aps.util.git.operation
import com.zeapo.pwdstore.git.sshj.ContinuationContainerActivity
import dev.msfjarvis.aps.util.git.sshj.ContinuationContainerActivity
import org.eclipse.jgit.api.GitCommand
class PullOperation(callingActivity: ContinuationContainerActivity) : GitOperation(callingActivity) {

View file

@ -2,9 +2,9 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.operation
package dev.msfjarvis.aps.util.git.operation
import com.zeapo.pwdstore.git.sshj.ContinuationContainerActivity
import dev.msfjarvis.aps.util.git.sshj.ContinuationContainerActivity
import org.eclipse.jgit.api.GitCommand
class PushOperation(callingActivity: ContinuationContainerActivity) : GitOperation(callingActivity) {

View file

@ -2,9 +2,9 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.operation
package dev.msfjarvis.aps.util.git.operation
import com.zeapo.pwdstore.git.sshj.ContinuationContainerActivity
import dev.msfjarvis.aps.util.git.sshj.ContinuationContainerActivity
import org.eclipse.jgit.api.ResetCommand
class ResetToRemoteOperation(callingActivity: ContinuationContainerActivity) : GitOperation(callingActivity) {

View file

@ -2,9 +2,9 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.operation
package dev.msfjarvis.aps.util.git.operation
import com.zeapo.pwdstore.git.sshj.ContinuationContainerActivity
import dev.msfjarvis.aps.util.git.sshj.ContinuationContainerActivity
class SyncOperation(callingActivity: ContinuationContainerActivity) : GitOperation(callingActivity) {

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.sshj
package dev.msfjarvis.aps.util.git.sshj
import android.content.Intent
import androidx.activity.result.contract.ActivityResultContracts

View file

@ -2,16 +2,16 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.sshj
package dev.msfjarvis.aps.util.git.sshj
import android.app.PendingIntent
import android.content.Intent
import androidx.activity.result.IntentSenderRequest
import androidx.core.content.edit
import com.github.ajalt.timberkt.d
import com.zeapo.pwdstore.utils.OPENPGP_PROVIDER
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.util.extensions.OPENPGP_PROVIDER
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import java.io.Closeable
import java.security.PublicKey
import kotlin.coroutines.resume

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.sshj
package dev.msfjarvis.aps.util.git.sshj
import com.hierynomus.sshj.key.KeyAlgorithm
import java.io.ByteArrayOutputStream

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.sshj
package dev.msfjarvis.aps.util.git.sshj
import android.content.Context
import android.content.pm.PackageManager
@ -20,12 +20,12 @@ import com.github.ajalt.timberkt.d
import com.github.ajalt.timberkt.e
import com.github.michaelbull.result.getOrElse
import com.github.michaelbull.result.runCatching
import com.zeapo.pwdstore.Application
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.getEncryptedGitPrefs
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.Application
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.getEncryptedGitPrefs
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import java.io.File
import java.io.IOException
import java.security.KeyFactory

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.sshj
package dev.msfjarvis.aps.util.git.sshj
import com.github.ajalt.timberkt.Timber
import com.github.ajalt.timberkt.d
@ -21,7 +21,6 @@ import net.schmizz.sshj.transport.compression.NoneCompression
import net.schmizz.sshj.transport.kex.Curve25519SHA256
import net.schmizz.sshj.transport.kex.Curve25519SHA256.FactoryLibSsh
import net.schmizz.sshj.transport.kex.DHGexSHA256
import net.schmizz.sshj.transport.kex.ECDHNistP
import net.schmizz.sshj.transport.random.JCERandom
import net.schmizz.sshj.transport.random.SingletonRandomFactory
import net.schmizz.sshj.userauth.keyprovider.OpenSSHKeyFile

View file

@ -2,15 +2,15 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.sshj
package dev.msfjarvis.aps.util.git.sshj
import android.util.Base64
import com.github.ajalt.timberkt.d
import com.github.ajalt.timberkt.w
import com.github.michaelbull.result.getOrElse
import com.github.michaelbull.result.runCatching
import com.zeapo.pwdstore.git.config.AuthMode
import com.zeapo.pwdstore.git.operation.CredentialFinder
import dev.msfjarvis.aps.util.settings.AuthMode
import dev.msfjarvis.aps.util.git.operation.CredentialFinder
import java.io.File
import java.io.IOException
import java.io.InputStream
@ -70,10 +70,11 @@ class SshjSessionFactory(private val authMethod: SshAuthMethod, private val host
private var currentSession: SshjSession? = null
override fun getSession(uri: URIish, credentialsProvider: CredentialsProvider?, fs: FS?, tms: Int): RemoteSession {
return currentSession ?: SshjSession(uri, uri.user, authMethod, hostKeyFile).connect().also {
d { "New SSH connection created" }
currentSession = it
}
return currentSession
?: SshjSession(uri, uri.user, authMethod, hostKeyFile).connect().also {
d { "New SSH connection created" }
currentSession = it
}
}
fun close() {

View file

@ -3,9 +3,9 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.util.proxy
import com.zeapo.pwdstore.git.config.GitSettings
import dev.msfjarvis.aps.util.settings.GitSettings
import java.io.IOException
import java.net.Authenticator
import java.net.InetSocketAddress

View file

@ -2,14 +2,14 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.pwgen
package dev.msfjarvis.aps.util.pwgen
import android.content.Context
import androidx.core.content.edit
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.clearFlag
import com.zeapo.pwdstore.utils.hasFlag
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.clearFlag
import dev.msfjarvis.aps.util.extensions.hasFlag
enum class PasswordOption(val key: String) {
NoDigits("0"),

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.pwgen
package dev.msfjarvis.aps.util.pwgen
import java.security.SecureRandom

View file

@ -2,9 +2,9 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.pwgen
package dev.msfjarvis.aps.util.pwgen
import com.zeapo.pwdstore.utils.hasFlag
import dev.msfjarvis.aps.util.extensions.hasFlag
object RandomPasswordGenerator {

View file

@ -2,9 +2,9 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.pwgen
package dev.msfjarvis.aps.util.pwgen
import com.zeapo.pwdstore.utils.hasFlag
import dev.msfjarvis.aps.util.extensions.hasFlag
import java.util.Locale
object RandomPhonemesGenerator {

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.pwgenxkpwd
package dev.msfjarvis.aps.util.pwgenxkpwd
enum class CapsType {
lowercase, UPPERCASE, TitleCase, Sentence, As_iS

View file

@ -2,16 +2,16 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.pwgenxkpwd
package dev.msfjarvis.aps.util.pwgenxkpwd
import android.content.Context
import com.github.michaelbull.result.Result
import com.github.michaelbull.result.runCatching
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.pwgen.PasswordGenerator.PasswordGeneratorException
import com.zeapo.pwdstore.pwgen.secureRandomCharacter
import com.zeapo.pwdstore.pwgen.secureRandomElement
import com.zeapo.pwdstore.pwgen.secureRandomNumber
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.pwgen.PasswordGenerator.PasswordGeneratorException
import dev.msfjarvis.aps.util.pwgen.secureRandomCharacter
import dev.msfjarvis.aps.util.pwgen.secureRandomElement
import dev.msfjarvis.aps.util.pwgen.secureRandomNumber
import java.util.Locale
class PasswordBuilder(ctx: Context) {

View file

@ -2,13 +2,13 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.pwgenxkpwd
package dev.msfjarvis.aps.util.pwgenxkpwd
import android.content.Context
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import java.io.File
class XkpwdDictionary(context: Context) {

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore
package dev.msfjarvis.aps.util.services
import android.app.Notification
import android.app.NotificationChannel
@ -17,9 +17,10 @@ import androidx.annotation.RequiresApi
import androidx.core.app.NotificationCompat
import androidx.core.content.getSystemService
import com.github.ajalt.timberkt.d
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.clipboard
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.clipboard
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.Job

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.autofill.oreo
package dev.msfjarvis.aps.util.services
import android.content.Context
import android.os.Build
@ -25,13 +25,15 @@ import com.github.androidpasswordstore.autofillparser.cachePublicSuffixList
import com.github.androidpasswordstore.autofillparser.passwordValue
import com.github.androidpasswordstore.autofillparser.recoverNodes
import com.github.androidpasswordstore.autofillparser.usernameValue
import com.zeapo.pwdstore.BuildConfig
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.autofill.oreo.ui.AutofillSaveActivity
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.hasFlag
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.BuildConfig
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.ui.autofill.AutofillSaveActivity
import dev.msfjarvis.aps.util.autofill.Api30AutofillResponseBuilder
import dev.msfjarvis.aps.util.autofill.AutofillResponseBuilder
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.hasFlag
import dev.msfjarvis.aps.util.extensions.sharedPrefs
@RequiresApi(Build.VERSION_CODES.O)
class OreoAutofillService : AutofillService() {
@ -106,11 +108,12 @@ class OreoAutofillService : AutofillService() {
callback.onFailure(getString(R.string.oreo_autofill_save_internal_error))
return
}
val scenario = AutofillScenario.fromClientState(clientState)?.recoverNodes(structure) ?: run {
e { "Failed to recover client state or nodes from client state" }
callback.onFailure(getString(R.string.oreo_autofill_save_internal_error))
return
}
val scenario = AutofillScenario.fromClientState(clientState)?.recoverNodes(structure)
?: run {
e { "Failed to recover client state or nodes from client state" }
callback.onFailure(getString(R.string.oreo_autofill_save_internal_error))
return
}
val formOrigin = FormOrigin.fromBundle(clientState) ?: run {
e { "Failed to recover form origin from client state" }
callback.onFailure(getString(R.string.oreo_autofill_save_internal_error))

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore
package dev.msfjarvis.aps.util.services
import android.app.NotificationChannel
import android.app.NotificationManager
@ -16,7 +16,8 @@ import androidx.core.app.NotificationCompat
import androidx.core.content.getSystemService
import androidx.documentfile.provider.DocumentFile
import com.github.ajalt.timberkt.d
import com.zeapo.pwdstore.utils.PasswordRepository
import dev.msfjarvis.aps.R
import dev.msfjarvis.aps.data.repo.PasswordRepository
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.util.Calendar

View file

@ -2,18 +2,17 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.git.config
package dev.msfjarvis.aps.util.settings
import androidx.core.content.edit
import com.github.michaelbull.result.getOrElse
import com.github.michaelbull.result.runCatching
import com.zeapo.pwdstore.Application
import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.getEncryptedGitPrefs
import com.zeapo.pwdstore.utils.getEncryptedProxyPrefs
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.Application
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.util.extensions.getEncryptedGitPrefs
import dev.msfjarvis.aps.util.extensions.getEncryptedProxyPrefs
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import java.io.File
import org.eclipse.jgit.transport.URIish

View file

@ -4,7 +4,7 @@
*/
@file:Suppress("DEPRECATION")
package com.zeapo.pwdstore
package dev.msfjarvis.aps.util.settings
import android.content.Context
import android.content.SharedPreferences
@ -13,12 +13,9 @@ import com.github.ajalt.timberkt.e
import com.github.ajalt.timberkt.i
import com.github.michaelbull.result.get
import com.github.michaelbull.result.runCatching
import com.zeapo.pwdstore.git.config.GitSettings
import com.zeapo.pwdstore.git.config.Protocol
import com.zeapo.pwdstore.git.sshj.SshKey
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.getString
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.util.git.sshj.SshKey
import dev.msfjarvis.aps.util.extensions.getString
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import java.io.File
import java.net.URI

View file

@ -3,11 +3,14 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.util.settings
import android.content.Context
import android.content.SharedPreferences
import com.zeapo.pwdstore.Application
import dev.msfjarvis.aps.Application
import dev.msfjarvis.aps.data.password.PasswordItem
import dev.msfjarvis.aps.util.extensions.base64
import dev.msfjarvis.aps.util.extensions.getString
enum class PasswordSortOrder(val comparator: java.util.Comparator<PasswordItem>) {

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.util.settings
object PreferenceKeys {

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.util.totp
import com.github.michaelbull.result.Err
import com.github.michaelbull.result.runCatching

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.util.totp
/**
* Defines a class that can extract relevant parts of a TOTP URL for use by the app.

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore.utils
package dev.msfjarvis.aps.util.totp
import android.net.Uri

View file

@ -2,7 +2,7 @@
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
* SPDX-License-Identifier: GPL-3.0-only
*/
package com.zeapo.pwdstore
package dev.msfjarvis.aps.util.viewmodel
import android.app.Application
import android.os.Parcelable
@ -24,13 +24,13 @@ import androidx.recyclerview.selection.StorageStrategy
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.ListAdapter
import androidx.recyclerview.widget.RecyclerView
import com.zeapo.pwdstore.autofill.oreo.AutofillPreferences
import com.zeapo.pwdstore.autofill.oreo.DirectoryStructure
import com.zeapo.pwdstore.utils.PasswordItem
import com.zeapo.pwdstore.utils.PasswordRepository
import com.zeapo.pwdstore.utils.PasswordSortOrder
import com.zeapo.pwdstore.utils.PreferenceKeys
import com.zeapo.pwdstore.utils.sharedPrefs
import dev.msfjarvis.aps.util.autofill.AutofillPreferences
import dev.msfjarvis.aps.util.autofill.DirectoryStructure
import dev.msfjarvis.aps.data.password.PasswordItem
import dev.msfjarvis.aps.data.repo.PasswordRepository
import dev.msfjarvis.aps.util.settings.PasswordSortOrder
import dev.msfjarvis.aps.util.settings.PreferenceKeys
import dev.msfjarvis.aps.util.extensions.sharedPrefs
import java.io.File
import java.text.Collator
import java.util.Locale

View file

@ -11,7 +11,7 @@
android:background="?android:attr/windowBackground"
android:padding="@dimen/activity_horizontal_margin"
tools:background="@color/white"
tools:context="com.zeapo.pwdstore.git.GitServerConfigActivity">
tools:context="dev.msfjarvis.aps.git.GitServerConfigActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"

View file

@ -9,7 +9,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="@dimen/activity_horizontal_margin"
tools:context="com.zeapo.pwdstore.git.GitConfigActivity"
tools:context="dev.msfjarvis.aps.git.GitConfigActivity"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="81dp">

View file

@ -16,7 +16,7 @@
android:orientation="vertical"
android:scrollbars="vertical"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:context="com.zeapo.pwdstore.git.log.GitLogActivity"
tools:context=".ui.git.log.GitLogActivity"
tools:listitem="@layout/git_log_row_layout" />
</LinearLayout>

View file

@ -6,7 +6,7 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fragment_first_run"
android:name="com.zeapo.pwdstore.ui.onboarding.fragments.WelcomeFragment"
android:name="dev.msfjarvis.aps.ui.onboarding.fragments.WelcomeFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:tag="welcome_fragment" />

View file

@ -9,7 +9,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="2dp"
tools:context="com.zeapo.pwdstore.autofill.oreo.ui.AutofillFilterView">
tools:context="dev.msfjarvis.aps.ui.autofill.AutofillFilterView">
<ImageView
android:id="@+id/cover"

View file

@ -12,7 +12,7 @@
android:elevation="2dp"
android:paddingBottom="16dp"
android:scrollbars="vertical"
tools:context="com.zeapo.pwdstore.autofill.oreo.ui.AutofillPublisherChangedActivity">
tools:context="dev.msfjarvis.aps.ui.autofill.AutofillPublisherChangedActivity">
<ImageView
android:id="@+id/cover"

View file

@ -9,7 +9,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.zeapo.pwdstore.crypto.DecryptActivity">
tools:context=".ui.crypto.DecryptActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="fill_parent"

Some files were not shown because too many files have changed in this diff Show more