diff --git a/amazon-chime-sdk/build.gradle b/amazon-chime-sdk/build.gradle index d565c810..2a85d15d 100644 --- a/amazon-chime-sdk/build.gradle +++ b/amazon-chime-sdk/build.gradle @@ -7,7 +7,6 @@ import org.jetbrains.dokka.gradle.DokkaTask apply from: rootProject.file('publishing.gradle') apply plugin: 'com.android.library' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' apply plugin: 'org.jetbrains.dokka' apply plugin: 'jacoco' @@ -39,7 +38,7 @@ android { kotlinOptions { jvmTarget = '1.8' - freeCompilerArgs += ["-Xjvm-default=enable"] + freeCompilerArgs += ["-Xjvm-default=all"] } buildTypes { @@ -61,6 +60,10 @@ android { jacoco { includeNoLocationClasses = true } + jvmArgs( + "--add-opens", "java.base/java.util=ALL-UNNAMED", + "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED" + ) } // This causes system calls to return default (i.e. null or zero) values rather then // immediately throwing exceptions. Without this, tests covering anything with significant OpenGLES or @@ -145,11 +148,11 @@ dependencies { implementation 'com.google.code.gson:gson:2.9.0' testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.3' testImplementation 'junit:junit:4.12' - testImplementation "io.mockk:mockk:1.10.0" + testImplementation "io.mockk:mockk:1.13.12" // Android Test only androidTestImplementation 'androidx.test:core:1.3.0' androidTestImplementation 'androidx.test:runner:1.3.0' androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'io.mockk:mockk-android:1.10.0' + androidTestImplementation 'io.mockk:mockk-android:1.13.12' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.1.0' } diff --git a/amazon-chime-sdk/src/main/java/com/amazonaws/services/chime/sdk/meetings/internal/audio/DefaultAudioClientObserver.kt b/amazon-chime-sdk/src/main/java/com/amazonaws/services/chime/sdk/meetings/internal/audio/DefaultAudioClientObserver.kt index 329b2af1..9bff84fb 100644 --- a/amazon-chime-sdk/src/main/java/com/amazonaws/services/chime/sdk/meetings/internal/audio/DefaultAudioClientObserver.kt +++ b/amazon-chime-sdk/src/main/java/com/amazonaws/services/chime/sdk/meetings/internal/audio/DefaultAudioClientObserver.kt @@ -131,7 +131,9 @@ class DefaultAudioClientObserver( meetingStatsCollector.incrementPoorConnectionCount() notifyAudioClientObserver { observer -> observer.onConnectionBecamePoor() } } + else -> Unit } + else -> Unit } } SessionStateControllerAction.Reconnecting -> { @@ -156,8 +158,10 @@ class DefaultAudioClientObserver( } handleOnAudioSessionFailed(newAudioStatus) } + else -> Unit } } + else -> Unit } currentAudioState = newAudioState currentAudioStatus = newAudioStatus diff --git a/amazon-chime-sdk/src/main/java/com/amazonaws/services/chime/sdk/meetings/utils/logger/ConsoleLogger.kt b/amazon-chime-sdk/src/main/java/com/amazonaws/services/chime/sdk/meetings/utils/logger/ConsoleLogger.kt index ca34d532..c2318cde 100644 --- a/amazon-chime-sdk/src/main/java/com/amazonaws/services/chime/sdk/meetings/utils/logger/ConsoleLogger.kt +++ b/amazon-chime-sdk/src/main/java/com/amazonaws/services/chime/sdk/meetings/utils/logger/ConsoleLogger.kt @@ -64,6 +64,7 @@ class ConsoleLogger(private var level: LogLevel = LogLevel.INFO) : Logger { LogLevel.INFO -> Log.i(tag, msg) LogLevel.WARN -> Log.w(tag, msg) LogLevel.ERROR -> Log.e(tag, msg) + else -> Unit } } } diff --git a/app/build.gradle b/app/build.gradle index a88f80df..687d2d41 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,11 +7,9 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' - android { - compileSdkVersion project.ext.chimeCompileSdkVersion - buildToolsVersion project.ext.chimeBuildToolsVersion + compileSdk project.ext.chimeCompileSdkVersion + buildToolsVersion = project.ext.chimeBuildToolsVersion defaultConfig { applicationId "com.amazonaws.services.chime.sdkdemo" minSdkVersion project.ext.chimeMinSdkVersion @@ -29,6 +27,9 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + buildFeatures { + viewBinding true + } } dependencies { diff --git a/app/src/main/java/com/amazonaws/services/chime/sdkdemo/adapter/CaptionAdapter.kt b/app/src/main/java/com/amazonaws/services/chime/sdkdemo/adapter/CaptionAdapter.kt index 06d51737..798f8ad1 100644 --- a/app/src/main/java/com/amazonaws/services/chime/sdkdemo/adapter/CaptionAdapter.kt +++ b/app/src/main/java/com/amazonaws/services/chime/sdkdemo/adapter/CaptionAdapter.kt @@ -18,9 +18,8 @@ import androidx.recyclerview.widget.RecyclerView import com.amazonaws.services.chime.sdk.meetings.audiovideo.TranscriptItemType import com.amazonaws.services.chime.sdkdemo.R import com.amazonaws.services.chime.sdkdemo.data.Caption +import com.amazonaws.services.chime.sdkdemo.databinding.RowCaptionBinding import com.amazonaws.services.chime.sdkdemo.utils.inflate -import kotlinx.android.synthetic.main.row_caption.view.captionText -import kotlinx.android.synthetic.main.row_caption.view.speakerName class CaptionAdapter( private val captions: Collection