[Cleanup] Fixing Warnings

This commit is contained in:
Prathamesh More 2021-11-27 14:06:49 +05:30
parent 1fdd537253
commit fa976b1cba
68 changed files with 242 additions and 498 deletions

View file

@ -11,6 +11,7 @@ import com.google.android.gms.cast.MediaInfo.STREAM_TYPE_BUFFERED
import com.google.android.gms.cast.MediaMetadata.*
import com.google.android.gms.cast.framework.CastSession
import com.google.android.gms.common.images.WebImage
import org.json.JSONObject
import java.net.MalformedURLException
import java.net.URL
@ -41,7 +42,7 @@ object CastHelper {
position,
MediaStatus.REPEAT_MODE_REPEAT_OFF,
progress,
null
JSONObject()
)
} catch (e: Exception) {
e.printStackTrace()

View file

@ -13,7 +13,7 @@ class ExpandedControlsActivity : ExpandedControllerActivity() {
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
super.onCreateOptionsMenu(menu)
menuInflater.inflate(R.menu.menu_cast, menu)
CastButtonFactory.setUpMediaRouteButton(this, menu, R.id.action_cast)
CastButtonFactory.setUpMediaRouteButton(this, menu!!, R.id.action_cast)
return true
}
}

View file

@ -17,7 +17,7 @@ class RetroWebServer(val context: Context) : NanoHTTPD(SERVER_PORT) {
const val PART_COVER_ART = "coverart"
const val PART_SONG = "song"
const val PARAM_ID = "id"
var mRetroWebServer: RetroWebServer? = null
private var mRetroWebServer: RetroWebServer? = null
fun getInstance(context: Context): RetroWebServer {
if (mRetroWebServer == null) {
mRetroWebServer = RetroWebServer(context)