From 7f9c8f6149ada3dfd780b97b2833f5e22d986503 Mon Sep 17 00:00:00 2001 From: PavelRatushny Date: Mon, 31 Jul 2017 17:22:11 +0300 Subject: [PATCH] Move checkAssets to method --- .../download/ui/DataStoragePlaceDialogFragment.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/ui/DataStoragePlaceDialogFragment.java b/OsmAnd/src/net/osmand/plus/download/ui/DataStoragePlaceDialogFragment.java index e4c294a04c..a159d4bb6f 100644 --- a/OsmAnd/src/net/osmand/plus/download/ui/DataStoragePlaceDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/ui/DataStoragePlaceDialogFragment.java @@ -198,6 +198,10 @@ public class DataStoragePlaceDialogFragment extends BottomSheetDialogFragment { return sz; } + private void checkAssets() { + getMyApplication().getResourceManager().checkAssets(IProgress.EMPTY_PROGRESS, true); + } + private void updateDownloadIndexes() { DownloadIndexesThread downloadIndexesThread = getMyApplication().getDownloadThread(); downloadIndexesThread.runReloadIndexFilesSilent(); @@ -208,7 +212,7 @@ public class DataStoragePlaceDialogFragment extends BottomSheetDialogFragment { @Override public void onClick(View v) { saveFilesLocation(deviceStorageType, deviceStorage, getActivity()); - getMyApplication().getResourceManager().checkAssets(IProgress.EMPTY_PROGRESS, true); + checkAssets(); updateDownloadIndexes(); isInterestedInFirstTime = false; dismiss(); @@ -220,7 +224,7 @@ public class DataStoragePlaceDialogFragment extends BottomSheetDialogFragment { @Override public void onClick(View v) { saveFilesLocation(sharedStorageType, sharedStorage, getActivity()); - getMyApplication().getResourceManager().checkAssets(IProgress.EMPTY_PROGRESS, true); + checkAssets(); updateDownloadIndexes(); isInterestedInFirstTime = false; dismiss(); @@ -232,7 +236,7 @@ public class DataStoragePlaceDialogFragment extends BottomSheetDialogFragment { @Override public void onClick(View v) { boolean res = saveFilesLocation(cardStorageType, cardStorage, getActivity()); - getMyApplication().getResourceManager().checkAssets(IProgress.EMPTY_PROGRESS, true); + checkAssets(); updateDownloadIndexes(); isInterestedInFirstTime = false; if (res) {