From b473f06033b79625577cf8a3db07d5e908f243e2 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Fri, 11 Mar 2016 17:53:51 +0300 Subject: [PATCH] Permission fixes --- .../osmand/plus/dashboard/DashChooseAppDirFragment.java | 8 +++++--- OsmAnd/src/net/osmand/plus/download/DownloadActivity.java | 5 +---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java index 9be40f2c05..eda1ca041b 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashChooseAppDirFragment.java @@ -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); } diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index 515eb32845..6f8727b48e 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -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},