ソースを参照

OmapiApduInterface: Use 1 as default channel ID

Peter Cai 2 年 前
コミット
c6dc44c0e3

+ 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()