浏览代码

fix: Don't even try to open channels on multiple SEs unless vendor implementation exists

Peter Cai 1 月之前
父节点
当前提交
e60f98fdef
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      app-common/src/main/java/im/angry/openeuicc/core/DefaultEuiccChannelManager.kt

+ 4 - 3
app-common/src/main/java/im/angry/openeuicc/core/DefaultEuiccChannelManager.kt

@@ -100,9 +100,10 @@ open class DefaultEuiccChannelManager(
                     ret.add(channel)
                     openedAids.add(aid)
 
-                    // This only exists because the UI side doesn't yet support multi-SE over USB readers properly.
-                    // TODO: Fix that and remove this.
-                    if (!supportsMultiSE) {
+                    // Don't try opening more than 1 channel unless we support multi SE or
+                    // there is a vendor implementation for deciding when we should stop
+                    // opening more channels
+                    if (!supportsMultiSE || vendorDecider == null) {
                         break@outer
                     }
                 }