Compare commits

..

1 commit

Author SHA1 Message Date
a4a9ef43d4
feat: euicc memory reset 2025-03-06 20:28:24 +08:00
2 changed files with 7 additions and 2 deletions

View file

@ -104,7 +104,11 @@ class EuiccMemoryResetFragment : DialogFragment(), EuiccChannelFragmentMarker {
euiccChannelManagerService.launchMemoryReset(slotId, portId)
.onStart {
emitEuiccProfilesChanged(parentFragment)
notifyChanged(parentFragment)
val resId = R.string.toast_euicc_memory_reset_finitshed
toast = Toast.makeText(requireContext(), resId, Toast.LENGTH_LONG)
runCatching(::dismiss)
}
.waitDone()
@ -120,7 +124,7 @@ class EuiccMemoryResetFragment : DialogFragment(), EuiccChannelFragmentMarker {
}
}
private fun emitEuiccProfilesChanged(fragment: Fragment?) {
private fun notifyChanged(fragment: Fragment?) {
if (fragment is EuiccProfilesChangedListener) {
// Trigger a refresh in the parent fragment -- it should wait until
// any foreground task is completed before actually doing a refresh

View file

@ -31,6 +31,7 @@
<string name="toast_profile_enable_failed">Cannot switch to new eSIM profile.</string>
<string name="toast_profile_delete_confirm_text_mismatched">Confirmation string mismatch</string>
<string name="toast_euicc_memory_reset_confirm_text_mismatched">Confirmation string mismatch</string>
<string name="toast_euicc_memory_reset_finitshed">This eSIM chip has been erased</string>
<string name="toast_iccid_copied">ICCID copied to clipboard</string>
<string name="toast_sn_copied">Serial Number copied to clipboard</string>
<string name="toast_eid_copied">EID copied to clipboard</string>