mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-24 11:01:35 -08:00
First pass migration SDK 29
This commit is contained in:
1 parent
452e68b08f
commit
e351456bfe
4 files changed
+11
-10
No files matched your search
+4
-4
@@ -4,13 +4,13 @@ apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
buildToolsVersion '28.0.3'
|
||||
compileSdkVersion 29
|
||||
buildToolsVersion '29.0.3'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.kunzisoft.keepass"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 28
|
||||
targetSdkVersion 29
|
||||
versionCode = 28
|
||||
versionName = "2.5beta28"
|
||||
multiDexEnabled true
|
||||
@@ -95,6 +95,7 @@ dependencies {
|
||||
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||
implementation 'androidx.biometric:biometric:1.0.1'
|
||||
// To upgrade with style
|
||||
implementation 'com.google.android.material:material:1.0.0'
|
||||
@@ -118,5 +119,4 @@ dependencies {
|
||||
// Icon pack
|
||||
implementation project(path: ':icon-pack-classic')
|
||||
implementation project(path: ':icon-pack-material')
|
||||
implementation 'androidx.documentfile:documentfile:1.0.1'
|
||||
}
|
||||
@@ -493,10 +493,11 @@ class Database {
|
||||
var outputStream: OutputStream? = null
|
||||
try {
|
||||
outputStream = contentResolver.openOutputStream(uri)
|
||||
val pmo =
|
||||
mDatabaseKDB?.let { DatabaseOutputKDB(it, outputStream) }
|
||||
?: mDatabaseKDBX?.let { DatabaseOutputKDBX(it, outputStream) }
|
||||
pmo?.output()
|
||||
outputStream?.let { definedOutputStream ->
|
||||
val databaseOutput = mDatabaseKDB?.let { DatabaseOutputKDB(it, definedOutputStream) }
|
||||
?: mDatabaseKDBX?.let { DatabaseOutputKDBX(it, definedOutputStream) }
|
||||
databaseOutput?.output()
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
throw IOException(e)
|
||||
} finally {
|
||||
|
||||
@@ -45,7 +45,7 @@ class EntryInfo : Parcelable {
|
||||
password = parcel.readString() ?: password
|
||||
url = parcel.readString() ?: url
|
||||
notes = parcel.readString() ?: notes
|
||||
parcel.readList(customFields, Field::class.java.classLoader)
|
||||
parcel.readList(customFields as List<Field>, Field::class.java.classLoader)
|
||||
otpModel = parcel.readParcelable(OtpModel::class.java.classLoader) ?: otpModel
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ class ClipboardHelper(private val context: Context) {
|
||||
@Throws(ClipboardException::class)
|
||||
fun copyToClipboard(label: String, value: String) {
|
||||
try {
|
||||
getClipboardManager()?.primaryClip = ClipData.newPlainText(label, value)
|
||||
getClipboardManager()?.setPrimaryClip(ClipData.newPlainText(label, value))
|
||||
} catch (e: Exception) {
|
||||
throw ClipboardException(e)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user