Cleanup base directory selection, use Context.getExternalFilesDirs and request WRITE_EXTERNAL_STORAGE permission, use AndroidX and raise minSdkVersion to 14. Use File instead of plain Strings for paths in some places, use try-with-resources, and some other small improvements.
This commit is contained in:
parent
72e2e13d07
commit
dbdfd36f88
17 changed files with 173 additions and 220 deletions
|
|
@ -87,17 +87,17 @@ public class ConfigMigration
|
|||
}
|
||||
}
|
||||
|
||||
public static File saveAdditionalMaptoolDir( String segmentDir, String value )
|
||||
public static File saveAdditionalMaptoolDir( File segmentDir, String value )
|
||||
{
|
||||
return saveStorageLocation( segmentDir, "additional_maptool_dir=", value );
|
||||
}
|
||||
|
||||
private static File saveStorageLocation( String segmentDir, String tag, String value )
|
||||
private static File saveStorageLocation( File segmentDir, String tag, String value )
|
||||
{
|
||||
File res = null;
|
||||
BufferedReader br = null;
|
||||
BufferedWriter bw = null;
|
||||
String configFile = segmentDir + "/storageconfig.txt";
|
||||
File configFile = new File (segmentDir, "storageconfig.txt");
|
||||
List<String> lines = new ArrayList<String>();
|
||||
try
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue