Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-11-18 11:46:59 +01:00
commit 078e63a77f
3 changed files with 14 additions and 14 deletions

View file

@ -55,7 +55,8 @@ import btools.routingapp.BRouterServiceConnection;
*/
public class AppInitializer implements IProgress {
// 22 - 2.2
private static final int CURRENT_VERSION_FOR_UGPRADE = 22;
private static final int VERSION_2_2 = 22;
private static final int CURRENT_VERSION_FOR_UGPRADE = VERSION_2_2;
public static final boolean TIPS_AND_TRICKS = false;
@ -132,13 +133,13 @@ public class AppInitializer implements IProgress {
firstTime = true;
startPrefs.edit().putBoolean(FIRST_TIME_APP_RUN, true).commit();
startPrefs.edit().putString(VERSION_INSTALLED, Version.getFullVersion(app)).commit();
startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, CURRENT_VERSION_FOR_UGPRADE).commit();
startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, VERSION_2_2).commit();
} else if (!Version.getFullVersion(app).equals(startPrefs.getString(VERSION_INSTALLED, ""))) {
if(startPrefs.getInt(VERSION_INSTALLED_NUMBER, 0) < 22) {
if(startPrefs.getInt(VERSION_INSTALLED_NUMBER, 0) < VERSION_2_2) {
app.getSettings().SHOW_DASHBOARD_ON_START.set(true);
app.getSettings().SHOW_DASHBOARD_ON_MAP_SCREEN.set(true);
app.getSettings().SHOW_CARD_TO_CHOOSE_DRAWER.set(true);
startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, CURRENT_VERSION_FOR_UGPRADE).commit();
startPrefs.edit().putInt(VERSION_INSTALLED_NUMBER, VERSION_2_2).commit();
}
startPrefs.edit().putString(VERSION_INSTALLED, Version.getFullVersion(app)).commit();
appVersionChanged = true;

View file

@ -1,20 +1,19 @@
package net.osmand.plus.osmedit.dialogs;
import java.util.Map;
import java.util.Set;
import net.osmand.osm.MapPoiTypes;
import net.osmand.osm.PoiCategory;
import net.osmand.osm.PoiType;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.osmedit.EditPoiDialogFragment;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import net.osmand.data.Amenity;
import net.osmand.osm.MapPoiTypes;
import net.osmand.osm.PoiCategory;
import net.osmand.osm.PoiType;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.osmedit.EditPoiDialogFragment;
import java.util.Map;
import java.util.Set;
public class PoiSubTypeDialogFragment extends DialogFragment {
private static final String KEY_POI_CATEGORY = "amenity";

View file

@ -27,7 +27,7 @@ public class PoiTypeDialogFragment extends DialogFragment {
ArrayList<String> vals = new ArrayList<>(categories.size());
ArrayList<PoiCategory> toDelete = new ArrayList<>();
for (PoiCategory category : categories) {
if (!category.isNotEditableOsm()) {
if (category.isNotEditableOsm()) {
toDelete.add(category);
} else {
vals.add(category.getTranslation());