Fix external storage access
- Allow writing on all versions - Skip migration if BRouter version has already setup basedir
This commit is contained in:
parent
15e84c81ea
commit
236c65d8ed
2 changed files with 2 additions and 3 deletions
|
@ -596,8 +596,7 @@ public class BRouterActivity extends Activity implements ActivityCompat.OnReques
|
|||
}
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R
|
||||
&& checkExternalStorageWritable()) {
|
||||
if (checkExternalStorageWritable()) {
|
||||
res.add(Environment.getExternalStorageDirectory());
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ public class BRouterView extends View {
|
|||
// don't ask twice
|
||||
String version = "v" + getContext().getString(R.string.app_version);
|
||||
File vFile = new File(brd, "profiles2/"+version );
|
||||
if (android.os.Build.VERSION.SDK_INT == android.os.Build.VERSION_CODES.Q
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.Q
|
||||
&& vFile.exists()) {
|
||||
startSetup(baseDir, false);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue