mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-04-05 05:47:36 +03:00
fix: Resolve dependencies and small changes
This commit is contained in:
parent
d5310e5c58
commit
65d7fdbf7e
65 changed files with 254 additions and 252 deletions
|
@ -41,8 +41,8 @@ import com.kunzisoft.keepass.database.helper.SearchHelper
|
||||||
import com.kunzisoft.keepass.model.RegisterInfo
|
import com.kunzisoft.keepass.model.RegisterInfo
|
||||||
import com.kunzisoft.keepass.model.SearchInfo
|
import com.kunzisoft.keepass.model.SearchInfo
|
||||||
import com.kunzisoft.keepass.settings.PreferencesUtil
|
import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
import com.kunzisoft.keepass.utils.WebDomain
|
import com.kunzisoft.keepass.utils.WebDomain
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||||
|
|
|
@ -67,7 +67,7 @@ import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||||
import com.kunzisoft.keepass.tasks.ActionRunnable
|
import com.kunzisoft.keepass.tasks.ActionRunnable
|
||||||
import com.kunzisoft.keepass.tasks.AttachmentFileBinderManager
|
import com.kunzisoft.keepass.tasks.AttachmentFileBinderManager
|
||||||
import com.kunzisoft.keepass.timeout.TimeoutHelper
|
import com.kunzisoft.keepass.timeout.TimeoutHelper
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.openUrl
|
import com.kunzisoft.keepass.utils.UriUtil.openUrl
|
||||||
import com.kunzisoft.keepass.utils.UuidUtil
|
import com.kunzisoft.keepass.utils.UuidUtil
|
||||||
import com.kunzisoft.keepass.view.changeControlColor
|
import com.kunzisoft.keepass.view.changeControlColor
|
||||||
|
|
|
@ -90,7 +90,7 @@ import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||||
import com.kunzisoft.keepass.tasks.ActionRunnable
|
import com.kunzisoft.keepass.tasks.ActionRunnable
|
||||||
import com.kunzisoft.keepass.tasks.AttachmentFileBinderManager
|
import com.kunzisoft.keepass.tasks.AttachmentFileBinderManager
|
||||||
import com.kunzisoft.keepass.timeout.TimeoutHelper
|
import com.kunzisoft.keepass.timeout.TimeoutHelper
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.getDocumentFile
|
import com.kunzisoft.keepass.utils.UriUtil.getDocumentFile
|
||||||
import com.kunzisoft.keepass.view.ToolbarAction
|
import com.kunzisoft.keepass.view.ToolbarAction
|
||||||
import com.kunzisoft.keepass.view.asError
|
import com.kunzisoft.keepass.view.asError
|
||||||
|
|
|
@ -31,7 +31,7 @@ import com.kunzisoft.keepass.database.helper.SearchHelper
|
||||||
import com.kunzisoft.keepass.magikeyboard.MagikeyboardService
|
import com.kunzisoft.keepass.magikeyboard.MagikeyboardService
|
||||||
import com.kunzisoft.keepass.model.SearchInfo
|
import com.kunzisoft.keepass.model.SearchInfo
|
||||||
import com.kunzisoft.keepass.otp.OtpEntryFields
|
import com.kunzisoft.keepass.otp.OtpEntryFields
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.WebDomain
|
import com.kunzisoft.keepass.utils.WebDomain
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -68,7 +68,7 @@ import com.kunzisoft.keepass.tasks.ActionRunnable
|
||||||
import com.kunzisoft.keepass.utils.DexUtil
|
import com.kunzisoft.keepass.utils.DexUtil
|
||||||
import com.kunzisoft.keepass.utils.MagikeyboardUtil
|
import com.kunzisoft.keepass.utils.MagikeyboardUtil
|
||||||
import com.kunzisoft.keepass.utils.MenuUtil
|
import com.kunzisoft.keepass.utils.MenuUtil
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.UriHelper.parseUri
|
import com.kunzisoft.keepass.utils.UriHelper.parseUri
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.isContributingUser
|
import com.kunzisoft.keepass.utils.UriUtil.isContributingUser
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.openUrl
|
import com.kunzisoft.keepass.utils.UriUtil.openUrl
|
||||||
|
|
|
@ -100,11 +100,11 @@ import com.kunzisoft.keepass.settings.SettingsActivity
|
||||||
import com.kunzisoft.keepass.tasks.ActionRunnable
|
import com.kunzisoft.keepass.tasks.ActionRunnable
|
||||||
import com.kunzisoft.keepass.timeout.TimeoutHelper
|
import com.kunzisoft.keepass.timeout.TimeoutHelper
|
||||||
import com.kunzisoft.keepass.utils.BACK_PREVIOUS_KEYBOARD_ACTION
|
import com.kunzisoft.keepass.utils.BACK_PREVIOUS_KEYBOARD_ACTION
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableList
|
import com.kunzisoft.keepass.utils.getParcelableList
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.putParcelableList
|
import com.kunzisoft.keepass.utils.putParcelableList
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.openUrl
|
import com.kunzisoft.keepass.utils.UriUtil.openUrl
|
||||||
import com.kunzisoft.keepass.view.AddNodeButtonView
|
import com.kunzisoft.keepass.view.AddNodeButtonView
|
||||||
import com.kunzisoft.keepass.view.NavigationDatabaseView
|
import com.kunzisoft.keepass.view.NavigationDatabaseView
|
||||||
|
|
|
@ -46,8 +46,8 @@ import com.kunzisoft.keepass.database.element.icon.IconImage
|
||||||
import com.kunzisoft.keepass.database.element.icon.IconImageCustom
|
import com.kunzisoft.keepass.database.element.icon.IconImageCustom
|
||||||
import com.kunzisoft.keepass.settings.PreferencesUtil
|
import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||||
import com.kunzisoft.keepass.tasks.BinaryDatabaseManager
|
import com.kunzisoft.keepass.tasks.BinaryDatabaseManager
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.getDocumentFile
|
import com.kunzisoft.keepass.utils.UriUtil.getDocumentFile
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.openUrl
|
import com.kunzisoft.keepass.utils.UriUtil.openUrl
|
||||||
import com.kunzisoft.keepass.view.asError
|
import com.kunzisoft.keepass.view.asError
|
||||||
|
|
|
@ -36,7 +36,7 @@ import com.kunzisoft.keepass.activities.legacy.DatabaseLockActivity
|
||||||
import com.kunzisoft.keepass.database.ContextualDatabase
|
import com.kunzisoft.keepass.database.ContextualDatabase
|
||||||
import com.kunzisoft.keepass.database.element.Attachment
|
import com.kunzisoft.keepass.database.element.Attachment
|
||||||
import com.kunzisoft.keepass.tasks.BinaryDatabaseManager
|
import com.kunzisoft.keepass.tasks.BinaryDatabaseManager
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
|
|
||||||
class ImageViewerActivity : DatabaseLockActivity() {
|
class ImageViewerActivity : DatabaseLockActivity() {
|
||||||
|
|
|
@ -72,8 +72,8 @@ import com.kunzisoft.keepass.settings.SettingsAdvancedUnlockActivity
|
||||||
import com.kunzisoft.keepass.tasks.ActionRunnable
|
import com.kunzisoft.keepass.tasks.ActionRunnable
|
||||||
import com.kunzisoft.keepass.utils.BACK_PREVIOUS_KEYBOARD_ACTION
|
import com.kunzisoft.keepass.utils.BACK_PREVIOUS_KEYBOARD_ACTION
|
||||||
import com.kunzisoft.keepass.utils.MenuUtil
|
import com.kunzisoft.keepass.utils.MenuUtil
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.getUri
|
import com.kunzisoft.keepass.utils.UriUtil.getUri
|
||||||
import com.kunzisoft.keepass.view.MainCredentialView
|
import com.kunzisoft.keepass.view.MainCredentialView
|
||||||
import com.kunzisoft.keepass.view.asError
|
import com.kunzisoft.keepass.view.asError
|
||||||
|
|
|
@ -25,7 +25,7 @@ import android.text.SpannableStringBuilder
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import com.kunzisoft.keepass.R
|
import com.kunzisoft.keepass.R
|
||||||
import com.kunzisoft.keepass.model.SnapFileDatabaseInfo
|
import com.kunzisoft.keepass.model.SnapFileDatabaseInfo
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
|
|
||||||
|
|
||||||
class DatabaseChangedDialogFragment : DatabaseDialogFragment() {
|
class DatabaseChangedDialogFragment : DatabaseDialogFragment() {
|
||||||
|
|
|
@ -35,7 +35,7 @@ import com.google.android.material.textfield.TextInputLayout
|
||||||
import com.kunzisoft.keepass.R
|
import com.kunzisoft.keepass.R
|
||||||
import com.kunzisoft.keepass.database.element.Field
|
import com.kunzisoft.keepass.database.element.Field
|
||||||
import com.kunzisoft.keepass.database.element.security.ProtectedString
|
import com.kunzisoft.keepass.database.element.security.ProtectedString
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
|
|
||||||
|
|
||||||
class EntryCustomFieldDialogFragment: DatabaseDialogFragment() {
|
class EntryCustomFieldDialogFragment: DatabaseDialogFragment() {
|
||||||
|
|
|
@ -27,7 +27,7 @@ import android.text.SpannableStringBuilder
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import com.kunzisoft.keepass.R
|
import com.kunzisoft.keepass.R
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom Dialog to confirm big file to upload
|
* Custom Dialog to confirm big file to upload
|
||||||
|
|
|
@ -35,7 +35,7 @@ import com.kunzisoft.keepass.database.ContextualDatabase
|
||||||
import com.kunzisoft.keepass.database.element.icon.IconImage
|
import com.kunzisoft.keepass.database.element.icon.IconImage
|
||||||
import com.kunzisoft.keepass.model.GroupInfo
|
import com.kunzisoft.keepass.model.GroupInfo
|
||||||
import com.kunzisoft.keepass.settings.PreferencesUtil
|
import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.TimeUtil.getDateTimeString
|
import com.kunzisoft.keepass.utils.TimeUtil.getDateTimeString
|
||||||
import com.kunzisoft.keepass.utils.UuidUtil
|
import com.kunzisoft.keepass.utils.UuidUtil
|
||||||
import com.kunzisoft.keepass.view.DateTimeFieldView
|
import com.kunzisoft.keepass.view.DateTimeFieldView
|
||||||
|
|
|
@ -39,7 +39,7 @@ import com.kunzisoft.keepass.database.ContextualDatabase
|
||||||
import com.kunzisoft.keepass.database.element.DateInstant
|
import com.kunzisoft.keepass.database.element.DateInstant
|
||||||
import com.kunzisoft.keepass.database.element.icon.IconImage
|
import com.kunzisoft.keepass.database.element.icon.IconImage
|
||||||
import com.kunzisoft.keepass.model.GroupInfo
|
import com.kunzisoft.keepass.model.GroupInfo
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
import com.kunzisoft.keepass.view.DateTimeEditFieldView
|
import com.kunzisoft.keepass.view.DateTimeEditFieldView
|
||||||
import com.kunzisoft.keepass.view.InheritedCompletionView
|
import com.kunzisoft.keepass.view.InheritedCompletionView
|
||||||
import com.kunzisoft.keepass.view.TagsCompletionView
|
import com.kunzisoft.keepass.view.TagsCompletionView
|
||||||
|
|
|
@ -31,7 +31,7 @@ import com.kunzisoft.keepass.database.ContextualDatabase
|
||||||
import com.kunzisoft.keepass.database.element.DateInstant
|
import com.kunzisoft.keepass.database.element.DateInstant
|
||||||
import com.kunzisoft.keepass.database.element.icon.IconImage
|
import com.kunzisoft.keepass.database.element.icon.IconImage
|
||||||
import com.kunzisoft.keepass.database.element.icon.IconImageCustom
|
import com.kunzisoft.keepass.database.element.icon.IconImageCustom
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
import com.kunzisoft.keepass.viewmodels.IconPickerViewModel
|
import com.kunzisoft.keepass.viewmodels.IconPickerViewModel
|
||||||
|
|
||||||
class IconEditDialogFragment : DatabaseDialogFragment() {
|
class IconEditDialogFragment : DatabaseDialogFragment() {
|
||||||
|
|
|
@ -28,7 +28,7 @@ import androidx.appcompat.app.AlertDialog
|
||||||
import com.kunzisoft.keepass.R
|
import com.kunzisoft.keepass.R
|
||||||
import com.kunzisoft.keepass.activities.helpers.ExternalFileHelper
|
import com.kunzisoft.keepass.activities.helpers.ExternalFileHelper
|
||||||
import com.kunzisoft.keepass.database.MainCredential
|
import com.kunzisoft.keepass.database.MainCredential
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.getDocumentFile
|
import com.kunzisoft.keepass.utils.UriUtil.getDocumentFile
|
||||||
import com.kunzisoft.keepass.view.MainCredentialView
|
import com.kunzisoft.keepass.view.MainCredentialView
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.fragment.app.DialogFragment
|
import androidx.fragment.app.DialogFragment
|
||||||
import com.kunzisoft.keepass.R
|
import com.kunzisoft.keepass.R
|
||||||
import com.kunzisoft.keepass.database.MainCredential
|
import com.kunzisoft.keepass.database.MainCredential
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
|
|
||||||
class PasswordEncodingDialogFragment : DialogFragment() {
|
class PasswordEncodingDialogFragment : DialogFragment() {
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ import android.text.SpannableStringBuilder
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import com.kunzisoft.keepass.R
|
import com.kunzisoft.keepass.R
|
||||||
import com.kunzisoft.keepass.database.element.Attachment
|
import com.kunzisoft.keepass.database.element.Attachment
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom Dialog to confirm big file to upload
|
* Custom Dialog to confirm big file to upload
|
||||||
|
|
|
@ -44,7 +44,7 @@ import com.kunzisoft.keepass.otp.OtpElement.Companion.MIN_TOTP_PERIOD
|
||||||
import com.kunzisoft.keepass.otp.OtpTokenType
|
import com.kunzisoft.keepass.otp.OtpTokenType
|
||||||
import com.kunzisoft.keepass.otp.OtpType
|
import com.kunzisoft.keepass.otp.OtpType
|
||||||
import com.kunzisoft.keepass.otp.TokenCalculator
|
import com.kunzisoft.keepass.otp.TokenCalculator
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.isContributingUser
|
import com.kunzisoft.keepass.utils.UriUtil.isContributingUser
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.openUrl
|
import com.kunzisoft.keepass.utils.UriUtil.openUrl
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
|
@ -42,8 +42,8 @@ import com.kunzisoft.keepass.model.AttachmentState
|
||||||
import com.kunzisoft.keepass.model.EntryAttachmentState
|
import com.kunzisoft.keepass.model.EntryAttachmentState
|
||||||
import com.kunzisoft.keepass.model.EntryInfo
|
import com.kunzisoft.keepass.model.EntryInfo
|
||||||
import com.kunzisoft.keepass.model.StreamDirection
|
import com.kunzisoft.keepass.model.StreamDirection
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableList
|
import com.kunzisoft.keepass.utils.getParcelableList
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.putParcelableList
|
import com.kunzisoft.keepass.utils.putParcelableList
|
||||||
import com.kunzisoft.keepass.view.TagsCompletionView
|
import com.kunzisoft.keepass.view.TagsCompletionView
|
||||||
import com.kunzisoft.keepass.view.TemplateEditView
|
import com.kunzisoft.keepass.view.TemplateEditView
|
||||||
import com.kunzisoft.keepass.view.collapse
|
import com.kunzisoft.keepass.view.collapse
|
||||||
|
|
|
@ -26,7 +26,7 @@ import com.kunzisoft.keepass.autofill.AutofillComponent
|
||||||
import com.kunzisoft.keepass.autofill.AutofillHelper
|
import com.kunzisoft.keepass.autofill.AutofillHelper
|
||||||
import com.kunzisoft.keepass.model.RegisterInfo
|
import com.kunzisoft.keepass.model.RegisterInfo
|
||||||
import com.kunzisoft.keepass.model.SearchInfo
|
import com.kunzisoft.keepass.model.SearchInfo
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
import com.kunzisoft.keepass.utils.getEnumExtra
|
import com.kunzisoft.keepass.utils.getEnumExtra
|
||||||
import com.kunzisoft.keepass.utils.putEnumExtra
|
import com.kunzisoft.keepass.utils.putEnumExtra
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ import com.kunzisoft.keepass.model.SearchInfo
|
||||||
import com.kunzisoft.keepass.settings.AutofillSettingsActivity
|
import com.kunzisoft.keepass.settings.AutofillSettingsActivity
|
||||||
import com.kunzisoft.keepass.settings.PreferencesUtil
|
import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||||
import com.kunzisoft.keepass.utils.LOCK_ACTION
|
import com.kunzisoft.keepass.utils.LOCK_ACTION
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
|
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||||
|
|
|
@ -26,7 +26,7 @@ import android.os.Parcelable
|
||||||
import android.service.autofill.FillRequest
|
import android.service.autofill.FillRequest
|
||||||
import android.view.inputmethod.InlineSuggestionsRequest
|
import android.view.inputmethod.InlineSuggestionsRequest
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility class only to prevent java.lang.NoClassDefFoundError for old Android version and new lib compilation
|
* Utility class only to prevent java.lang.NoClassDefFoundError for old Android version and new lib compilation
|
||||||
|
|
|
@ -24,7 +24,7 @@ import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.database.element.MasterCredential
|
import com.kunzisoft.keepass.database.element.MasterCredential
|
||||||
import com.kunzisoft.keepass.hardware.HardwareKey
|
import com.kunzisoft.keepass.hardware.HardwareKey
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.UriHelper.getUriInputStream
|
import com.kunzisoft.keepass.utils.UriHelper.getUriInputStream
|
||||||
import com.kunzisoft.keepass.utils.readEnum
|
import com.kunzisoft.keepass.utils.readEnum
|
||||||
import com.kunzisoft.keepass.utils.writeEnum
|
import com.kunzisoft.keepass.utils.writeEnum
|
||||||
|
|
|
@ -24,7 +24,7 @@ import android.net.Uri
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import android.text.format.Formatter
|
import android.text.format.Formatter
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import com.kunzisoft.keepass.viewmodels.FileDatabaseInfo
|
import com.kunzisoft.keepass.viewmodels.FileDatabaseInfo
|
||||||
import java.text.DateFormat
|
import java.text.DateFormat
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
|
|
|
@ -36,7 +36,7 @@ import com.kunzisoft.keepass.model.AttachmentState
|
||||||
import com.kunzisoft.keepass.model.EntryAttachmentState
|
import com.kunzisoft.keepass.model.EntryAttachmentState
|
||||||
import com.kunzisoft.keepass.model.StreamDirection
|
import com.kunzisoft.keepass.model.StreamDirection
|
||||||
import com.kunzisoft.keepass.tasks.BinaryDatabaseManager
|
import com.kunzisoft.keepass.tasks.BinaryDatabaseManager
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.getDocumentFile
|
import com.kunzisoft.keepass.utils.UriUtil.getDocumentFile
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
|
|
@ -31,9 +31,9 @@ import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||||
import com.kunzisoft.keepass.timeout.ClipboardHelper
|
import com.kunzisoft.keepass.timeout.ClipboardHelper
|
||||||
import com.kunzisoft.keepass.timeout.TimeoutHelper.NEVER
|
import com.kunzisoft.keepass.timeout.TimeoutHelper.NEVER
|
||||||
import com.kunzisoft.keepass.utils.LOCK_ACTION
|
import com.kunzisoft.keepass.utils.LOCK_ACTION
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableList
|
import com.kunzisoft.keepass.utils.getParcelableList
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.putParcelableList
|
import com.kunzisoft.keepass.utils.putParcelableList
|
||||||
|
|
||||||
class ClipboardEntryNotificationService : LockNotificationService() {
|
class ClipboardEntryNotificationService : LockNotificationService() {
|
||||||
|
|
||||||
|
|
|
@ -57,9 +57,9 @@ import com.kunzisoft.keepass.timeout.TimeoutHelper
|
||||||
import com.kunzisoft.keepass.utils.DATABASE_START_TASK_ACTION
|
import com.kunzisoft.keepass.utils.DATABASE_START_TASK_ACTION
|
||||||
import com.kunzisoft.keepass.utils.DATABASE_STOP_TASK_ACTION
|
import com.kunzisoft.keepass.utils.DATABASE_STOP_TASK_ACTION
|
||||||
import com.kunzisoft.keepass.utils.LOCK_ACTION
|
import com.kunzisoft.keepass.utils.LOCK_ACTION
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableList
|
import com.kunzisoft.keepass.utils.getParcelableList
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.putParcelableList
|
import com.kunzisoft.keepass.utils.putParcelableList
|
||||||
import com.kunzisoft.keepass.utils.closeDatabase
|
import com.kunzisoft.keepass.utils.closeDatabase
|
||||||
import com.kunzisoft.keepass.viewmodels.FileDatabaseInfo
|
import com.kunzisoft.keepass.viewmodels.FileDatabaseInfo
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
|
|
|
@ -32,7 +32,7 @@ import com.kunzisoft.keepass.model.EntryInfo
|
||||||
import com.kunzisoft.keepass.settings.PreferencesUtil
|
import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||||
import com.kunzisoft.keepass.timeout.TimeoutHelper
|
import com.kunzisoft.keepass.timeout.TimeoutHelper
|
||||||
import com.kunzisoft.keepass.utils.LOCK_ACTION
|
import com.kunzisoft.keepass.utils.LOCK_ACTION
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
import com.kunzisoft.keepass.utils.getParcelableExtraCompat
|
||||||
|
|
||||||
class KeyboardEntryNotificationService : LockNotificationService() {
|
class KeyboardEntryNotificationService : LockNotificationService() {
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,8 @@ import com.kunzisoft.keepass.services.DatabaseTaskNotificationService
|
||||||
import com.kunzisoft.keepass.settings.preference.*
|
import com.kunzisoft.keepass.settings.preference.*
|
||||||
import com.kunzisoft.keepass.settings.preferencedialogfragment.*
|
import com.kunzisoft.keepass.settings.preferencedialogfragment.*
|
||||||
import com.kunzisoft.keepass.tasks.ActionRunnable
|
import com.kunzisoft.keepass.tasks.ActionRunnable
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableCompat
|
import com.kunzisoft.keepass.utils.getParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getSerializableCompat
|
import com.kunzisoft.keepass.utils.getSerializableCompat
|
||||||
import com.kunzisoft.keepass.viewmodels.DatabaseViewModel
|
import com.kunzisoft.keepass.viewmodels.DatabaseViewModel
|
||||||
|
|
||||||
class NestedDatabaseSettingsFragment : NestedSettingsFragment(), DatabaseRetrieval {
|
class NestedDatabaseSettingsFragment : NestedSettingsFragment(), DatabaseRetrieval {
|
||||||
|
|
|
@ -28,7 +28,7 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.kunzisoft.keepass.R
|
import com.kunzisoft.keepass.R
|
||||||
import com.kunzisoft.keepass.model.SearchInfo
|
import com.kunzisoft.keepass.model.SearchInfo
|
||||||
import com.kunzisoft.keepass.settings.preferencedialogfragment.adapter.AutofillBlocklistAdapter
|
import com.kunzisoft.keepass.settings.preferencedialogfragment.adapter.AutofillBlocklistAdapter
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableArrayCompat
|
import com.kunzisoft.keepass.utils.getParcelableArrayCompat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.Comparator
|
import kotlin.Comparator
|
||||||
import kotlin.collections.HashSet
|
import kotlin.collections.HashSet
|
||||||
|
@ -37,8 +37,9 @@ abstract class AutofillBlocklistPreferenceDialogFragmentCompat
|
||||||
: InputPreferenceDialogFragmentCompat(),
|
: InputPreferenceDialogFragmentCompat(),
|
||||||
AutofillBlocklistAdapter.ItemDeletedCallback<SearchInfo> {
|
AutofillBlocklistAdapter.ItemDeletedCallback<SearchInfo> {
|
||||||
|
|
||||||
private var persistedItems = TreeSet<SearchInfo>(
|
private var persistedItems = TreeSet<SearchInfo> { o1, o2 ->
|
||||||
Comparator { o1, o2 -> o1.toString().compareTo(o2.toString()) })
|
o1.toString().compareTo(o2.toString())
|
||||||
|
}
|
||||||
|
|
||||||
private var filterAdapter: AutofillBlocklistAdapter<SearchInfo>? = null
|
private var filterAdapter: AutofillBlocklistAdapter<SearchInfo>? = null
|
||||||
|
|
||||||
|
@ -65,7 +66,7 @@ abstract class AutofillBlocklistPreferenceDialogFragmentCompat
|
||||||
override fun onBindDialogView(view: View) {
|
override fun onBindDialogView(view: View) {
|
||||||
super.onBindDialogView(view)
|
super.onBindDialogView(view)
|
||||||
|
|
||||||
setOnInputTextEditorActionListener(TextView.OnEditorActionListener { _, actionId, _ ->
|
setOnInputTextEditorActionListener { _, actionId, _ ->
|
||||||
when (actionId) {
|
when (actionId) {
|
||||||
EditorInfo.IME_ACTION_DONE -> {
|
EditorInfo.IME_ACTION_DONE -> {
|
||||||
if (inputText.isEmpty()) {
|
if (inputText.isEmpty()) {
|
||||||
|
@ -77,9 +78,10 @@ abstract class AutofillBlocklistPreferenceDialogFragmentCompat
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
|
||||||
val addItemButton = view.findViewById<View>(R.id.add_item_button)
|
val addItemButton = view.findViewById<View>(R.id.add_item_button)
|
||||||
addItemButton?.setOnClickListener {
|
addItemButton?.setOnClickListener {
|
||||||
|
|
|
@ -32,7 +32,6 @@ import com.kunzisoft.keepass.BuildConfig
|
||||||
import com.kunzisoft.keepass.R
|
import com.kunzisoft.keepass.R
|
||||||
import com.kunzisoft.keepass.app.database.FileDatabaseHistoryAction
|
import com.kunzisoft.keepass.app.database.FileDatabaseHistoryAction
|
||||||
import com.kunzisoft.keepass.education.Education
|
import com.kunzisoft.keepass.education.Education
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.getParcelableExtraCompat
|
|
||||||
import com.kunzisoft.keepass.utils.UriHelper.withContentScheme
|
import com.kunzisoft.keepass.utils.UriHelper.withContentScheme
|
||||||
import com.kunzisoft.keepass.utils.UriHelper.withFileScheme
|
import com.kunzisoft.keepass.utils.UriHelper.withFileScheme
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
|
@ -12,7 +12,7 @@ import android.widget.TextView
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
import androidx.constraintlayout.widget.ConstraintLayout
|
||||||
import com.google.android.material.textfield.TextInputLayout
|
import com.google.android.material.textfield.TextInputLayout
|
||||||
import com.kunzisoft.keepass.R
|
import com.kunzisoft.keepass.R
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.UriUtil.getDocumentFile
|
import com.kunzisoft.keepass.utils.UriUtil.getDocumentFile
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ import com.kunzisoft.keepass.model.EntryInfo
|
||||||
import com.kunzisoft.keepass.otp.OtpElement
|
import com.kunzisoft.keepass.otp.OtpElement
|
||||||
import com.kunzisoft.keepass.otp.OtpEntryFields
|
import com.kunzisoft.keepass.otp.OtpEntryFields
|
||||||
import com.kunzisoft.keepass.settings.PreferencesUtil
|
import com.kunzisoft.keepass.settings.PreferencesUtil
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
|
|
||||||
|
|
||||||
abstract class TemplateAbstractView<
|
abstract class TemplateAbstractView<
|
||||||
|
|
|
@ -6,7 +6,7 @@ import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import com.kunzisoft.keepass.database.element.icon.IconImageCustom
|
import com.kunzisoft.keepass.database.element.icon.IconImageCustom
|
||||||
import com.kunzisoft.keepass.database.element.icon.IconImageStandard
|
import com.kunzisoft.keepass.database.element.icon.IconImageStandard
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
|
|
||||||
|
|
||||||
class IconPickerViewModel: ViewModel() {
|
class IconPickerViewModel: ViewModel() {
|
||||||
|
|
|
@ -23,7 +23,7 @@ import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.database.element.binary.BinaryByte
|
import com.kunzisoft.keepass.database.element.binary.BinaryByte
|
||||||
import com.kunzisoft.keepass.database.element.binary.BinaryData
|
import com.kunzisoft.keepass.database.element.binary.BinaryData
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
|
|
||||||
|
|
||||||
data class Attachment(var name: String,
|
data class Attachment(var name: String,
|
||||||
|
|
|
@ -21,8 +21,8 @@ package com.kunzisoft.keepass.database.element
|
||||||
|
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readStringParcelableMap
|
import com.kunzisoft.keepass.utils.readStringParcelableMap
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.writeStringParcelableMap
|
import com.kunzisoft.keepass.utils.writeStringParcelableMap
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class CustomData : Parcelable {
|
class CustomData : Parcelable {
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.kunzisoft.keepass.database.element
|
||||||
|
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
|
|
||||||
class CustomDataItem : Parcelable {
|
class CustomDataItem : Parcelable {
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ package com.kunzisoft.keepass.database.element
|
||||||
|
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readSerializableCompat
|
import com.kunzisoft.keepass.utils.readSerializableCompat
|
||||||
import com.kunzisoft.keepass.utils.readEnum
|
import com.kunzisoft.keepass.utils.readEnum
|
||||||
import com.kunzisoft.keepass.utils.writeEnum
|
import com.kunzisoft.keepass.utils.writeEnum
|
||||||
import org.joda.time.Duration
|
import org.joda.time.Duration
|
||||||
|
|
|
@ -23,7 +23,7 @@ import android.os.Parcel
|
||||||
import android.os.ParcelUuid
|
import android.os.ParcelUuid
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.database.element.database.DatabaseVersioned
|
import com.kunzisoft.keepass.database.element.database.DatabaseVersioned
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class DeletedObject : Parcelable {
|
class DeletedObject : Parcelable {
|
||||||
|
|
|
@ -36,7 +36,7 @@ import com.kunzisoft.keepass.database.element.node.Type
|
||||||
import com.kunzisoft.keepass.model.EntryInfo
|
import com.kunzisoft.keepass.model.EntryInfo
|
||||||
import com.kunzisoft.keepass.otp.OtpElement
|
import com.kunzisoft.keepass.otp.OtpElement
|
||||||
import com.kunzisoft.keepass.otp.OtpEntryFields
|
import com.kunzisoft.keepass.otp.OtpEntryFields
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.StringUtil.toFormattedColorInt
|
import com.kunzisoft.keepass.utils.StringUtil.toFormattedColorInt
|
||||||
import com.kunzisoft.keepass.utils.StringUtil.toFormattedColorString
|
import com.kunzisoft.keepass.utils.StringUtil.toFormattedColorString
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
|
|
|
@ -22,7 +22,7 @@ package com.kunzisoft.keepass.database.element
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.database.element.security.ProtectedString
|
import com.kunzisoft.keepass.database.element.security.ProtectedString
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
|
|
||||||
class Field : Parcelable {
|
class Field : Parcelable {
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ import com.kunzisoft.keepass.database.element.icon.IconImage
|
||||||
import com.kunzisoft.keepass.database.element.node.*
|
import com.kunzisoft.keepass.database.element.node.*
|
||||||
import com.kunzisoft.keepass.model.EntryInfo
|
import com.kunzisoft.keepass.model.EntryInfo
|
||||||
import com.kunzisoft.keepass.model.GroupInfo
|
import com.kunzisoft.keepass.model.GroupInfo
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.collections.ArrayList
|
import kotlin.collections.ArrayList
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ import com.kunzisoft.keepass.database.element.node.NodeId
|
||||||
import com.kunzisoft.keepass.database.element.node.NodeIdUUID
|
import com.kunzisoft.keepass.database.element.node.NodeIdUUID
|
||||||
import com.kunzisoft.keepass.database.element.node.NodeKDBInterface
|
import com.kunzisoft.keepass.database.element.node.NodeKDBInterface
|
||||||
import com.kunzisoft.keepass.database.element.node.Type
|
import com.kunzisoft.keepass.database.element.node.Type
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -36,11 +36,11 @@ import com.kunzisoft.keepass.database.element.node.NodeIdUUID
|
||||||
import com.kunzisoft.keepass.database.element.node.NodeKDBXInterface
|
import com.kunzisoft.keepass.database.element.node.NodeKDBXInterface
|
||||||
import com.kunzisoft.keepass.database.element.node.Type
|
import com.kunzisoft.keepass.database.element.node.Type
|
||||||
import com.kunzisoft.keepass.database.element.security.ProtectedString
|
import com.kunzisoft.keepass.database.element.security.ProtectedString
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readStringIntMap
|
import com.kunzisoft.keepass.utils.readStringIntMap
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readStringParcelableMap
|
import com.kunzisoft.keepass.utils.readStringParcelableMap
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.writeStringIntMap
|
import com.kunzisoft.keepass.utils.writeStringIntMap
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.writeStringParcelableMap
|
import com.kunzisoft.keepass.utils.writeStringParcelableMap
|
||||||
import com.kunzisoft.keepass.utils.UnsignedLong
|
import com.kunzisoft.keepass.utils.UnsignedLong
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
|
|
|
@ -27,7 +27,7 @@ import com.kunzisoft.keepass.database.element.node.NodeId
|
||||||
import com.kunzisoft.keepass.database.element.node.NodeIdInt
|
import com.kunzisoft.keepass.database.element.node.NodeIdInt
|
||||||
import com.kunzisoft.keepass.database.element.node.NodeKDBInterface
|
import com.kunzisoft.keepass.database.element.node.NodeKDBInterface
|
||||||
import com.kunzisoft.keepass.database.element.node.Type
|
import com.kunzisoft.keepass.database.element.node.Type
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class GroupKDB : GroupVersioned<Int, UUID, GroupKDB, EntryKDB>, NodeKDBInterface {
|
class GroupKDB : GroupVersioned<Int, UUID, GroupKDB, EntryKDB>, NodeKDBInterface {
|
||||||
|
|
|
@ -31,8 +31,8 @@ import com.kunzisoft.keepass.database.element.node.NodeId
|
||||||
import com.kunzisoft.keepass.database.element.node.NodeIdUUID
|
import com.kunzisoft.keepass.database.element.node.NodeIdUUID
|
||||||
import com.kunzisoft.keepass.database.element.node.NodeKDBXInterface
|
import com.kunzisoft.keepass.database.element.node.NodeKDBXInterface
|
||||||
import com.kunzisoft.keepass.database.element.node.Type
|
import com.kunzisoft.keepass.database.element.node.Type
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readSerializableCompat
|
import com.kunzisoft.keepass.utils.readSerializableCompat
|
||||||
import com.kunzisoft.keepass.utils.UnsignedLong
|
import com.kunzisoft.keepass.utils.UnsignedLong
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ package com.kunzisoft.keepass.database.element.icon
|
||||||
|
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
|
|
||||||
class IconImage() : IconImageDraw() {
|
class IconImage() : IconImageDraw() {
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ import android.os.ParcelUuid
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.database.element.DateInstant
|
import com.kunzisoft.keepass.database.element.DateInstant
|
||||||
import com.kunzisoft.keepass.database.element.database.DatabaseVersioned
|
import com.kunzisoft.keepass.database.element.database.DatabaseVersioned
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
|
|
||||||
class IconImageCustom : IconImageDraw {
|
class IconImageCustom : IconImageDraw {
|
||||||
|
|
|
@ -22,7 +22,7 @@ package com.kunzisoft.keepass.database.element.node
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.ParcelUuid
|
import android.os.ParcelUuid
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.UuidUtil
|
import com.kunzisoft.keepass.utils.UuidUtil
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ import com.kunzisoft.keepass.database.element.DateInstant
|
||||||
import com.kunzisoft.keepass.database.element.entry.EntryVersionedInterface
|
import com.kunzisoft.keepass.database.element.entry.EntryVersionedInterface
|
||||||
import com.kunzisoft.keepass.database.element.group.GroupVersionedInterface
|
import com.kunzisoft.keepass.database.element.group.GroupVersionedInterface
|
||||||
import com.kunzisoft.keepass.database.element.icon.IconImage
|
import com.kunzisoft.keepass.database.element.icon.IconImage
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract class who manage Groups and Entries
|
* Abstract class who manage Groups and Entries
|
||||||
|
|
|
@ -23,8 +23,8 @@ import android.os.ParcelUuid
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.database.element.database.DatabaseVersioned
|
import com.kunzisoft.keepass.database.element.database.DatabaseVersioned
|
||||||
import com.kunzisoft.keepass.database.element.icon.IconImage
|
import com.kunzisoft.keepass.database.element.icon.IconImage
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readListCompat
|
import com.kunzisoft.keepass.utils.readListCompat
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.collections.ArrayList
|
import kotlin.collections.ArrayList
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ package com.kunzisoft.keepass.database.element.template
|
||||||
|
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.readEnum
|
import com.kunzisoft.keepass.utils.readEnum
|
||||||
import com.kunzisoft.keepass.utils.writeEnum
|
import com.kunzisoft.keepass.utils.writeEnum
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ package com.kunzisoft.keepass.database.element.template
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.database.element.DateInstant
|
import com.kunzisoft.keepass.database.element.DateInstant
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readStringStringMap
|
import com.kunzisoft.keepass.utils.readStringStringMap
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.writeStringStringMap
|
import com.kunzisoft.keepass.utils.writeStringStringMap
|
||||||
|
|
||||||
class TemplateAttributeOption() : Parcelable {
|
class TemplateAttributeOption() : Parcelable {
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ package com.kunzisoft.keepass.database.element.template
|
||||||
|
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readListCompat
|
import com.kunzisoft.keepass.utils.readListCompat
|
||||||
|
|
||||||
class TemplateSection: Parcelable {
|
class TemplateSection: Parcelable {
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ package com.kunzisoft.keepass.model
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.readEnum
|
import com.kunzisoft.keepass.utils.readEnum
|
||||||
import com.kunzisoft.keepass.utils.writeEnum
|
import com.kunzisoft.keepass.utils.writeEnum
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ package com.kunzisoft.keepass.model
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.readEnum
|
import com.kunzisoft.keepass.utils.readEnum
|
||||||
import com.kunzisoft.keepass.utils.writeEnum
|
import com.kunzisoft.keepass.utils.writeEnum
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.kunzisoft.keepass.model
|
||||||
|
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readSerializableCompat
|
import com.kunzisoft.keepass.utils.readSerializableCompat
|
||||||
import org.joda.time.DateTime
|
import org.joda.time.DateTime
|
||||||
|
|
||||||
data class CreditCard(val cardholder: String?,
|
data class CreditCard(val cardholder: String?,
|
||||||
|
|
|
@ -23,7 +23,7 @@ import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.database.element.Attachment
|
import com.kunzisoft.keepass.database.element.Attachment
|
||||||
import com.kunzisoft.keepass.database.element.binary.BinaryByte
|
import com.kunzisoft.keepass.database.element.binary.BinaryByte
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import com.kunzisoft.keepass.utils.readEnum
|
import com.kunzisoft.keepass.utils.readEnum
|
||||||
import com.kunzisoft.keepass.utils.writeEnum
|
import com.kunzisoft.keepass.utils.writeEnum
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@ import com.kunzisoft.keepass.database.element.template.TemplateField
|
||||||
import com.kunzisoft.keepass.otp.OtpElement
|
import com.kunzisoft.keepass.otp.OtpElement
|
||||||
import com.kunzisoft.keepass.otp.OtpEntryFields
|
import com.kunzisoft.keepass.otp.OtpEntryFields
|
||||||
import com.kunzisoft.keepass.otp.OtpEntryFields.OTP_TOKEN_FIELD
|
import com.kunzisoft.keepass.otp.OtpEntryFields.OTP_TOKEN_FIELD
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readListCompat
|
import com.kunzisoft.keepass.utils.readListCompat
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class EntryInfo : NodeInfo {
|
class EntryInfo : NodeInfo {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.kunzisoft.keepass.model
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.database.element.Field
|
import com.kunzisoft.keepass.database.element.Field
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
|
|
||||||
class FocusedEditField : Parcelable {
|
class FocusedEditField : Parcelable {
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.database.element.Tags
|
import com.kunzisoft.keepass.database.element.Tags
|
||||||
import com.kunzisoft.keepass.database.element.icon.IconImageStandard
|
import com.kunzisoft.keepass.database.element.icon.IconImageStandard
|
||||||
import com.kunzisoft.keepass.database.element.icon.IconImageStandard.Companion.FOLDER_ID
|
import com.kunzisoft.keepass.database.element.icon.IconImageStandard.Companion.FOLDER_ID
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class GroupInfo : NodeInfo {
|
class GroupInfo : NodeInfo {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.database.element.CustomData
|
import com.kunzisoft.keepass.database.element.CustomData
|
||||||
import com.kunzisoft.keepass.database.element.DateInstant
|
import com.kunzisoft.keepass.database.element.DateInstant
|
||||||
import com.kunzisoft.keepass.database.element.icon.IconImage
|
import com.kunzisoft.keepass.database.element.icon.IconImage
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
|
|
||||||
open class NodeInfo() : Parcelable {
|
open class NodeInfo() : Parcelable {
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.kunzisoft.keepass.model
|
||||||
|
|
||||||
import android.os.Parcel
|
import android.os.Parcel
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import com.kunzisoft.keepass.utils.ParcelableUtil.readParcelableCompat
|
import com.kunzisoft.keepass.utils.readParcelableCompat
|
||||||
|
|
||||||
data class RegisterInfo(val searchInfo: SearchInfo,
|
data class RegisterInfo(val searchInfo: SearchInfo,
|
||||||
val username: String?,
|
val username: String?,
|
||||||
|
|
|
@ -27,8 +27,7 @@ import android.os.Parcelable
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
object ParcelableUtil {
|
// -------- Intent --------
|
||||||
|
|
||||||
inline fun <reified T : Parcelable> Intent.getParcelableExtraCompat(key: String?): T? = when {
|
inline fun <reified T : Parcelable> Intent.getParcelableExtraCompat(key: String?): T? = when {
|
||||||
key == null -> null
|
key == null -> null
|
||||||
SDK_INT >= 33 -> getParcelableExtra(key, T::class.java)
|
SDK_INT >= 33 -> getParcelableExtra(key, T::class.java)
|
||||||
|
@ -41,6 +40,22 @@ object ParcelableUtil {
|
||||||
else -> @Suppress("DEPRECATION") getSerializableExtra(key) as? T
|
else -> @Suppress("DEPRECATION") getSerializableExtra(key) as? T
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline fun <reified E : Parcelable> Intent.putParcelableList(key: String?, list: MutableList<E>) {
|
||||||
|
putExtra(key, list.toTypedArray())
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fun <reified E : Parcelable> Intent.getParcelableList(key: String?): MutableList<E>? = when {
|
||||||
|
SDK_INT >= 33 -> getParcelableArrayExtra(key, E::class.java)?.toMutableList()
|
||||||
|
else -> @Suppress("DEPRECATION", "UNCHECKED_CAST") (getParcelableArrayExtra(key) as? Array<E>)?.toMutableList()
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fun <reified T : Enum<T>> Intent.getEnumExtra(key: String?) =
|
||||||
|
getStringExtra(key)?.let { enumValueOf<T>(it) }
|
||||||
|
|
||||||
|
fun <T : Enum<T>> Intent.putEnumExtra(key: String?, value: T?) =
|
||||||
|
putExtra(key, value?.name)
|
||||||
|
|
||||||
|
// -------- Bundle --------
|
||||||
inline fun <reified T : Parcelable> Bundle.getParcelableCompat(key: String?): T? = when {
|
inline fun <reified T : Parcelable> Bundle.getParcelableCompat(key: String?): T? = when {
|
||||||
key == null -> null
|
key == null -> null
|
||||||
SDK_INT >= 33 -> getParcelable(key, T::class.java)
|
SDK_INT >= 33 -> getParcelable(key, T::class.java)
|
||||||
|
@ -59,15 +74,6 @@ object ParcelableUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun <reified E : Parcelable> Intent.putParcelableList(key: String?, list: MutableList<E>) {
|
|
||||||
putExtra(key, list.toTypedArray())
|
|
||||||
}
|
|
||||||
|
|
||||||
inline fun <reified E : Parcelable> Intent.getParcelableList(key: String?): MutableList<E>? = when {
|
|
||||||
SDK_INT >= 33 -> getParcelableArrayExtra(key, E::class.java)?.toMutableList()
|
|
||||||
else -> @Suppress("DEPRECATION", "UNCHECKED_CAST") (getParcelableArrayExtra(key) as? Array<E>)?.toMutableList()
|
|
||||||
}
|
|
||||||
|
|
||||||
inline fun <reified E : Parcelable> Bundle.putParcelableList(key: String?, list: List<E>) {
|
inline fun <reified E : Parcelable> Bundle.putParcelableList(key: String?, list: List<E>) {
|
||||||
putParcelableArray(key, list.toTypedArray())
|
putParcelableArray(key, list.toTypedArray())
|
||||||
}
|
}
|
||||||
|
@ -77,6 +83,8 @@ object ParcelableUtil {
|
||||||
else -> @Suppress("DEPRECATION", "UNCHECKED_CAST") (getParcelableArray(key) as? Array<E>)?.toMutableList()
|
else -> @Suppress("DEPRECATION", "UNCHECKED_CAST") (getParcelableArray(key) as? Array<E>)?.toMutableList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -------- Parcel --------
|
||||||
|
|
||||||
inline fun <reified T : Parcelable> Parcel.readParcelableCompat(): T? = when {
|
inline fun <reified T : Parcelable> Parcel.readParcelableCompat(): T? = when {
|
||||||
SDK_INT >= 33 -> readParcelable(T::class.java.classLoader, T::class.java)
|
SDK_INT >= 33 -> readParcelable(T::class.java.classLoader, T::class.java)
|
||||||
else -> @Suppress("DEPRECATION") readParcelable(T::class.java.classLoader) as? T
|
else -> @Suppress("DEPRECATION") readParcelable(T::class.java.classLoader) as? T
|
||||||
|
@ -201,7 +209,6 @@ object ParcelableUtil {
|
||||||
}
|
}
|
||||||
return map
|
return map
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fun Parcel.readByteArrayCompat(): ByteArray? {
|
fun Parcel.readByteArrayCompat(): ByteArray? {
|
||||||
val dataLength = readInt()
|
val dataLength = readInt()
|
||||||
|
@ -223,12 +230,6 @@ fun Parcel.writeByteArrayCompat(data: ByteArray?) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline fun <reified T : Enum<T>> Intent.getEnumExtra(key: String?) =
|
|
||||||
getStringExtra(key)?.let { enumValueOf<T>(it) }
|
|
||||||
|
|
||||||
fun <T : Enum<T>> Intent.putEnumExtra(key: String?, value: T?) =
|
|
||||||
putExtra(key, value?.name)
|
|
||||||
|
|
||||||
inline fun <reified T : Enum<T>> Parcel.readEnum() =
|
inline fun <reified T : Enum<T>> Parcel.readEnum() =
|
||||||
readString()?.let { enumValueOf<T>(it) }
|
readString()?.let { enumValueOf<T>(it) }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue