Fix crash in core sample
This commit is contained in:
parent
887258e498
commit
7e95abcda8
3 changed files with 7 additions and 5 deletions
|
@ -6,7 +6,7 @@ import net.osmand.core.samples.android.sample1.MapUtils;
|
|||
import net.osmand.core.samples.android.sample1.SampleApplication;
|
||||
import net.osmand.core.samples.android.sample1.search.objects.StreetSearchObject;
|
||||
|
||||
public class StreetSearchListItem extends SearchListItem {
|
||||
public class StreetSearchListItem extends SearchListPositionItem {
|
||||
private String nameStr;
|
||||
private String typeStr;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.osmand.core.samples.android.sample1.search.objects;
|
||||
|
||||
import net.osmand.core.jni.Address;
|
||||
import net.osmand.core.jni.OsmAndCoreJNI;
|
||||
import net.osmand.core.jni.Street;
|
||||
import net.osmand.core.jni.StreetGroup;
|
||||
|
||||
|
@ -30,13 +31,13 @@ public class SearchObjectsHelper {
|
|||
|
||||
private static class StreetInternal extends Street {
|
||||
public StreetInternal(Address address) {
|
||||
super(Address.getCPtr(address), false);
|
||||
super(OsmAndCoreJNI.Street_SWIGSmartPtrUpcast(Address.getCPtr(address)), false);
|
||||
}
|
||||
}
|
||||
|
||||
private static class StreetGroupInternal extends StreetGroup {
|
||||
public StreetGroupInternal(Address address) {
|
||||
super(Address.getCPtr(address), false);
|
||||
super(OsmAndCoreJNI.StreetGroup_SWIGSmartPtrUpcast(Address.getCPtr(address)), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import net.osmand.core.jni.Amenity;
|
|||
import net.osmand.core.jni.IQueryController;
|
||||
import net.osmand.core.jni.ISearch;
|
||||
import net.osmand.core.jni.NullableAreaI;
|
||||
import net.osmand.core.jni.OsmAndCoreJNI;
|
||||
import net.osmand.core.samples.android.sample1.search.SearchAPI.SearchApiCallback;
|
||||
import net.osmand.core.samples.android.sample1.search.SearchAPI.SearchCallbackInternal;
|
||||
import net.osmand.core.samples.android.sample1.search.SearchScope;
|
||||
|
@ -183,13 +184,13 @@ public class CoreSearchRequest extends SearchRequest {
|
|||
|
||||
private class AmenityResultEntry extends AmenitiesByNameSearch.ResultEntry {
|
||||
protected AmenityResultEntry(ISearch.IResultEntry resultEntry) {
|
||||
super(ISearch.IResultEntry.getCPtr(resultEntry), false);
|
||||
super(OsmAndCoreJNI.AmenitiesByNameSearch_ResultEntry_SWIGUpcast(ISearch.IResultEntry.getCPtr(resultEntry)), false);
|
||||
}
|
||||
}
|
||||
|
||||
private class AddressResultEntry extends AddressesByNameSearch.ResultEntry {
|
||||
protected AddressResultEntry(ISearch.IResultEntry resultEntry) {
|
||||
super(ISearch.IResultEntry.getCPtr(resultEntry), false);
|
||||
super(OsmAndCoreJNI.AddressesByNameSearch_ResultEntry_SWIGUpcast(ISearch.IResultEntry.getCPtr(resultEntry)), false);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue