diff --git a/android/jni/com/mapswithme/maps/MapManager.cpp b/android/jni/com/mapswithme/maps/MapManager.cpp index bd390861df..db2b1d0fc4 100644 --- a/android/jni/com/mapswithme/maps/MapManager.cpp +++ b/android/jni/com/mapswithme/maps/MapManager.cpp @@ -107,6 +107,9 @@ static void MigrationStatusChangedCallback(TCountryId const & countryId, bool ke if (attrs.m_mwmCounter == 1) OnMigrationError(attrs.m_error); break; + + default: + break; } } @@ -326,13 +329,11 @@ Java_com_mapswithme_maps_downloader_MapManager_nativeRetry(JNIEnv * env, jclass GetStorage().RetryDownloadNode(jni::ToNativeString(env, root)); } -// static boolean nativeUpdate(String root); -JNIEXPORT jboolean JNICALL +// static void nativeUpdate(String root); +JNIEXPORT void JNICALL Java_com_mapswithme_maps_downloader_MapManager_nativeUpdate(JNIEnv * env, jclass clazz, jstring root) { - // FIXME (trashkalmar): Uncomment after method is implemented. - //return GetStorage().UpdateNode(jni::ToNativeString(env, root)); - return true; + GetStorage().UpdateNode(jni::ToNativeString(env, root)); } // static void nativeCancel(String root); diff --git a/android/src/com/mapswithme/maps/MwmActivity.java b/android/src/com/mapswithme/maps/MwmActivity.java index 201376f9ac..998c5546b5 100644 --- a/android/src/com/mapswithme/maps/MwmActivity.java +++ b/android/src/com/mapswithme/maps/MwmActivity.java @@ -39,6 +39,7 @@ import com.mapswithme.maps.bookmarks.data.MapObject; import com.mapswithme.maps.downloader.DownloaderActivity; import com.mapswithme.maps.downloader.DownloaderFragment; import com.mapswithme.maps.downloader.MapManager; +import com.mapswithme.maps.downloader.MigrationFragment; import com.mapswithme.maps.downloader.OnmapDownloader; import com.mapswithme.maps.editor.AuthFragment; import com.mapswithme.maps.editor.EditorActivity; @@ -98,6 +99,7 @@ public class MwmActivity extends BaseMwmFragmentActivity private static final String[] DOCKED_FRAGMENTS = { SearchFragment.class.getName(), DownloaderFragment.class.getName(), + MigrationFragment.class.getName(), RoutingPlanFragment.class.getName(), EditorHostFragment.class.getName(), AuthFragment.class.getName() }; @@ -291,7 +293,7 @@ public class MwmActivity extends BaseMwmFragmentActivity { SearchEngine.cancelSearch(); mSearchController.refreshToolbar(); - replaceFragment(DownloaderFragment.class, args, null); + replaceFragment(MapManager.nativeIsLegacyMode() ? MigrationFragment.class : DownloaderFragment.class, args, null); } else { @@ -641,11 +643,7 @@ public class MwmActivity extends BaseMwmFragmentActivity if (intent.hasExtra(EXTRA_TASK)) addTask(intent); else if (intent.hasExtra(EXTRA_UPDATE_COUNTRIES)) - { - // TODO (trashkalmar): Update all maps in downloader - //OldActiveCountryTree.updateAll(); showDownloader(true); - } } private void addTask(Intent intent) diff --git a/android/src/com/mapswithme/maps/downloader/DownloaderAdapter.java b/android/src/com/mapswithme/maps/downloader/DownloaderAdapter.java index 1a49c437bf..afb5d37121 100644 --- a/android/src/com/mapswithme/maps/downloader/DownloaderAdapter.java +++ b/android/src/com/mapswithme/maps/downloader/DownloaderAdapter.java @@ -112,10 +112,10 @@ class DownloaderAdapter extends RecyclerView.Adapter