diff --git a/app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt b/app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt index 016e96f..f06745d 100644 --- a/app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt +++ b/app-common/src/main/java/im/angry/openeuicc/ui/EuiccManagementFragment.kt @@ -57,6 +57,7 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener, private lateinit var fab: FloatingActionButton private lateinit var profileList: RecyclerView private var logicalSlotId: Int = -1 + private var enabledProfile: LocalProfileInfo? = null private lateinit var eid: String private val adapter = EuiccProfileAdapter() @@ -141,7 +142,7 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener, menu.findItem(R.id.euicc_info).isVisible = logicalSlotId != -1 menu.findItem(R.id.euicc_memory_reset).isVisible = - runBlocking { preferenceRepository.euiccMemoryResetFlow.first() } + enabledProfile == null } override fun onOptionsItemSelected(item: MenuItem) = when (item.itemId) { @@ -206,6 +207,7 @@ open class EuiccManagementFragment : Fragment(), EuiccProfilesChangedListener, val profiles = withEuiccChannel { channel -> logicalSlotId = channel.logicalSlotId + enabledProfile = channel.lpa.profiles.enabled eid = channel.lpa.eID euiccChannelManager.notifyEuiccProfilesChanged(channel.logicalSlotId) if (unfilteredProfileListFlow.value) diff --git a/app-common/src/main/java/im/angry/openeuicc/ui/SettingsFragment.kt b/app-common/src/main/java/im/angry/openeuicc/ui/SettingsFragment.kt index 6554142..751fb36 100644 --- a/app-common/src/main/java/im/angry/openeuicc/ui/SettingsFragment.kt +++ b/app-common/src/main/java/im/angry/openeuicc/ui/SettingsFragment.kt @@ -81,9 +81,6 @@ open class SettingsFragment: PreferenceFragmentCompat() { requirePreference("pref_developer_refresh_after_switch") .bindBooleanFlow(preferenceRepository.refreshAfterSwitchFlow) - requirePreference("pref_developer_euicc_memory_reset") - .bindBooleanFlow(preferenceRepository.euiccMemoryResetFlow) - requirePreference("pref_developer_isdr_aid_list").apply { intent = Intent(requireContext(), IsdrAidListActivity::class.java) } diff --git a/app-common/src/main/java/im/angry/openeuicc/util/PreferenceUtils.kt b/app-common/src/main/java/im/angry/openeuicc/util/PreferenceUtils.kt index 5f4aec4..f3f654c 100644 --- a/app-common/src/main/java/im/angry/openeuicc/util/PreferenceUtils.kt +++ b/app-common/src/main/java/im/angry/openeuicc/util/PreferenceUtils.kt @@ -36,7 +36,6 @@ internal object PreferenceKeys { val REFRESH_AFTER_SWITCH = booleanPreferencesKey("refresh_after_switch") val UNFILTERED_PROFILE_LIST = booleanPreferencesKey("unfiltered_profile_list") val IGNORE_TLS_CERTIFICATE = booleanPreferencesKey("ignore_tls_certificate") - val EUICC_MEMORY_RESET = booleanPreferencesKey("euicc_memory_reset") val ISDR_AID_LIST = stringPreferencesKey("isdr_aid_list") } @@ -80,7 +79,6 @@ open class PreferenceRepository(private val context: Context) { val developerOptionsEnabledFlow = bindFlow(PreferenceKeys.DEVELOPER_OPTIONS_ENABLED, false) val unfilteredProfileListFlow = bindFlow(PreferenceKeys.UNFILTERED_PROFILE_LIST, false) val ignoreTLSCertificateFlow = bindFlow(PreferenceKeys.IGNORE_TLS_CERTIFICATE, false) - val euiccMemoryResetFlow = bindFlow(PreferenceKeys.EUICC_MEMORY_RESET, false) val isdrAidListFlow = bindFlow( PreferenceKeys.ISDR_AID_LIST, PreferenceConstants.DEFAULT_AID_LIST, diff --git a/app-common/src/main/res/values-ja/strings.xml b/app-common/src/main/res/values-ja/strings.xml index e631d52..42f9a25 100644 --- a/app-common/src/main/res/values-ja/strings.xml +++ b/app-common/src/main/res/values-ja/strings.xml @@ -163,8 +163,6 @@ 確認のため、ここに「%s」を入力してください EID が %s で終わるチップを消去することに同意します。これは元に戻せないことを理解しています。 消去する - eUICC の消去を可能にする - この操作は、デフォルトでは非表示になっている危険な操作です。代わりに、すべての構成ファイルを手動で削除することもできます。 モデムに更新コマンドを送信 ISD-R AID リストのカスタマイズ リセット diff --git a/app-common/src/main/res/values-zh-rCN/strings.xml b/app-common/src/main/res/values-zh-rCN/strings.xml index b0938d3..78201a8 100644 --- a/app-common/src/main/res/values-zh-rCN/strings.xml +++ b/app-common/src/main/res/values-zh-rCN/strings.xml @@ -163,8 +163,6 @@ 请在此处输入「%s」以确认 我确认擦除 EID 以 %s 结尾的芯片,并了解此操作不可逆 擦除 - 允许擦除 eUICC - 此操作是默认隐藏的危险操作。作为替代方案,您可以手动删除所有配置文件。 向基带发送刷新命令 自定义 ISD-R AID 列表 重置 diff --git a/app-common/src/main/res/values-zh-rTW/strings.xml b/app-common/src/main/res/values-zh-rTW/strings.xml index e0334c6..0e26c7e 100644 --- a/app-common/src/main/res/values-zh-rTW/strings.xml +++ b/app-common/src/main/res/values-zh-rTW/strings.xml @@ -163,8 +163,6 @@ 請在此輸入「%s」以確認 我確認擦除 EID 以 %s 結尾的晶片,並了解此操作不可逆 擦除 - 允許擦除 eUICC - 此操作是預設隱藏的危險操作。作為替代方案,您可以手動刪除所有設定檔。 向基帶發送刷新命令 自訂 ISD-R AID 列表 重置 diff --git a/app-common/src/main/res/values/strings.xml b/app-common/src/main/res/values/strings.xml index d526238..b049492 100644 --- a/app-common/src/main/res/values/strings.xml +++ b/app-common/src/main/res/values/strings.xml @@ -195,8 +195,6 @@ Include non-production profiles in the list Ignore SM-DP+ TLS certificate Accept any TLS certificate used by the RSP server - Allow erasing eUICC - This is a dangerous operation and hidden by default. As an alternative, you can delete all profiles manually. Customize ISD-R AID list Some brands of removable eUICCs may use their own non-standard ISD-R AID, rendering them inaccessible to third-party apps. We can attempt to use non-standard AIDs added in this list, but there is no guarantee that they will work. Info diff --git a/app-common/src/main/res/xml/pref_settings.xml b/app-common/src/main/res/xml/pref_settings.xml index 690a120..28882e5 100644 --- a/app-common/src/main/res/xml/pref_settings.xml +++ b/app-common/src/main/res/xml/pref_settings.xml @@ -75,12 +75,6 @@ app:summary="@string/pref_developer_ignore_tls_certificate_desc" app:title="@string/pref_developer_ignore_tls_certificate" /> - -