Migrate to API 28

This commit is contained in:
J-Jamet
2019-08-29 13:58:59 +02:00
parent 02429d5790
commit 2c4a7e5576
5 changed files with 16 additions and 14 deletions

View File

@@ -4,13 +4,13 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 27
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.kunzisoft.keepass"
minSdkVersion 14
targetSdkVersion 27
targetSdkVersion 28
versionCode = 23
versionName = "2.5.0.0beta23"
multiDexEnabled true
@@ -79,7 +79,7 @@ android {
}
}
def supportVersion = "27.1.1"
def supportVersion = "28.0.0"
def spongycastleVersion = "1.58.0.0"
def room_version = "1.1.1"
@@ -110,7 +110,7 @@ dependencies {
implementation 'biz.source_code:base64coder:2010-12-19'
// IO-Extras
implementation 'com.github.davidmoten:io-extras:0.1'
implementation 'com.google.code.gson:gson:2.8.4'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.guava:guava:23.0-android'
// Icon pack
implementation project(path: ':icon-pack-classic')

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.kunzisoft.keepass"
android:installLocation="auto">
<supports-screens
@@ -8,6 +7,7 @@
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.VIBRATE"/>

View File

@@ -183,7 +183,7 @@ class GroupActivity : LockingActivity(),
// Attach fragment to content view
supportFragmentManager.beginTransaction().replace(
R.id.nodes_list_fragment_container,
mListNodesFragment,
mListNodesFragment!!,
fragmentTag)
.commit()

View File

@@ -130,7 +130,7 @@ class ListNodesFragment : StylishFragment(), SortDialogFragment.SortSelectionLis
onScrollListener?.let { onScrollListener ->
listView?.addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
super.onScrolled(recyclerView, dx, dy)
onScrollListener.onScrolled(dy)
}

View File

@@ -52,17 +52,19 @@ open class FileInfo : Serializable {
fun init() {
this.filePath = fileUri.path
if (EXTERNAL_STORAGE_AUTHORITY == fileUri.authority) {
val file = DocumentFile.fromSingleUri(context, fileUri)
size = file.length()
fileName = file.name
lastModification = Date(file.lastModified())
} else {
filePath?.let {
val file = File(it)
DocumentFile.fromSingleUri(context, fileUri)?.let { file ->
size = file.length()
fileName = file.name
lastModification = Date(file.lastModified())
}
} else {
filePath?.let {
File(it).let { file ->
size = file.length()
fileName = file.name
lastModification = Date(file.lastModified())
}
}
}
if (fileName == null || fileName!!.isEmpty()) {