Skip to content

Commit 7a3b018

Browse files
committed
test(SubscriptionControllerComponentTest): fix Kotlin compilation errors
> Task :compileDebugAndroidTestKotlin FAILED e: file:///mnt/storage/projects/7sim/7sim/tests/androidTest/src/java/com/github/iusmac/sevensim/telephony/SubscriptionControllerComponentTest.kt:60:74 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type (Mutable)List<SubscriptionInfo!>? e: file:///mnt/storage/projects/7sim/7sim/tests/androidTest/src/java/com/github/iusmac/sevensim/telephony/SubscriptionControllerComponentTest.kt:119:13 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type (Mutable)List<SubscriptionInfo!>? Signed-off-by: iusmac <iusico.maxim@libero.it>
1 parent 7ee5eef commit 7a3b018

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/androidTest/src/java/com/github/iusmac/sevensim/telephony/SubscriptionControllerComponentTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class SubscriptionControllerComponentTest {
5757
val mHiltRule: HiltAndroidRule = HiltAndroidRule(this)
5858

5959
private val mSubId: Int by lazy() {
60-
val subInfo = mSubscriptionManager.selectableSubscriptionInfoList.firstOrNull()
60+
val subInfo = mSubscriptionManager.selectableSubscriptionInfoList!!.firstOrNull()
6161
subInfo?.subscriptionId ?: INVALID_SUBSCRIPTION_ID
6262
}
6363

@@ -115,7 +115,7 @@ class SubscriptionControllerComponentTest {
115115
}
116116

117117
private fun areUiccApplicationsEnabled() = with(mSubscriptionManager) {
118-
getSelectableSubscriptionInfoList()
118+
selectableSubscriptionInfoList!!
119119
.first { sub -> sub.subscriptionId == mSubId }
120120
.areUiccApplicationsEnabled()
121121
}

0 commit comments

Comments
 (0)