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
				
			
		|  | @ -45,7 +45,7 @@ | |||
|         </receiver> | ||||
|         <service | ||||
|                 android:name=".services.VideoDownloadKeepAliveService" | ||||
|                 android:enabled="true" > | ||||
|                 android:enabled="false" > | ||||
|         </service> | ||||
|         <service | ||||
|                 android:name=".services.VideoDownloadService" | ||||
|  |  | |||
|  | @ -14,10 +14,10 @@ class VideoDownloadRestartReceiver : BroadcastReceiver() { | |||
|     override fun onReceive(context: Context?, intent: Intent?) { | ||||
|         Log.i("Broadcast Listened", "Service tried to stop") | ||||
| 
 | ||||
|         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)) | ||||
|         } else { | ||||
|             context?.startService(Intent(context, VideoDownloadKeepAliveService::class.java).putExtra(START_VALUE_KEY, RESTART_ALL_DOWNLOADS_AND_QUEUE)) | ||||
|         } | ||||
| //        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)) | ||||
| //        } else { | ||||
| //            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.putInt(RESIZE_MODE_KEY, resizeMode) | ||||
|         outState.putFloat(PLAYBACK_SPEED, playbackSpeed) | ||||
|         outState.putString("data", mapper.writeValueAsString(playerData)) | ||||
|         if(!isDownloadedFile) { | ||||
|             outState.putString("data", mapper.writeValueAsString(playerData)) | ||||
|         } | ||||
|         super.onSaveInstanceState(outState) | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue