mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 13:53:37 +00:00
[android] Fixed crash when creating RoutePointInfo from JNI.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
690ca53677
commit
28455e51a6
@@ -30,6 +30,21 @@ public final class RoutePointInfo implements Parcelable
|
|||||||
|
|
||||||
public final int mIntermediateIndex;
|
public final int mIntermediateIndex;
|
||||||
|
|
||||||
|
// Called from JNI.
|
||||||
|
@Keep
|
||||||
|
public RoutePointInfo(int markType, int intermediateIndex)
|
||||||
|
{
|
||||||
|
switch (markType)
|
||||||
|
{
|
||||||
|
case 0: mMarkType = RouteMarkType.Start; break;
|
||||||
|
case 1: mMarkType = RouteMarkType.Intermediate; break;
|
||||||
|
case 2: mMarkType = RouteMarkType.Finish; break;
|
||||||
|
default: throw new IllegalArgumentException("Mark type is not valid = " + markType);
|
||||||
|
}
|
||||||
|
|
||||||
|
mIntermediateIndex = intermediateIndex;
|
||||||
|
}
|
||||||
|
|
||||||
private RoutePointInfo(@NonNull RouteMarkType markType, int intermediateIndex)
|
private RoutePointInfo(@NonNull RouteMarkType markType, int intermediateIndex)
|
||||||
{
|
{
|
||||||
mMarkType = markType;
|
mMarkType = markType;
|
||||||
|
|||||||
Reference in New Issue
Block a user