Permission fixes
This commit is contained in:
parent
255bd1e593
commit
b473f06033
2 changed files with 6 additions and 7 deletions
|
@ -87,8 +87,10 @@ public class DashChooseAppDirFragment {
|
|||
}
|
||||
|
||||
public void updateView() {
|
||||
if (type == OsmandSettings.EXTERNAL_STORAGE_TYPE_DEFAULT) {
|
||||
locationPath.setText(R.string.storage_directory_default);
|
||||
if (type == OsmandSettings.EXTERNAL_STORAGE_TYPE_INTERNAL_FILE) {
|
||||
locationPath.setText(R.string.storage_directory_internal_app);
|
||||
} else if (type == OsmandSettings.EXTERNAL_STORAGE_TYPE_DEFAULT) {
|
||||
locationPath.setText(R.string.storage_directory_shared);
|
||||
} else if (type == OsmandSettings.EXTERNAL_STORAGE_TYPE_EXTERNAL_FILE) {
|
||||
locationPath.setText(R.string.storage_directory_external);
|
||||
} else if (type == OsmandSettings.EXTERNAL_STORAGE_TYPE_OBB) {
|
||||
|
@ -175,7 +177,7 @@ public class DashChooseAppDirFragment {
|
|||
if (type == OsmandSettings.EXTERNAL_STORAGE_TYPE_DEFAULT) {
|
||||
selected = items.size();
|
||||
}
|
||||
items.add(getString(R.string.storage_directory_default));
|
||||
items.add(getString(R.string.storage_directory_shared));
|
||||
paths.add(df.getAbsolutePath());
|
||||
types.add(OsmandSettings.EXTERNAL_STORAGE_TYPE_DEFAULT);
|
||||
}
|
||||
|
|
|
@ -601,10 +601,7 @@ public class DownloadActivity extends AbstractDownloadActivity implements Downlo
|
|||
|
||||
private void showFirstTimeExternalStorage() {
|
||||
final boolean firstTime = getMyApplication().getAppInitializer().isFirstTime();
|
||||
final boolean externalExists =
|
||||
getMyApplication().getSettings().getSecondaryStorage() != null;
|
||||
if (firstTime && (externalExists || !hasPermissionToWriteExternalStorage(this))
|
||||
&& DataStoragePlaceDialogFragment.isInterestedInFirstTime) {
|
||||
if (firstTime && DataStoragePlaceDialogFragment.isInterestedInFirstTime) {
|
||||
if (!hasPermissionToWriteExternalStorage(this)) {
|
||||
ActivityCompat.requestPermissions(this,
|
||||
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
||||
|
|
Loading…
Reference in a new issue