mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
crash fixes
This commit is contained in:
parent
3b7327f27e
commit
a6c96c9647
4 changed files with 11 additions and 9 deletions
|
@ -13,8 +13,8 @@ android {
|
||||||
applicationId "com.lagradost.cloudstream3"
|
applicationId "com.lagradost.cloudstream3"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 3
|
versionCode 5
|
||||||
versionName "1.1.1"
|
versionName "1.1.3"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
</receiver>
|
</receiver>
|
||||||
<service
|
<service
|
||||||
android:name=".services.VideoDownloadKeepAliveService"
|
android:name=".services.VideoDownloadKeepAliveService"
|
||||||
android:enabled="true" >
|
android:enabled="false" >
|
||||||
</service>
|
</service>
|
||||||
<service
|
<service
|
||||||
android:name=".services.VideoDownloadService"
|
android:name=".services.VideoDownloadService"
|
||||||
|
|
|
@ -14,10 +14,10 @@ class VideoDownloadRestartReceiver : BroadcastReceiver() {
|
||||||
override fun onReceive(context: Context?, intent: Intent?) {
|
override fun onReceive(context: Context?, intent: Intent?) {
|
||||||
Log.i("Broadcast Listened", "Service tried to stop")
|
Log.i("Broadcast Listened", "Service tried to stop")
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
context?.startForegroundService(Intent(context, VideoDownloadKeepAliveService::class.java).putExtra(START_VALUE_KEY, RESTART_ALL_DOWNLOADS_AND_QUEUE))
|
// context?.startForegroundService(Intent(context, VideoDownloadKeepAliveService::class.java).putExtra(START_VALUE_KEY, RESTART_ALL_DOWNLOADS_AND_QUEUE))
|
||||||
} else {
|
// } else {
|
||||||
context?.startService(Intent(context, VideoDownloadKeepAliveService::class.java).putExtra(START_VALUE_KEY, RESTART_ALL_DOWNLOADS_AND_QUEUE))
|
// context?.startService(Intent(context, VideoDownloadKeepAliveService::class.java).putExtra(START_VALUE_KEY, RESTART_ALL_DOWNLOADS_AND_QUEUE))
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1345,7 +1345,9 @@ class PlayerFragment : Fragment() {
|
||||||
outState.putBoolean(STATE_PLAYER_PLAYING, isPlayerPlaying)
|
outState.putBoolean(STATE_PLAYER_PLAYING, isPlayerPlaying)
|
||||||
outState.putInt(RESIZE_MODE_KEY, resizeMode)
|
outState.putInt(RESIZE_MODE_KEY, resizeMode)
|
||||||
outState.putFloat(PLAYBACK_SPEED, playbackSpeed)
|
outState.putFloat(PLAYBACK_SPEED, playbackSpeed)
|
||||||
|
if(!isDownloadedFile) {
|
||||||
outState.putString("data", mapper.writeValueAsString(playerData))
|
outState.putString("data", mapper.writeValueAsString(playerData))
|
||||||
|
}
|
||||||
super.onSaveInstanceState(outState)
|
super.onSaveInstanceState(outState)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue