Update AndroidX dependencies and fix small warning

This commit is contained in:
J-Jamet
2020-03-08 09:17:18 +01:00
parent 9412f8955e
commit 53eac86a95
2 changed files with 8 additions and 6 deletions

View File

@@ -79,7 +79,7 @@ android {
} }
def spongycastleVersion = "1.58.0.0" def spongycastleVersion = "1.58.0.0"
def room_version = "2.2.1" def room_version = "2.2.4"
dependencies { dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
@@ -88,7 +88,8 @@ dependencies {
implementation 'androidx.legacy:legacy-preference-v14:1.0.0' implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.biometric:biometric:1.0.0' implementation 'androidx.biometric:biometric:1.0.1'
// To upgrade with style
implementation 'com.google.android.material:material:1.0.0' implementation 'com.google.android.material:material:1.0.0'
implementation "androidx.room:room-runtime:$room_version" implementation "androidx.room:room-runtime:$room_version"
@@ -110,4 +111,5 @@ dependencies {
// Icon pack // Icon pack
implementation project(path: ':icon-pack-classic') implementation project(path: ':icon-pack-classic')
implementation project(path: ':icon-pack-material') implementation project(path: ':icon-pack-material')
implementation 'androidx.documentfile:documentfile:1.0.1'
} }

View File

@@ -102,16 +102,16 @@ class HashedBlockOutputStream : OutputStream {
bufferIndex++ bufferIndex++
if (bufferPos > 0) { if (bufferPos > 0) {
var md: MessageDigest? = null val messageDigest: MessageDigest
try { try {
md = MessageDigest.getInstance("SHA-256") messageDigest = MessageDigest.getInstance("SHA-256")
} catch (e: NoSuchAlgorithmException) { } catch (e: NoSuchAlgorithmException) {
throw IOException("SHA-256 not implemented here.") throw IOException("SHA-256 not implemented here.")
} }
val hash: ByteArray val hash: ByteArray
md!!.update(buffer, 0, bufferPos) messageDigest.update(buffer, 0, bufferPos)
hash = md.digest() hash = messageDigest.digest()
/* /*
if ( bufferPos == buffer.length) { if ( bufferPos == buffer.length) {
hash = md.digest(buffer); hash = md.digest(buffer);