removed wildcard entries"

This commit is contained in:
Yogesh Choudhary Paliyal
2022-07-03 00:45:24 +05:30
parent 1caba6518d
commit c7db577e2e
34 changed files with 97 additions and 61 deletions
+2
View File
@@ -1,6 +1,8 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
<option name="NAME_COUNT_TO_USE_STAR_IMPORT_FOR_MEMBERS" value="2147483647" />
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
@@ -2,7 +2,7 @@ package com.yogeshpaliyal.keypass
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.*
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
@@ -5,14 +5,14 @@ import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.action.ViewActions.replaceText
import androidx.test.espresso.assertion.ViewAssertions.doesNotExist
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.*
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.rules.ActivityScenarioRule
import com.yogeshpaliyal.common.AppDatabase
import com.yogeshpaliyal.common.data.AccountModel
import com.yogeshpaliyal.keypass.R
import dagger.hilt.android.testing.HiltAndroidRule
import dagger.hilt.android.testing.HiltAndroidTest
import org.junit.Assert.*
import org.junit.Before
import org.junit.Rule
import org.junit.Test
@@ -1,16 +0,0 @@
package com.yogeshpaliyal.keypass
/*
* @author Yogesh Paliyal
* techpaliyal@gmail.com
* https://techpaliyal.com
* created on 23-01-2021 10:33
*/
data class InfoModel(
var user_id: String,
var username: String,
var password: String,
var notes: String,
var insertedDate: Long,
var lastUpdatedDate: Long
)
@@ -3,7 +3,7 @@ package com.yogeshpaliyal.keypass.data
import com.google.gson.Gson
import com.yogeshpaliyal.common.data.AccountModel
import com.yogeshpaliyal.keypass.R
import com.yogeshpaliyal.keypass.constants.AccountType
import com.yogeshpaliyal.common.constants.AccountType
import com.yogeshpaliyal.universalAdapter.listener.UniversalViewType
import com.yogeshpaliyal.universalAdapter.model.BaseDiffUtil
@@ -19,7 +19,14 @@ import android.app.assist.AssistStructure
import android.app.assist.AssistStructure.ViewNode
import android.os.Build
import android.os.CancellationSignal
import android.service.autofill.*
import android.service.autofill.AutofillService
import android.service.autofill.Dataset
import android.service.autofill.FillCallback
import android.service.autofill.FillRequest
import android.service.autofill.FillResponse
import android.service.autofill.SaveCallback
import android.service.autofill.SaveInfo
import android.service.autofill.SaveRequest
import android.util.ArrayMap
import android.util.Log
import android.view.autofill.AutofillId
@@ -28,7 +35,6 @@ import android.widget.RemoteViews
import android.widget.Toast
import androidx.annotation.RequiresApi
import com.yogeshpaliyal.keypass.R
import java.util.*
/**
* A very basic [AutofillService] implementation that only shows dynamic-generated datasets
@@ -2,7 +2,11 @@ package com.yogeshpaliyal.keypass.service
import android.os.Build
import android.os.CancellationSignal
import android.service.autofill.*
import android.service.autofill.AutofillService
import android.service.autofill.FillCallback
import android.service.autofill.FillRequest
import android.service.autofill.SaveCallback
import android.service.autofill.SaveRequest
import androidx.annotation.RequiresApi
/*
@@ -7,7 +7,7 @@ import androidx.lifecycle.viewModelScope
import com.yogeshpaliyal.common.data.AccountModel
import com.yogeshpaliyal.common.utils.Event
import com.yogeshpaliyal.keypass.R
import com.yogeshpaliyal.keypass.constants.AccountType
import com.yogeshpaliyal.common.constants.AccountType
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
@@ -5,7 +5,7 @@ import android.content.Intent
import android.content.pm.PackageManager
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.yogeshpaliyal.keypass.constants.RequestCodes
import com.yogeshpaliyal.common.constants.RequestCodes
import com.yogeshpaliyal.keypass.databinding.ActivityScannerBinding
import dagger.hilt.android.AndroidEntryPoint
@@ -8,7 +8,9 @@ import android.util.Log
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.biometric.BiometricManager
import androidx.biometric.BiometricManager.Authenticators.*
import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_STRONG
import androidx.biometric.BiometricManager.Authenticators.BIOMETRIC_WEAK
import androidx.biometric.BiometricManager.Authenticators.DEVICE_CREDENTIAL
import androidx.biometric.BiometricPrompt
import androidx.core.content.ContextCompat
import com.yogeshpaliyal.keypass.R
@@ -1,7 +1,10 @@
package com.yogeshpaliyal.keypass.ui.backup
import android.app.Activity
import android.content.*
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Bundle
import android.widget.Toast
@@ -12,7 +15,19 @@ import androidx.preference.Preference
import androidx.preference.PreferenceCategory
import androidx.preference.PreferenceFragmentCompat
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.yogeshpaliyal.common.utils.*
import com.yogeshpaliyal.common.utils.backupAccounts
import com.yogeshpaliyal.common.utils.canUserAccessBackupDirectory
import com.yogeshpaliyal.common.utils.clearBackupKey
import com.yogeshpaliyal.common.utils.formatCalendar
import com.yogeshpaliyal.common.utils.getBackupDirectory
import com.yogeshpaliyal.common.utils.getBackupTime
import com.yogeshpaliyal.common.utils.getOrCreateBackupKey
import com.yogeshpaliyal.common.utils.isAutoBackupEnabled
import com.yogeshpaliyal.common.utils.overrideAutoBackup
import com.yogeshpaliyal.common.utils.setAutoBackupEnabled
import com.yogeshpaliyal.common.utils.setBackupDirectory
import com.yogeshpaliyal.common.utils.setBackupTime
import com.yogeshpaliyal.common.utils.setOverrideAutoBackup
import com.yogeshpaliyal.keypass.R
import com.yogeshpaliyal.keypass.databinding.BackupActivityBinding
import com.yogeshpaliyal.keypass.databinding.LayoutBackupKeypharseBinding
@@ -1,8 +1,11 @@
package com.yogeshpaliyal.keypass.ui.home
import android.app.Application
import androidx.lifecycle.*
import com.yogeshpaliyal.common.AppDatabase
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.LiveData
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.yogeshpaliyal.common.data.AccountModel
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.Dispatchers
@@ -13,7 +13,7 @@ import androidx.fragment.app.Fragment
import androidx.lifecycle.Observer
import com.yogeshpaliyal.common.data.AccountModel
import com.yogeshpaliyal.keypass.R
import com.yogeshpaliyal.keypass.constants.AccountType
import com.yogeshpaliyal.common.constants.AccountType
import com.yogeshpaliyal.keypass.data.MyAccountModel
import com.yogeshpaliyal.keypass.databinding.FragmentHomeBinding
import com.yogeshpaliyal.keypass.listener.AccountsClickListener
@@ -5,7 +5,6 @@ import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.yogeshpaliyal.common.AppDatabase
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
@@ -13,8 +13,8 @@ import androidx.lifecycle.lifecycleScope
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.yogeshpaliyal.common.db_helper.createBackup
import com.yogeshpaliyal.common.db_helper.restoreBackup
import com.yogeshpaliyal.common.dbhelper.createBackup
import com.yogeshpaliyal.common.dbhelper.restoreBackup
import com.yogeshpaliyal.common.utils.email
import com.yogeshpaliyal.common.utils.getOrCreateBackupKey
import com.yogeshpaliyal.common.utils.setBackupDirectory
@@ -1,6 +1,6 @@
package com.yogeshpaliyal.keypass
import org.junit.Assert.*
import org.junit.Assert.assertEquals
import org.junit.Test
/**
@@ -1,7 +1,6 @@
package com.yogeshpaliyal.common
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Assert.*
import org.junit.Test
import org.junit.runner.RunWith
@@ -3,7 +3,7 @@ package com.yogeshpaliyal.common
import androidx.room.Database
import androidx.room.RoomDatabase
import com.yogeshpaliyal.common.data.AccountModel
import com.yogeshpaliyal.keypass.db.DbDao
import com.yogeshpaliyal.common.db.DbDao
/*
* @author Yogesh Paliyal
@@ -1,4 +1,4 @@
package com.yogeshpaliyal.keypass.constants
package com.yogeshpaliyal.common.constants
annotation class AccountType() {
companion object {
@@ -1,4 +1,4 @@
package com.yogeshpaliyal.keypass.constants
package com.yogeshpaliyal.common.constants
object IntentKeys {
const val SCANNED_TEXT = "scanned_text"
@@ -1,4 +1,4 @@
package com.yogeshpaliyal.keypass.constants
package com.yogeshpaliyal.common.constants
object RequestCodes {
const val SCANNER = 342
@@ -6,7 +6,7 @@ import androidx.room.PrimaryKey
import com.google.gson.annotations.SerializedName
import com.yogeshpaliyal.common.utils.TOTPHelper
import com.yogeshpaliyal.common.utils.getRandomString
import com.yogeshpaliyal.keypass.constants.AccountType
import com.yogeshpaliyal.common.constants.AccountType
/*
* @author Yogesh Paliyal
@@ -1,7 +1,11 @@
package com.yogeshpaliyal.keypass.db
package com.yogeshpaliyal.common.db
import androidx.lifecycle.LiveData
import androidx.room.*
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.yogeshpaliyal.common.data.AccountModel
import kotlinx.coroutines.flow.Flow
@@ -1,4 +1,4 @@
package com.yogeshpaliyal.keypass.db_helper
package com.yogeshpaliyal.common.dbhelper
/*
* @author Yogesh Paliyal
@@ -8,6 +8,6 @@ package com.yogeshpaliyal.keypass.db_helper
*/
class CryptoException : Exception {
constructor() {}
constructor(message: String?, throwable: Throwable?) : super(message, throwable) {}
constructor()
constructor(message: String?, throwable: Throwable?) : super(message, throwable)
}
@@ -1,16 +1,14 @@
package com.yogeshpaliyal.common.db_helper
package com.yogeshpaliyal.common.dbhelper
import android.content.ContentResolver
import android.net.Uri
import androidx.room.withTransaction
import com.google.gson.Gson
import com.yogeshpaliyal.common.AppDatabase
import com.yogeshpaliyal.common.constants.AccountType
import com.yogeshpaliyal.common.data.BackupData
import com.yogeshpaliyal.common.utils.getRandomString
import com.yogeshpaliyal.keypass.constants.AccountType
import com.yogeshpaliyal.keypass.db_helper.EncryptionHelper
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.*
import kotlinx.coroutines.withContext
/*
@@ -1,4 +1,4 @@
package com.yogeshpaliyal.keypass.db_helper
package com.yogeshpaliyal.common.dbhelper
import java.io.IOException
import java.io.InputStream
@@ -6,7 +6,12 @@ import java.io.OutputStream
import java.security.InvalidKeyException
import java.security.Key
import java.security.NoSuchAlgorithmException
import javax.crypto.*
import javax.crypto.BadPaddingException
import javax.crypto.Cipher
import javax.crypto.CipherInputStream
import javax.crypto.CipherOutputStream
import javax.crypto.IllegalBlockSizeException
import javax.crypto.NoSuchPaddingException
import javax.crypto.spec.IvParameterSpec
import javax.crypto.spec.SecretKeySpec
@@ -5,7 +5,7 @@ import android.net.Uri
import android.text.TextUtils
import androidx.documentfile.provider.DocumentFile
import com.yogeshpaliyal.common.AppDatabase
import com.yogeshpaliyal.common.db_helper.createBackup
import com.yogeshpaliyal.common.dbhelper.createBackup
import java.security.SecureRandom
/*
@@ -1,7 +1,8 @@
package com.yogeshpaliyal.common.utils
import java.text.SimpleDateFormat
import java.util.*
import java.util.Calendar
import java.util.Locale
/*
* @author Yogesh Paliyal
@@ -1,6 +1,6 @@
package com.yogeshpaliyal.common.utils
import java.util.*
import java.util.UUID
/*
* @author Yogesh Paliyal
@@ -1,6 +1,6 @@
package com.yogeshpaliyal.common
import org.junit.Assert.*
import org.junit.Assert.assertEquals
import org.junit.Test
/**
@@ -2,7 +2,7 @@ package com.yogeshpaliyal.keypasscompose
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.*
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
@@ -10,7 +10,13 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.Menu
import androidx.compose.material.icons.filled.Star
import androidx.compose.material3.*
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
@@ -3,7 +3,15 @@ package com.yogeshpaliyal.keypasscompose.ui.theme
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.RowScope
import androidx.compose.material.*
import androidx.compose.material.AppBarDefaults
import androidx.compose.material.BottomAppBar
import androidx.compose.material.DrawerDefaults
import androidx.compose.material.FabPosition
import androidx.compose.material.Scaffold
import androidx.compose.material.ScaffoldState
import androidx.compose.material.SnackbarHost
import androidx.compose.material.SnackbarHostState
import androidx.compose.material.rememberScaffoldState
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.contentColorFor
import androidx.compose.runtime.Composable
@@ -1,6 +1,6 @@
package com.yogeshpaliyal.keypasscompose
import org.junit.Assert.*
import org.junit.Assert.assertEquals
import org.junit.Test
/**