package im.angry.openeuicc.ui import android.view.View import android.view.ViewGroup import android.widget.Button import android.widget.PopupMenu import im.angry.openeuicc.R import im.angry.openeuicc.util.* import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import net.typeblog.lpac_jni.LocalProfileInfo class PrivilegedEuiccManagementFragment: EuiccManagementFragment() { companion object { fun newInstance(slotId: Int, portId: Int): EuiccManagementFragment = newInstanceEuicc(PrivilegedEuiccManagementFragment::class.java, slotId, portId) } override suspend fun onCreateFooterViews(parent: ViewGroup): List = // isMEP can map to a slow operation (UiccCardInfo.isMultipleEnabledProfilesSupported()) // so let's do it in the IO context if (withContext(Dispatchers.IO) { channel.isMEP }) { val view = layoutInflater.inflate(R.layout.footer_mep, parent, false) view.requireViewById