diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefs.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefs.kt index b859a1dee5..4d9021bb71 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefs.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/ImportExportPrefs.kt @@ -217,7 +217,7 @@ class ImportExportPrefs @Inject constructor( fun importSharedPreferences(fragment: Fragment) { fragment.activity?.let { fragmentAct -> - val callForPrefFile = fragmentAct.prepareCall(PrefsFileContract()) { + val callForPrefFile = fragmentAct.registerForActivityResult(PrefsFileContract()) { it?.let { importSharedPreferences(fragmentAct, it) } @@ -227,7 +227,7 @@ class ImportExportPrefs @Inject constructor( } fun importSharedPreferences(activity: FragmentActivity) { - val callForPrefFile = activity.prepareCall(PrefsFileContract()) { + val callForPrefFile = activity.registerForActivityResult(PrefsFileContract()) { it?.let { importSharedPreferences(activity, it) }