From 885d36e8279150ce18bf9593ca01d9e6d849ac5c Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Thu, 25 Dec 2014 00:39:21 +0100 Subject: [PATCH] Fix bug with clearing and adding new track --- .../src/net/osmand/plus/GpxSelectionHelper.java | 2 +- .../plus/activities/MainMenuActivity.java | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java index 74053f86c3..c20ceb9ec6 100644 --- a/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java +++ b/OsmAnd/src/net/osmand/plus/GpxSelectionHelper.java @@ -31,7 +31,7 @@ public class GpxSelectionHelper { // save into settings // public final CommonPreference SHOW_CURRENT_GPX_TRACK = // new BooleanPreference("show_current_gpx_track", false).makeGlobal().cache(); - private List selectedGPXFiles = new java.util.concurrent.CopyOnWriteArrayList(); + private List selectedGPXFiles = new java.util.ArrayList(); private SavingTrackHelper savingTrackHelper; private Map, Runnable> uiListeners = new LinkedHashMap, Runnable>(); diff --git a/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java b/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java index 1514cee62c..d95e9e0fd8 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MainMenuActivity.java @@ -6,11 +6,6 @@ import java.lang.ref.WeakReference; import java.util.List; import java.util.Random; -import android.graphics.Color; -import android.os.Build; -import android.view.Gravity; -import android.view.ViewTreeObserver; -import android.widget.LinearLayout; import net.osmand.Location; import net.osmand.access.AccessibleAlertBuilder; import net.osmand.plus.OsmAndAppCustomization; @@ -19,12 +14,17 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.R; import net.osmand.plus.Version; import net.osmand.plus.base.BasicProgressAsyncTask; -import net.osmand.plus.dashboard.*; +import net.osmand.plus.dashboard.DashAudioVideoNotesFragment; +import net.osmand.plus.dashboard.DashDownloadMapsFragment; +import net.osmand.plus.dashboard.DashErrorFragment; +import net.osmand.plus.dashboard.DashFavoritesFragment; +import net.osmand.plus.dashboard.DashUpdatesFragment; import net.osmand.plus.download.BaseDownloadActivity; import net.osmand.plus.download.DownloadActivity; import net.osmand.plus.download.IndexItem; import net.osmand.plus.render.MapRenderRepositories; import net.osmand.plus.sherpafy.TourViewActivity; +import net.osmand.plus.views.controls.FloatingActionButton; import android.app.Activity; import android.app.AlertDialog; import android.app.AlertDialog.Builder; @@ -35,7 +35,9 @@ import android.content.SharedPreferences; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; +import android.graphics.Color; import android.graphics.drawable.ColorDrawable; +import android.os.Build; import android.os.Bundle; import android.support.v4.app.Fragment; import android.text.SpannableString; @@ -43,13 +45,14 @@ import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.text.style.ClickableSpan; import android.util.TypedValue; +import android.view.Gravity; import android.view.View; +import android.view.ViewTreeObserver; import android.widget.ScrollView; import android.widget.TextView; import com.actionbarsherlock.view.Menu; import com.actionbarsherlock.view.MenuItem; -import net.osmand.plus.views.controls.FloatingActionButton; /** */