This commit is contained in:
Alexey Kulish 2016-04-10 11:43:12 +03:00
parent 7a45b26535
commit f91d0b0876
3 changed files with 7 additions and 4 deletions

View file

@ -85,6 +85,9 @@ public class PointDescription {
public void setName(String name){
this.name = name;
if (this.name == null) {
this.name = "";
}
}
public String getTypeName() {

View file

@ -77,7 +77,7 @@ public class OsmandSettings {
private List<WeakReference<StateChangedListener<T>>> l = null;
@Override
public void addListener(StateChangedListener<T> listener) {
public synchronized void addListener(StateChangedListener<T> listener) {
if (l == null) {
l = new LinkedList<WeakReference<StateChangedListener<T>>>();
}
@ -86,7 +86,7 @@ public class OsmandSettings {
}
}
public void fireEvent(T value) {
public synchronized void fireEvent(T value) {
if (l != null) {
Iterator<WeakReference<StateChangedListener<T>>> it = l.iterator();
while (it.hasNext()) {
@ -101,7 +101,7 @@ public class OsmandSettings {
}
@Override
public void removeListener(StateChangedListener<T> listener) {
public synchronized void removeListener(StateChangedListener<T> listener) {
if (l != null) {
Iterator<WeakReference<StateChangedListener<T>>> it = l.iterator();
while (it.hasNext()) {

View file

@ -99,7 +99,7 @@ public class MapMultiSelectionMenuFragment extends Fragment implements AdapterVi
menu.getMapActivity().getSupportFragmentManager().beginTransaction()
.setCustomAnimations(slideInAnim, slideOutAnim, slideInAnim, slideOutAnim)
.add(R.id.fragmentContainer, fragment, TAG)
.addToBackStack(TAG).commit();
.addToBackStack(TAG).commitAllowingStateLoss();
}
private void runLayoutListener() {