Filter all profiles that are not operational

This commit is contained in:
Peter Cai 2022-05-11 20:30:57 -04:00
parent ac2d2415ab
commit cc7f9a2957
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@ class OpenEuiccService : EuiccService() {
override fun onGetEuiccProfileInfoList(slotId: Int): GetEuiccProfileInfoListResult? { override fun onGetEuiccProfileInfoList(slotId: Int): GetEuiccProfileInfoListResult? {
val channel = findChannel(slotId) ?: return null val channel = findChannel(slotId) ?: return null
val profiles = channel.lpa.profiles.filter { val profiles = channel.lpa.profiles.filter {
it.profileClass != LocalProfileInfo.Clazz.Testing it.profileClass == LocalProfileInfo.Clazz.Operational
}.map { }.map {
EuiccProfileInfo.Builder(it.iccidLittleEndian).apply { EuiccProfileInfo.Builder(it.iccidLittleEndian).apply {
setProfileName(it.name) setProfileName(it.name)

View file

@ -81,7 +81,7 @@ class EuiccManagementFragment : Fragment(), EuiccFragmentMarker, EuiccProfilesCh
} }
withContext(Dispatchers.Main) { withContext(Dispatchers.Main) {
adapter.profiles = profiles.filter { it.profileClass != LocalProfileInfo.Clazz.Testing } adapter.profiles = profiles.filter { it.profileClass == LocalProfileInfo.Clazz.Operational }
adapter.notifyDataSetChanged() adapter.notifyDataSetChanged()
binding.swipeRefresh.isRefreshing = false binding.swipeRefresh.isRefreshing = false
} }