iccCloseLogicalChannelByPort method signature #154

Closed
opened 2025-03-05 10:56:59 +01:00 by septs · 2 comments
Contributor

Implementation

fun TelephonyManager.iccCloseLogicalChannelBySlot(slotId: Int, channel: Int): Boolean =
iccCloseLogicalChannelBySlot.invoke(this, slotId, channel) as Boolean
fun TelephonyManager.iccCloseLogicalChannelByPort(slotId: Int, portId: Int, channel: Int): Boolean =
iccCloseLogicalChannelByPort.invoke(this, slotId, portId, channel) as Boolean

Correct signature

public boolean iccCloseLogicalChannelBySlot(int slotIndex, int channel)

from 2a6357c537/telephony/java/android/telephony/TelephonyManager.java (7589)

public void iccCloseLogicalChannelByPort(int slotIndex, int portIndex, int channel)

from 2a6357c537/telephony/java/android/telephony/TelephonyManager.java (7632)

## Implementation https://gitea.angry.im/PeterCxy/OpenEUICC/src/commit/d5aefcaec740c7fd646912612eefbb49cee2ad12/libs/hidden-apis-shim/src/main/java/im/angry/openeuicc/util/TelephonyManagerHiddenApi.kt#L72-L76 ## Correct signature ``` public boolean iccCloseLogicalChannelBySlot(int slotIndex, int channel) ``` from https://android.googlesource.com/platform/frameworks/base/+/2a6357c5377a6d793f8f0038f2c821eeba197e16/telephony/java/android/telephony/TelephonyManager.java#7589 ``` public void iccCloseLogicalChannelByPort(int slotIndex, int portIndex, int channel) ``` from https://android.googlesource.com/platform/frameworks/base/+/2a6357c5377a6d793f8f0038f2c821eeba197e16/telephony/java/android/telephony/TelephonyManager.java#7632
Author
Contributor
![image](/attachments/0abad0ee-5698-4387-9e98-586c17d12650) from https://t.me/accxqac
436 KiB
Author
Contributor

override fun logicalChannelClose(handle: Int) {
check(channels.contains(handle)) {
"Invalid logical channel handle $handle"
}
tm.iccCloseLogicalChannelByPortCompat(port.card.physicalSlotIndex, port.portIndex, handle)
channels.remove(handle)
}

The return value should be ignored and treated as void type.

https://gitea.angry.im/PeterCxy/OpenEUICC/src/commit/d5aefcaec740c7fd646912612eefbb49cee2ad12/app/src/main/java/im/angry/openeuicc/core/TelephonyManagerApduInterface.kt#L44-L50 The return value should be ignored and treated as void type.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: PeterCxy/OpenEUICC#154
No description provided.