mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-03-30 11:10:14 +02:00
updating gradle, kotlin and some crashfixes
This commit is contained in:
parent
85882c5304
commit
2eef96b8f0
@ -49,7 +49,10 @@ class MainActivity : SimpleActivity() {
|
||||
|
||||
Intent(this@MainActivity, RecorderService::class.java).apply {
|
||||
action = STOP_AMPLITUDE_UPDATE
|
||||
try {
|
||||
startService(this)
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user