forked from organicmaps/organicmaps-tmp
Review fixes
This commit is contained in:
parent
bd48ca3ad0
commit
7e512a3d62
3 changed files with 10 additions and 19 deletions
|
@ -1154,7 +1154,7 @@ Java_com_mapswithme_maps_Framework_nativeGetBestRouter(JNIEnv * env, jclass,
|
|||
void ExtractRoutePointInfo(JNIEnv * env, jobject routePointInfo,
|
||||
RouteMarkType & markType, int8_t & intermediateIndex)
|
||||
{
|
||||
jclass const clazz = env->GetObjectClass(routePointInfo);
|
||||
static jclass const clazz = env->GetObjectClass(routePointInfo);
|
||||
ASSERT(clazz, ());
|
||||
static jfieldID const markTypeField = env->GetFieldID(clazz, "mMarkType", "I");
|
||||
ASSERT(markTypeField, ());
|
||||
|
@ -1199,7 +1199,7 @@ Java_com_mapswithme_maps_Framework_nativeCouldAddIntermediatePoint(JNIEnv * env,
|
|||
JNIEXPORT jobjectArray JNICALL
|
||||
Java_com_mapswithme_maps_Framework_nativeGetRoutePoints(JNIEnv * env, jclass)
|
||||
{
|
||||
std::vector<m2::PointD> const points = frm()->GetRoutingManager().GetRoutePoints();
|
||||
auto const points = frm()->GetRoutingManager().GetRoutePoints();
|
||||
|
||||
static jclass const pointClazz = jni::GetGlobalClassRef(env, "com/mapswithme/maps/api/RoutePoint");
|
||||
// Java signature : RoutePoint(double lat, double lon, String name)
|
||||
|
|
|
@ -277,6 +277,7 @@ public class Framework
|
|||
@NonNull RoutePointInfo routePointInfo);
|
||||
public static native void nativeRemoveRoutePoint(@NonNull RoutePointInfo routePointInfo);
|
||||
public static native boolean nativeCouldAddIntermediatePoint();
|
||||
@NonNull
|
||||
public static native RoutePoint[] nativeGetRoutePoints();
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,18 +10,18 @@ import java.lang.annotation.RetentionPolicy;
|
|||
|
||||
public class RoutePointInfo implements Parcelable
|
||||
{
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({ROUTE_MARK_START, ROUTE_MARK_INTERMEDIATE, ROUTE_MARK_FINISH})
|
||||
public @interface RouteMarkType {}
|
||||
|
||||
public static final int ROUTE_MARK_START = 0;
|
||||
public static final int ROUTE_MARK_INTERMEDIATE = 1;
|
||||
public static final int ROUTE_MARK_FINISH = 2;
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({ ROUTE_MARK_START, ROUTE_MARK_INTERMEDIATE, ROUTE_MARK_FINISH })
|
||||
public @interface RouteMarkType {}
|
||||
|
||||
@RouteMarkType
|
||||
private final int mMarkType;
|
||||
@Nullable
|
||||
private final int mIntermediateIndex;
|
||||
public final int mMarkType;
|
||||
|
||||
public final int mIntermediateIndex;
|
||||
|
||||
public RoutePointInfo(@RouteMarkType int markType, int intermediateIndex)
|
||||
{
|
||||
|
@ -29,16 +29,6 @@ public class RoutePointInfo implements Parcelable
|
|||
mIntermediateIndex = intermediateIndex;
|
||||
}
|
||||
|
||||
public @RouteMarkType int getMarkType()
|
||||
{
|
||||
return mMarkType;
|
||||
}
|
||||
|
||||
public int getIntermediateIndex()
|
||||
{
|
||||
return mIntermediateIndex;
|
||||
}
|
||||
|
||||
private RoutePointInfo(Parcel in)
|
||||
{
|
||||
//noinspection WrongConstant
|
||||
|
|
Loading…
Add table
Reference in a new issue