diff --git a/DataExtractionOSM/src/com/osmand/data/preparation/DataExtraction.java b/DataExtractionOSM/src/com/osmand/data/preparation/DataExtraction.java index cb0a37c564..65fca8aa15 100644 --- a/DataExtractionOSM/src/com/osmand/data/preparation/DataExtraction.java +++ b/DataExtractionOSM/src/com/osmand/data/preparation/DataExtraction.java @@ -331,7 +331,7 @@ public class DataExtraction { private void convertEnglishName(MapObject o){ String name = o.getName(); - if(name != null && o.getEnName() == null){ + if(name != null && (o.getEnName() == null || o.getEnName().isEmpty())){ o.setEnName(Junidecode.unidecode(name)); // o.setEnName(transliterator.transliterate(name)); } diff --git a/OsmAnd/res/layout-port/menu.xml b/OsmAnd/res/layout-port/menu.xml index 54f682d2d9..a1d70448ff 100644 --- a/OsmAnd/res/layout-port/menu.xml +++ b/OsmAnd/res/layout-port/menu.xml @@ -1,9 +1,8 @@ - + android:layout_height="fill_parent" android:background="@drawable/background"> - + diff --git a/OsmAnd/src/com/osmand/activities/MainMenuActivity.java b/OsmAnd/src/com/osmand/activities/MainMenuActivity.java index 8b4c56cca0..21d316bd23 100644 --- a/OsmAnd/src/com/osmand/activities/MainMenuActivity.java +++ b/OsmAnd/src/com/osmand/activities/MainMenuActivity.java @@ -133,29 +133,24 @@ public class MainMenuActivity extends Activity { } }); - /* + exitButton = (Button) findViewById(R.id.ExitButton); + exitButton.setVisibility(View.INVISIBLE); exitButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { finishApplication(); } - }); */ + }); startApplication(); } protected void finishApplication(){ mNotificationManager.cancel(APP_NOTIFICATION_ID); - boolean force = false; ResourceManager.getResourceManager().close(); applicationAlreadyStarted = false; - if (force) { - int pid = android.os.Process.myPid(); - android.os.Process.killProcess(pid); - } else { - MainMenuActivity.this.finish(); - } + MainMenuActivity.this.finish(); } @Override diff --git a/OsmAnd/src/com/osmand/activities/search/SearchByNameAbstractActivity.java b/OsmAnd/src/com/osmand/activities/search/SearchByNameAbstractActivity.java index 752f53a591..e51278e3a8 100644 --- a/OsmAnd/src/com/osmand/activities/search/SearchByNameAbstractActivity.java +++ b/OsmAnd/src/com/osmand/activities/search/SearchByNameAbstractActivity.java @@ -93,7 +93,7 @@ public abstract class SearchByNameAbstractActivity extends ListActivity { @Override public void run() { List loadedObjects = getObjects(filter); - if(!handlerToLoop.hasMessages(1)){ + if(handlerToLoop != null && !handlerToLoop.hasMessages(1)){ updateUIList(loadedObjects); } }