forked from PeterCxy/OpenEUICC
lpac-jni: Mark network-related LPA methods as synchronized
These methods rely on non-thread-safe internal states within lpac's context.
This commit is contained in:
parent
a1b2643625
commit
62e3e41c52
|
@ -115,6 +115,7 @@ class LocalProfileAssistantImpl(
|
||||||
return LpacJni.es10cDeleteProfile(contextHandle, iccid) == 0
|
return LpacJni.es10cDeleteProfile(contextHandle, iccid) == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Synchronized
|
||||||
override fun downloadProfile(smdp: String, matchingId: String?, imei: String?,
|
override fun downloadProfile(smdp: String, matchingId: String?, imei: String?,
|
||||||
confirmationCode: String?, callback: ProfileDownloadCallback): Boolean {
|
confirmationCode: String?, callback: ProfileDownloadCallback): Boolean {
|
||||||
return LpacJni.downloadProfile(contextHandle, smdp, matchingId, imei, confirmationCode, callback) == 0
|
return LpacJni.downloadProfile(contextHandle, smdp, matchingId, imei, confirmationCode, callback) == 0
|
||||||
|
@ -123,6 +124,7 @@ class LocalProfileAssistantImpl(
|
||||||
override fun deleteNotification(seqNumber: Long): Boolean =
|
override fun deleteNotification(seqNumber: Long): Boolean =
|
||||||
LpacJni.es10bDeleteNotification(contextHandle, seqNumber) == 0
|
LpacJni.es10bDeleteNotification(contextHandle, seqNumber) == 0
|
||||||
|
|
||||||
|
@Synchronized
|
||||||
override fun handleNotification(seqNumber: Long): Boolean =
|
override fun handleNotification(seqNumber: Long): Boolean =
|
||||||
LpacJni.handleNotification(contextHandle, seqNumber).also {
|
LpacJni.handleNotification(contextHandle, seqNumber).also {
|
||||||
Log.d(TAG, "handleNotification $seqNumber = $it")
|
Log.d(TAG, "handleNotification $seqNumber = $it")
|
||||||
|
|
Loading…
Reference in a new issue