浏览代码

EuiccChannelManagerService: Stop throwing exceptions for USB channels when switching

Peter Cai 1 年之前
父节点
当前提交
a87f154653
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      app-common/src/main/java/im/angry/openeuicc/service/EuiccChannelManagerService.kt

+ 2 - 1
app-common/src/main/java/im/angry/openeuicc/service/EuiccChannelManagerService.kt

@@ -476,8 +476,9 @@ class EuiccChannelManagerService : LifecycleService(), OpenEuiccContextMarker {
                     throw RuntimeException("Could not switch profile")
                 }
 
-                if (!refreshed) {
+                if (!refreshed && slotId != EuiccChannelManager.USB_CHANNEL_ID) {
                     // We may have switched the profile, but we could not refresh. Tell the caller about this
+                    // but only if we are talking to a modem and not a USB reader
                     throw SwitchingProfilesRefreshException()
                 }