Ensuring that bookmark export failures are handled
This commit is contained in:
parent
3711f81bd1
commit
bee7d4b8dd
@ -211,6 +211,17 @@ public class BookmarkSettingsFragment extends PreferenceFragment implements Pref
|
||||
+ ' ' + exportFile.getPath());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable throwable) {
|
||||
Log.e(TAG, "onError: exporting bookmarks", throwable);
|
||||
Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
Utils.createInformativeDialog(activity, R.string.title_error, R.string.bookmark_export_failure);
|
||||
} else {
|
||||
Utils.showToast(mApplication, R.string.bookmark_export_failure);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -176,6 +176,7 @@
|
||||
<string name="export_bookmarks">Export bookmarks to backup</string>
|
||||
<string name="import_backup">Import bookmarks from backup</string>
|
||||
<string name="bookmark_export_path">Bookmarks exported to</string>
|
||||
<string name="bookmark_export_failure">Sorry, bookmarks could not be exported!</string>
|
||||
<string name="bookmark_settings">Bookmark Settings</string>
|
||||
<string name="import_bookmark_error">Could not import bookmarks from file</string>
|
||||
<string name="title_chooser">Choose a file</string>
|
||||
|
Loading…
Reference in New Issue
Block a user