|
|
@@ -35,7 +35,6 @@ import kotlinx.coroutines.launch
|
|
|
import kotlinx.coroutines.withContext
|
|
|
import kotlinx.coroutines.withTimeoutOrNull
|
|
|
import kotlinx.coroutines.yield
|
|
|
-import net.typeblog.lpac_jni.HttpInterface
|
|
|
import net.typeblog.lpac_jni.ProfileDownloadCallback
|
|
|
|
|
|
/**
|
|
|
@@ -371,10 +370,6 @@ class EuiccChannelManagerService : LifecycleService(), OpenEuiccContextMarker {
|
|
|
.collect()
|
|
|
}
|
|
|
|
|
|
- data class ProfileDownloadException(
|
|
|
- val lastHttpResponse: HttpInterface.HttpResponse?
|
|
|
- ) : Exception("Failed to download profile")
|
|
|
-
|
|
|
fun launchProfileDownloadTask(
|
|
|
slotId: Int,
|
|
|
portId: Int,
|
|
|
@@ -390,7 +385,7 @@ class EuiccChannelManagerService : LifecycleService(), OpenEuiccContextMarker {
|
|
|
) {
|
|
|
euiccChannelManager.beginTrackedOperation(slotId, portId) {
|
|
|
euiccChannelManager.withEuiccChannel(slotId, portId) { channel ->
|
|
|
- val res = channel.lpa.downloadProfile(
|
|
|
+ channel.lpa.downloadProfile(
|
|
|
smdp,
|
|
|
matchingId,
|
|
|
imei,
|
|
|
@@ -402,12 +397,6 @@ class EuiccChannelManagerService : LifecycleService(), OpenEuiccContextMarker {
|
|
|
ForegroundTaskState.InProgress(state.progress)
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
- if (!res) {
|
|
|
- throw ProfileDownloadException(
|
|
|
- channel.lpa.lastHttpResponse
|
|
|
- )
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
preferenceRepository.notificationDownloadFlow.first()
|