浏览代码

OmapiApduInterface: Use 1 as default channel ID

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

+ 2 - 2
app-common/src/main/java/im/angry/openeuicc/core/OmapiApduInterface.kt

@@ -28,11 +28,11 @@ class OmapiApduInterface(
             "Can only open one channel"
         }
         lastChannel = session.openLogicalChannel(aid)!!;
-        return 0;
+        return 1;
     }
 
     override fun logicalChannelClose(handle: Int) {
-        check(handle == 0 && !this::lastChannel.isInitialized) {
+        check(handle == 1 && !this::lastChannel.isInitialized) {
             "Unknown channel"
         }
         lastChannel.close()