forked from PeterCxy/OpenEUICC
Compare commits
6 commits
78bf3612ee
...
acce39fd3b
Author | SHA1 | Date | |
---|---|---|---|
acce39fd3b | |||
fb8b6de350 | |||
75221fcf79 | |||
4ae19aea3b | |||
ff6bd45ac6 | |||
858b6d55d6 |
17 changed files with 104 additions and 22 deletions
|
@ -35,11 +35,12 @@ jobs:
|
||||||
- name: Build Debug APKs
|
- name: Build Debug APKs
|
||||||
run: ./gradlew --no-daemon assembleDebug
|
run: ./gradlew --no-daemon assembleDebug
|
||||||
|
|
||||||
|
- name: Copy Artifacts
|
||||||
|
run: find . -name 'app*-debug.apk' -exec cp {} . \;
|
||||||
|
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: https://gitea.angry.im/actions/upload-artifact@v3
|
uses: https://gitea.angry.im/actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Debug APKs
|
name: Debug APKs
|
||||||
compression-level: 0
|
compression-level: 0
|
||||||
path: |
|
path: app*-debug.apk
|
||||||
app-unpriv/build/outputs/apk/debug/app-unpriv-debug.apk
|
|
||||||
app/build/outputs/apk/debug/app-debug.apk
|
|
||||||
|
|
|
@ -52,6 +52,8 @@ class LocalProfileAssistantWrapper(orig: LocalProfileAssistant) :
|
||||||
|
|
||||||
override fun handleNotification(seqNumber: Long): Boolean = lpa.handleNotification(seqNumber)
|
override fun handleNotification(seqNumber: Long): Boolean = lpa.handleNotification(seqNumber)
|
||||||
|
|
||||||
|
override fun euiccMemoryReset() = lpa.euiccMemoryReset()
|
||||||
|
|
||||||
override fun setNickname(iccid: String, nickname: String): Boolean =
|
override fun setNickname(iccid: String, nickname: String): Boolean =
|
||||||
lpa.setNickname(iccid, nickname)
|
lpa.setNickname(iccid, nickname)
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,8 @@ class OmapiApduInterface(
|
||||||
check(!this::lastChannel.isInitialized) {
|
check(!this::lastChannel.isInitialized) {
|
||||||
"Can only open one channel"
|
"Can only open one channel"
|
||||||
}
|
}
|
||||||
lastChannel = session.openLogicalChannel(aid)!!;
|
lastChannel = session.openLogicalChannel(aid)!!
|
||||||
return 1;
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun logicalChannelClose(handle: Int) {
|
override fun logicalChannelClose(handle: Int) {
|
||||||
|
|
|
@ -20,6 +20,7 @@ import android.widget.Toast
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
import androidx.core.view.WindowInsetsCompat
|
import androidx.core.view.WindowInsetsCompat
|
||||||
|
import androidx.core.view.isVisible
|
||||||
import androidx.core.view.updateLayoutParams
|
import androidx.core.view.updateLayoutParams
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
|
@ -339,6 +340,8 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener,
|
||||||
private val name: TextView = root.requireViewById(R.id.name)
|
private val name: TextView = root.requireViewById(R.id.name)
|
||||||
private val state: TextView = root.requireViewById(R.id.state)
|
private val state: TextView = root.requireViewById(R.id.state)
|
||||||
private val provider: TextView = root.requireViewById(R.id.provider)
|
private val provider: TextView = root.requireViewById(R.id.provider)
|
||||||
|
private val profileClassLabel: TextView = root.requireViewById(R.id.profile_class_label)
|
||||||
|
private val profileClass: TextView = root.requireViewById(R.id.profile_class)
|
||||||
private val profileMenu: ImageButton = root.requireViewById(R.id.profile_menu)
|
private val profileMenu: ImageButton = root.requireViewById(R.id.profile_menu)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
@ -364,6 +367,10 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener,
|
||||||
private lateinit var profile: LocalProfileInfo
|
private lateinit var profile: LocalProfileInfo
|
||||||
|
|
||||||
fun setProfile(profile: LocalProfileInfo) {
|
fun setProfile(profile: LocalProfileInfo) {
|
||||||
|
if (unfilteredProfileListFlow.value) {
|
||||||
|
profileClassLabel.isVisible = true
|
||||||
|
profileClass.isVisible = true
|
||||||
|
}
|
||||||
this.profile = profile
|
this.profile = profile
|
||||||
name.text = profile.displayName
|
name.text = profile.displayName
|
||||||
|
|
||||||
|
@ -375,6 +382,13 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
provider.text = profile.providerName
|
provider.text = profile.providerName
|
||||||
|
if (profileClass.isVisible) profileClass.setText(
|
||||||
|
when (profile.profileClass) {
|
||||||
|
LocalProfileInfo.Clazz.Testing -> R.string.profile_class_testing
|
||||||
|
LocalProfileInfo.Clazz.Provisioning -> R.string.profile_class_provisioning
|
||||||
|
LocalProfileInfo.Clazz.Operational -> R.string.profile_class_operational
|
||||||
|
}
|
||||||
|
)
|
||||||
iccid.text = profile.iccid
|
iccid.text = profile.iccid
|
||||||
iccid.transformationMethod = PasswordTransformationMethod.getInstance()
|
iccid.transformationMethod = PasswordTransformationMethod.getInstance()
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ open class MainActivity : BaseEuiccAccessActivity(), OpenEuiccContextMarker {
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean =
|
override fun onOptionsItemSelected(item: MenuItem): Boolean =
|
||||||
when (item.itemId) {
|
when (item.itemId) {
|
||||||
R.id.settings -> {
|
R.id.settings -> {
|
||||||
startActivity(Intent(this, SettingsActivity::class.java));
|
startActivity(Intent(this, SettingsActivity::class.java))
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
R.id.reload -> {
|
R.id.reload -> {
|
||||||
|
|
|
@ -117,11 +117,14 @@ class NotificationsActivity: BaseEuiccAccessActivity(), OpenEuiccContextMarker {
|
||||||
launchTask {
|
launchTask {
|
||||||
notificationAdapter.notifications =
|
notificationAdapter.notifications =
|
||||||
euiccChannelManager.withEuiccChannel(logicalSlotId) { channel ->
|
euiccChannelManager.withEuiccChannel(logicalSlotId) { channel ->
|
||||||
val profiles = channel.lpa.profiles
|
val nameMap = buildMap {
|
||||||
|
for (profile in channel.lpa.profiles) {
|
||||||
|
put(profile.iccid, profile.displayName)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
channel.lpa.notifications.map {
|
channel.lpa.notifications.map {
|
||||||
val profile = profiles.find { p -> p.iccid == it.iccid }
|
LocalProfileNotificationWrapper(it, nameMap[it.iccid] ?: "???")
|
||||||
LocalProfileNotificationWrapper(it, profile?.displayName ?: "???")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,6 +139,8 @@ class NotificationsActivity: BaseEuiccAccessActivity(), OpenEuiccContextMarker {
|
||||||
inner class NotificationViewHolder(private val root: View):
|
inner class NotificationViewHolder(private val root: View):
|
||||||
RecyclerView.ViewHolder(root), View.OnCreateContextMenuListener, OnMenuItemClickListener {
|
RecyclerView.ViewHolder(root), View.OnCreateContextMenuListener, OnMenuItemClickListener {
|
||||||
private val address: TextView = root.requireViewById(R.id.notification_address)
|
private val address: TextView = root.requireViewById(R.id.notification_address)
|
||||||
|
private val sequenceNumber: TextView =
|
||||||
|
root.requireViewById(R.id.notification_sequence_number)
|
||||||
private val profileName: TextView = root.requireViewById(R.id.notification_profile_name)
|
private val profileName: TextView = root.requireViewById(R.id.notification_profile_name)
|
||||||
|
|
||||||
private lateinit var notification: LocalProfileNotificationWrapper
|
private lateinit var notification: LocalProfileNotificationWrapper
|
||||||
|
@ -157,6 +162,7 @@ class NotificationsActivity: BaseEuiccAccessActivity(), OpenEuiccContextMarker {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun operationToLocalizedText(operation: LocalProfileNotification.Operation) =
|
private fun operationToLocalizedText(operation: LocalProfileNotification.Operation) =
|
||||||
root.context.getText(
|
root.context.getText(
|
||||||
when (operation) {
|
when (operation) {
|
||||||
|
@ -170,6 +176,10 @@ class NotificationsActivity: BaseEuiccAccessActivity(), OpenEuiccContextMarker {
|
||||||
notification = value
|
notification = value
|
||||||
|
|
||||||
address.text = value.inner.notificationAddress
|
address.text = value.inner.notificationAddress
|
||||||
|
sequenceNumber.text = root.context.getString(
|
||||||
|
R.string.profile_notification_sequence_number_format,
|
||||||
|
value.inner.seqNumber
|
||||||
|
)
|
||||||
profileName.text = Html.fromHtml(
|
profileName.text = Html.fromHtml(
|
||||||
root.context.getString(R.string.profile_notification_name_format,
|
root.context.getString(R.string.profile_notification_name_format,
|
||||||
operationToLocalizedText(value.inner.profileManagementOperation),
|
operationToLocalizedText(value.inner.profileManagementOperation),
|
||||||
|
|
|
@ -62,18 +62,43 @@
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/state"
|
app:layout_constraintTop_toBottomOf="@id/state"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/iccid_label"/>
|
app:layout_constraintBottom_toTopOf="@+id/profile_class_label"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/provider"
|
android:id="@+id/provider"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="6dp"
|
android:layout_marginTop="6dp"
|
||||||
android:layout_marginLeft="7dp"
|
android:layout_marginStart="7dp"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
app:layout_constraintLeft_toRightOf="@id/provider_label"
|
app:layout_constraintLeft_toRightOf="@id/provider_label"
|
||||||
app:layout_constraintTop_toBottomOf="@id/state"
|
app:layout_constraintTop_toBottomOf="@id/state"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/profile_class"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/profile_class_label"
|
||||||
|
android:text="@string/profile_class"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/provider_label"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/iccid_label"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/profile_class"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:layout_marginStart="7dp"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:singleLine="true"
|
||||||
|
app:layout_constraintLeft_toRightOf="@id/profile_class_label"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/provider"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/iccid"/>
|
app:layout_constraintBottom_toTopOf="@+id/iccid"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -86,7 +111,7 @@
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/provider_label"
|
app:layout_constraintTop_toBottomOf="@id/profile_class_label"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -94,11 +119,11 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="6dp"
|
android:layout_marginTop="6dp"
|
||||||
android:layout_marginLeft="7dp"
|
android:layout_marginStart="7dp"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
app:layout_constraintLeft_toRightOf="@id/iccid_label"
|
app:layout_constraintLeft_toRightOf="@id/iccid_label"
|
||||||
app:layout_constraintTop_toBottomOf="@id/provider"
|
app:layout_constraintTop_toBottomOf="@id/profile_class"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -15,6 +15,15 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/notification_sequence_number"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="24dp"
|
||||||
|
android:layout_marginVertical="12dp"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/notification_profile_name"
|
android:id="@+id/notification_profile_name"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
<string name="enabled">有効済み</string>
|
<string name="enabled">有効済み</string>
|
||||||
<string name="disabled">無効済み</string>
|
<string name="disabled">無効済み</string>
|
||||||
<string name="provider">プロバイダー:</string>
|
<string name="provider">プロバイダー:</string>
|
||||||
<string name="iccid">ICCID:</string>
|
|
||||||
<string name="enable">有効化</string>
|
<string name="enable">有効化</string>
|
||||||
<string name="disable">無効化</string>
|
<string name="disable">無効化</string>
|
||||||
<string name="delete">削除</string>
|
<string name="delete">削除</string>
|
||||||
|
@ -89,7 +88,6 @@
|
||||||
<string name="profile_notification_operation_delete">削除しました</string>
|
<string name="profile_notification_operation_delete">削除しました</string>
|
||||||
<string name="profile_notification_operation_enable">有効化しました</string>
|
<string name="profile_notification_operation_enable">有効化しました</string>
|
||||||
<string name="profile_notification_operation_disable">無効化しました</string>
|
<string name="profile_notification_operation_disable">無効化しました</string>
|
||||||
<string name="profile_notification_name_format"><b>%1$s</b> %2$s (%3$s)</string>
|
|
||||||
<string name="profile_notification_process">処理</string>
|
<string name="profile_notification_process">処理</string>
|
||||||
<string name="profile_notification_delete">削除</string>
|
<string name="profile_notification_delete">削除</string>
|
||||||
<string name="euicc_info">eUICC 情報</string>
|
<string name="euicc_info">eUICC 情報</string>
|
||||||
|
|
|
@ -13,7 +13,11 @@
|
||||||
<string name="enabled">Enabled</string>
|
<string name="enabled">Enabled</string>
|
||||||
<string name="disabled">Disabled</string>
|
<string name="disabled">Disabled</string>
|
||||||
<string name="provider">Provider:</string>
|
<string name="provider">Provider:</string>
|
||||||
<string name="iccid">ICCID:</string>
|
<string name="profile_class">Class:</string>
|
||||||
|
<string name="profile_class_testing">Testing</string>
|
||||||
|
<string name="profile_class_provisioning">Provisioning</string>
|
||||||
|
<string name="profile_class_operational">Operational</string>
|
||||||
|
<string name="iccid" translatable="false">ICCID:</string>
|
||||||
|
|
||||||
<string name="enable">Enable</string>
|
<string name="enable">Enable</string>
|
||||||
<string name="disable">Disable</string>
|
<string name="disable">Disable</string>
|
||||||
|
@ -103,7 +107,8 @@
|
||||||
<string name="profile_notification_operation_delete">Deleted</string>
|
<string name="profile_notification_operation_delete">Deleted</string>
|
||||||
<string name="profile_notification_operation_enable">Enabled</string>
|
<string name="profile_notification_operation_enable">Enabled</string>
|
||||||
<string name="profile_notification_operation_disable">Disabled</string>
|
<string name="profile_notification_operation_disable">Disabled</string>
|
||||||
<string name="profile_notification_name_format"><b>%1$s</b> %2$s (%3$s)</string>
|
<string name="profile_notification_name_format" translatable="false"><b>%1$s</b> %2$s (%3$s)</string>
|
||||||
|
<string name="profile_notification_sequence_number_format" translatable="false">#%d</string>
|
||||||
<string name="profile_notification_process">Process</string>
|
<string name="profile_notification_process">Process</string>
|
||||||
<string name="profile_notification_delete">Delete</string>
|
<string name="profile_notification_delete">Delete</string>
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ class TelephonyManagerApduInterface(
|
||||||
val hex = aid.encodeHex()
|
val hex = aid.encodeHex()
|
||||||
val channel = tm.iccOpenLogicalChannelByPortCompat(port.card.physicalSlotIndex, port.portIndex, hex, 0)
|
val channel = tm.iccOpenLogicalChannelByPortCompat(port.card.physicalSlotIndex, port.portIndex, hex, 0)
|
||||||
if (channel.status != IccOpenLogicalChannelResponse.STATUS_NO_ERROR || channel.channel == IccOpenLogicalChannelResponse.INVALID_CHANNEL) {
|
if (channel.status != IccOpenLogicalChannelResponse.STATUS_NO_ERROR || channel.channel == IccOpenLogicalChannelResponse.INVALID_CHANNEL) {
|
||||||
throw IllegalArgumentException("Cannot open logical channel $hex via TelephonManager on slot ${port.card.physicalSlotIndex} port ${port.portIndex}");
|
throw IllegalArgumentException("Cannot open logical channel $hex via TelephonManager on slot ${port.card.physicalSlotIndex} port ${port.portIndex}")
|
||||||
}
|
}
|
||||||
lastChannel = channel.channel
|
lastChannel = channel.channel
|
||||||
return lastChannel
|
return lastChannel
|
||||||
|
|
|
@ -94,6 +94,7 @@ val TelephonyManager.uiccCardsInfoCompat: List<RealUiccCardInfoCompat>
|
||||||
fun TelephonyManager.iccOpenLogicalChannelByPortCompat(
|
fun TelephonyManager.iccOpenLogicalChannelByPortCompat(
|
||||||
slotIndex: Int, portIndex: Int, aid: String?, p2: Int
|
slotIndex: Int, portIndex: Int, aid: String?, p2: Int
|
||||||
): IccOpenLogicalChannelResponse =
|
): IccOpenLogicalChannelResponse =
|
||||||
|
@Suppress("UNNECESSARY_NOT_NULL_ASSERTION")
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
iccOpenLogicalChannelByPort(slotIndex, portIndex, aid, p2)!!
|
iccOpenLogicalChannelByPort(slotIndex, portIndex, aid, p2)!!
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -16,9 +16,9 @@ android {
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
ndkBuild {
|
ndkBuild {
|
||||||
cFlags(
|
cFlags(
|
||||||
"-fmacro-prefix-map=${project.projectDir.toString()}=/fake/path/",
|
"-fmacro-prefix-map=${project.projectDir}=/fake/path/",
|
||||||
"-fdebug-prefix-map=${project.projectDir.toString()}=/fake/path/",
|
"-fdebug-prefix-map=${project.projectDir}=/fake/path/",
|
||||||
"-ffile-prefix-map=${project.projectDir.toString()}=/fake/path/"
|
"-ffile-prefix-map=${project.projectDir}=/fake/path/"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,8 @@ interface LocalProfileAssistant {
|
||||||
fun deleteNotification(seqNumber: Long): Boolean
|
fun deleteNotification(seqNumber: Long): Boolean
|
||||||
fun handleNotification(seqNumber: Long): Boolean
|
fun handleNotification(seqNumber: Long): Boolean
|
||||||
|
|
||||||
|
fun euiccMemoryReset()
|
||||||
|
|
||||||
fun setNickname(
|
fun setNickname(
|
||||||
iccid: String, nickname: String
|
iccid: String, nickname: String
|
||||||
): Boolean
|
): Boolean
|
||||||
|
|
|
@ -33,6 +33,8 @@ internal object LpacJni {
|
||||||
// Cancel any ongoing es9p and/or es10b sessions
|
// Cancel any ongoing es9p and/or es10b sessions
|
||||||
external fun cancelSessions(handle: Long)
|
external fun cancelSessions(handle: Long)
|
||||||
|
|
||||||
|
// ES10c
|
||||||
|
external fun es10cEuiccMemoryReset(handle: Long): Int
|
||||||
// es10cex (actually part of es10b)
|
// es10cex (actually part of es10b)
|
||||||
external fun es10cexGetEuiccInfo2(handle: Long): Long
|
external fun es10cexGetEuiccInfo2(handle: Long): Long
|
||||||
|
|
||||||
|
|
|
@ -241,6 +241,10 @@ class LocalProfileAssistantImpl(
|
||||||
override fun setNickname(iccid: String, nickname: String): Boolean =
|
override fun setNickname(iccid: String, nickname: String): Boolean =
|
||||||
LpacJni.es10cSetNickname(contextHandle, iccid, nickname) == 0
|
LpacJni.es10cSetNickname(contextHandle, iccid, nickname) == 0
|
||||||
|
|
||||||
|
override fun euiccMemoryReset() {
|
||||||
|
LpacJni.es10cEuiccMemoryReset(contextHandle)
|
||||||
|
}
|
||||||
|
|
||||||
@Synchronized
|
@Synchronized
|
||||||
override fun close() {
|
override fun close() {
|
||||||
if (!finalized) {
|
if (!finalized) {
|
||||||
|
|
|
@ -245,6 +245,15 @@ Java_net_typeblog_lpac_1jni_LpacJni_es10cexGetEuiccInfo2(JNIEnv *env, jobject th
|
||||||
return (jlong) info;
|
return (jlong) info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
JNIEXPORT jint JNICALL
|
||||||
|
Java_net_typeblog_lpac_1jni_LpacJni_es10cEuiccMemoryReset(JNIEnv *env, jobject thiz, jlong handle) {
|
||||||
|
struct euicc_ctx *ctx = (struct euicc_ctx *) handle;
|
||||||
|
int ret;
|
||||||
|
ret = es10c_euicc_memory_reset(ctx);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
JNIEXPORT jstring JNICALL
|
JNIEXPORT jstring JNICALL
|
||||||
Java_net_typeblog_lpac_1jni_LpacJni_stringDeref(JNIEnv *env, jobject thiz, jlong curr) {
|
Java_net_typeblog_lpac_1jni_LpacJni_stringDeref(JNIEnv *env, jobject thiz, jlong curr) {
|
||||||
return toJString(env, *((char **) curr));
|
return toJString(env, *((char **) curr));
|
||||||
|
|
Loading…
Add table
Reference in a new issue