OpenEuiccService: prevent crashing when AOSP queries an unmapped slot
All checks were successful
/ build-debug (push) Successful in 5m53s
All checks were successful
/ build-debug (push) Successful in 5m53s
To properly fix this we need to temporarily enable disabled slots when they are requested by AOSP. For now let's just stop OpenEUICC from crashing.
This commit is contained in:
parent
6e590cfd48
commit
8b38a5a58d
|
@ -131,7 +131,12 @@ class OpenEuiccService : EuiccService(), OpenEuiccContextMarker {
|
|||
return GetEuiccProfileInfoListResult(RESULT_FIRST_USER, arrayOf(), true)
|
||||
}
|
||||
|
||||
val channel = findChannel(slotId)!!
|
||||
// TODO: Temporarily enable the slot to access its profiles if it is currently unmapped
|
||||
val channel = findChannel(slotId) ?: return GetEuiccProfileInfoListResult(
|
||||
RESULT_FIRST_USER,
|
||||
arrayOf(),
|
||||
true
|
||||
)
|
||||
val profiles = channel.lpa.profiles.operational.map {
|
||||
EuiccProfileInfo.Builder(it.iccid).apply {
|
||||
setProfileName(it.name)
|
||||
|
|
Loading…
Reference in a new issue