updating gradle, kotlin and some crashfixes

This commit is contained in:
tibbi 2020-04-17 22:23:34 +02:00
parent 85882c5304
commit 2eef96b8f0
5 changed files with 21 additions and 14 deletions

View File

@ -49,7 +49,10 @@ class MainActivity : SimpleActivity() {
Intent(this@MainActivity, RecorderService::class.java).apply {
action = STOP_AMPLITUDE_UPDATE
try {
startService(this)
} catch (ignored: Exception) {
}
}
}

View File

@ -309,8 +309,8 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager
private fun getProgressUpdateTask() = object : TimerTask() {
override fun run() {
if (player != null) {
Handler(Looper.getMainLooper()).post {
if (player != null) {
val progress = Math.round(player!!.currentPosition / 1000.toDouble()).toInt()
updateCurrentProgress(progress)
player_progressbar.progress = progress

View File

@ -111,6 +111,7 @@ class RecorderService : Service() {
isRecording = false
recorder?.apply {
try {
stop()
release()
@ -122,6 +123,9 @@ class RecorderService : Service() {
}
EventBus.getDefault().post(Events.RecordingCompleted())
}
} catch (e: Exception) {
showErrorToast(e)
}
}
recorder = null
}

View File

@ -1,14 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.71'
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.android.tools.build:gradle:3.6.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong