Use getExternalCacheDir() instead of getCacheDir()
This commit is contained in:
parent
ba1b578f5c
commit
5afbbdc719
1 changed files with 6 additions and 1 deletions
|
@ -470,8 +470,13 @@ public class NotesFragment extends OsmAndListFragment {
|
|||
startActivity(Intent.createChooser(intent, getString(R.string.share_note)));
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private File generateGPXForRecordings(Set<Recording> selected) {
|
||||
File tmpFile = new File(getActivity().getCacheDir(), "share/noteLocations.gpx");
|
||||
File externalCacheDir = getActivity().getExternalCacheDir();
|
||||
if (externalCacheDir == null) {
|
||||
return null;
|
||||
}
|
||||
File tmpFile = new File(externalCacheDir, "share/noteLocations.gpx");
|
||||
tmpFile.getParentFile().mkdirs();
|
||||
GPXFile file = new GPXFile();
|
||||
for (Recording r : selected) {
|
||||
|
|
Loading…
Reference in a new issue