Compare commits
2 commits
14b1352b8a
...
cc7f9a2957
Author | SHA1 | Date | |
---|---|---|---|
cc7f9a2957 | |||
ac2d2415ab |
2 changed files with 5 additions and 5 deletions
|
@ -52,8 +52,9 @@ class OpenEuiccService : EuiccService() {
|
|||
}
|
||||
|
||||
override fun onGetEuiccProfileInfoList(slotId: Int): GetEuiccProfileInfoListResult? {
|
||||
val profiles = (findChannel(slotId) ?: return null).lpa.profiles.filter {
|
||||
it.profileClass != LocalProfileInfo.Clazz.Testing
|
||||
val channel = findChannel(slotId) ?: return null
|
||||
val profiles = channel.lpa.profiles.filter {
|
||||
it.profileClass == LocalProfileInfo.Clazz.Operational
|
||||
}.map {
|
||||
EuiccProfileInfo.Builder(it.iccidLittleEndian).apply {
|
||||
setProfileName(it.name)
|
||||
|
@ -75,8 +76,7 @@ class OpenEuiccService : EuiccService() {
|
|||
}.build()
|
||||
}
|
||||
|
||||
// TODO: Does isRemovable matter? Will Android even query us for removable SIMs?
|
||||
return GetEuiccProfileInfoListResult(RESULT_OK, profiles.toTypedArray(), false)
|
||||
return GetEuiccProfileInfoListResult(RESULT_OK, profiles.toTypedArray(), channel.removable)
|
||||
}
|
||||
|
||||
override fun onGetEuiccInfo(slotId: Int): EuiccInfo {
|
||||
|
|
|
@ -81,7 +81,7 @@ class EuiccManagementFragment : Fragment(), EuiccFragmentMarker, EuiccProfilesCh
|
|||
}
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
adapter.profiles = profiles.filter { it.profileClass != LocalProfileInfo.Clazz.Testing }
|
||||
adapter.profiles = profiles.filter { it.profileClass == LocalProfileInfo.Clazz.Operational }
|
||||
adapter.notifyDataSetChanged()
|
||||
binding.swipeRefresh.isRefreshing = false
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue