1
0
mirror of https://github.com/tateisu/SubwayTooter synced 2025-01-26 16:56:28 +01:00

- exoPlayerの onPlayerErrorの引数の型をPlaybackExceptionに変更

- detekt 1.18.0
- google-services:4.3.10
This commit is contained in:
tateisu 2021-08-24 07:57:47 +09:00
parent 9d3c36ea0c
commit 2785d66cb1
2 changed files with 10 additions and 6 deletions

View File

@ -144,7 +144,7 @@ class ActMediaViewer : AppCompatActivity(), View.OnClickListener {
log.d("exoPlayer onRepeatModeChanged $repeatMode")
}
override fun onPlayerError(error: ExoPlaybackException) {
override fun onPlayerError(error: PlaybackException) {
log.d("exoPlayer onPlayerError")
showToast(error, "player error.")
}
@ -178,8 +178,8 @@ class ActMediaViewer : AppCompatActivity(), View.OnClickListener {
this.idx = savedInstanceState?.getInt(EXTRA_IDX) ?: intent.getIntExtra(EXTRA_IDX, idx)
this.serviceType = ServiceType.values()[
savedInstanceState?.getInt(EXTRA_SERVICE_TYPE)
?: intent.getIntExtra(EXTRA_SERVICE_TYPE, 0)
savedInstanceState?.getInt(EXTRA_SERVICE_TYPE)
?: intent.getIntExtra(EXTRA_SERVICE_TYPE, 0)
]
this.mediaList = decodeMediaList(
@ -815,7 +815,11 @@ class ActMediaViewer : AppCompatActivity(), View.OnClickListener {
return false
}
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: IntArray) {
override fun onRequestPermissionsResult(
requestCode: Int,
permissions: Array<String>,
grantResults: IntArray,
) {
if (requestCode == PERMISSION_REQUEST_CODE) {
when (permissions.indices.all { grantResults[it] == PackageManager.PERMISSION_GRANTED }) {
false -> showToast(true, R.string.missing_permission_to_access_media)

View File

@ -13,7 +13,7 @@ buildscript {
ext.junit_version='4.13.2'
ext.detekt_version='1.17.1'
ext.detekt_version='1.18.0'
repositories {
google()
@ -22,7 +22,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.google.gms:google-services:4.3.10'
//noinspection DifferentKotlinGradleVersion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"