Skip to content

Commit

Permalink
Remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
dturner committed Aug 10, 2020
1 parent e227934 commit b6bc9c3
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions app/src/main/java/com/example/android/uamp/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ import com.google.android.gms.dynamite.DynamiteModule

class MainActivity : AppCompatActivity() {

//private val TAG = MainActivity::class.simpleName

private lateinit var viewModel: MainActivityViewModel
private var castContext: CastContext? = null

Expand All @@ -45,22 +43,6 @@ class MainActivity : AppCompatActivity() {
// created in the AppBar
castContext = CastContext.getSharedInstance(this)

// Getting the cast context later than onStart can cause device discovery not to take place.
try {
castContext = CastContext.getSharedInstance(this)
} catch (e: RuntimeException) {
var cause = e.cause
while (cause != null) {
if (cause is DynamiteModule.LoadingException) {
setContentView(R.layout.cast_context_error)
return
}
cause = cause.cause
}
throw e
}


setContentView(R.layout.activity_main)

// Since UAMP is a music player, the volume controls should adjust the music volume while
Expand Down

0 comments on commit b6bc9c3

Please sign in to comment.