Search in sources :

Example 1 with ImportSettingsFragment

use of net.osmand.plus.settings.fragments.ImportSettingsFragment in project Osmand by osmandapp.

the class RestoreDuplicatesFragment method importItems.

@Override
protected void importItems(boolean shouldReplace) {
    super.importItems(shouldReplace);
    if (settingsItems != null) {
        Fragment target = getTargetFragment();
        if (target instanceof ImportSettingsFragment) {
            try {
                ImportListener importListener = ((ImportSettingsFragment) target).getImportListener();
                settingsHelper.importSettings(RESTORE_ITEMS_KEY, settingsItems, false, importListener);
            } catch (IllegalStateException e) {
                LOG.error(e.getMessage(), e);
            }
        }
    }
}
Also used : ImportSettingsFragment(net.osmand.plus.settings.fragments.ImportSettingsFragment) FileImportDuplicatesFragment(net.osmand.plus.settings.fragments.FileImportDuplicatesFragment) ImportDuplicatesFragment(net.osmand.plus.settings.fragments.ImportDuplicatesFragment) ImportSettingsFragment(net.osmand.plus.settings.fragments.ImportSettingsFragment) Fragment(androidx.fragment.app.Fragment) ImportListener(net.osmand.plus.settings.backend.backup.SettingsHelper.ImportListener)

Aggregations

Fragment (androidx.fragment.app.Fragment)1 ImportListener (net.osmand.plus.settings.backend.backup.SettingsHelper.ImportListener)1 FileImportDuplicatesFragment (net.osmand.plus.settings.fragments.FileImportDuplicatesFragment)1 ImportDuplicatesFragment (net.osmand.plus.settings.fragments.ImportDuplicatesFragment)1 ImportSettingsFragment (net.osmand.plus.settings.fragments.ImportSettingsFragment)1