fixed the_stream_is_down not playing (IMPORTANT). Shrink release APK.

remotes/origin/devel
yattoz 2019-12-13 23:51:53 +01:00
parent a971343c3b
commit d1781b908d
3 changed files with 9 additions and 9 deletions

View File

@ -36,7 +36,8 @@ android {
} }
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
} }
@ -65,7 +66,6 @@ dependencies {
implementation "androidx.media:media:1.1.0" implementation "androidx.media:media:1.1.0"
implementation 'com.google.android.exoplayer:exoplayer:2.11.0' implementation 'com.google.android.exoplayer:exoplayer:2.11.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0'
@ -78,10 +78,6 @@ dependencies {
// RSS parser library @ https://github.com/prof18/RSS-Parser // RSS parser library @ https://github.com/prof18/RSS-Parser
implementation 'com.prof.rssparser:rssparser:2.0.4' implementation 'com.prof.rssparser:rssparser:2.0.4'
def work_version = "2.2.0"
implementation "androidx.work:work-runtime-ktx:$work_version"
// new implems // new implems
implementation deps.kotlin.stdlib implementation deps.kotlin.stdlib
implementation deps.support.app_compat implementation deps.support.app_compat

View File

@ -433,6 +433,7 @@ class RadioService : MediaBrowserServiceCompat() {
{ {
Thread.sleep(1000) Thread.sleep(1000)
i++ i++
Log.d(tag, "$i, isAlarmStopped=$isAlarmStopped")
} }
} }
val post: (Any?) -> Unit = { val post: (Any?) -> Unit = {
@ -516,9 +517,12 @@ class RadioService : MediaBrowserServiceCompat() {
// stop playing but keep the notification. // stop playing but keep the notification.
fun stopPlaying() fun stopPlaying()
{ {
isAlarmStopped = true
if (mediaSession.controller.playbackState.state == PlaybackStateCompat.STATE_STOPPED) if (mediaSession.controller.playbackState.state == PlaybackStateCompat.STATE_STOPPED)
return // nothing to do here return // nothing to do here
if (PlayerStore.instance.playbackState.value == PlaybackStateCompat.STATE_PLAYING)
isAlarmStopped = true
PlayerStore.instance.playbackState.value = PlaybackStateCompat.STATE_STOPPED PlayerStore.instance.playbackState.value = PlaybackStateCompat.STATE_STOPPED
// STOP THE PLAYBACK // STOP THE PLAYBACK

View File

@ -35,9 +35,9 @@ class Song(artistTitle: String = "", _id : Int = 0) {
title.value = data.substring(hyphenPos + 3) title.value = data.substring(hyphenPos + 3)
} catch (e: Exception) { } catch (e: Exception) {
if (artist.value != "") if (artist.value != "")
artist.value = "" artist.postValue("")
if (title.value != data) if (title.value != data)
title.value = data title.postValue(data)
} }
} }