forked from organicmaps/organicmaps
[android][sdk] Move routing types to .sdk.routing
Signed-off-by: Andrei Shkrob <github@shkrob.dev>
This commit is contained in:
parent
a8c7a25e9c
commit
96cfdaf2d1
39 changed files with 94 additions and 74 deletions
|
@ -26,6 +26,7 @@ set(SRC
|
|||
app/organicmaps/sdk/search/SearchEngine.cpp
|
||||
app/organicmaps/sdk/search/SearchRecents.cpp
|
||||
app/organicmaps/sdk/routing/RouteRecommendationType.hpp
|
||||
app/organicmaps/sdk/routing/RoutingOptions.cpp
|
||||
app/organicmaps/sdk/ChoosePositionMode.cpp
|
||||
app/organicmaps/sdk/MapStyle.cpp
|
||||
app/organicmaps/sdk/OrganicMaps.cpp
|
||||
|
@ -43,7 +44,6 @@ set(SRC
|
|||
app/organicmaps/LocationState.cpp
|
||||
app/organicmaps/Map.cpp
|
||||
app/organicmaps/MapManager.cpp
|
||||
app/organicmaps/routing/RoutingOptions.cpp
|
||||
app/organicmaps/settings/UnitLocale.cpp
|
||||
app/organicmaps/settings/MapLanguageCode.cpp
|
||||
app/organicmaps/sound/tts.cpp
|
||||
|
|
|
@ -1281,7 +1281,7 @@ Java_app_organicmaps_Framework_nativeGetRouteFollowingInfo(JNIEnv * env, jclass)
|
|||
if (!info.IsValid())
|
||||
return nullptr;
|
||||
|
||||
static jclass const klass = jni::GetGlobalClassRef(env, "app/organicmaps/routing/RoutingInfo");
|
||||
static jclass const klass = jni::GetGlobalClassRef(env, "app/organicmaps/sdk/routing/RoutingInfo");
|
||||
// Java signature : RoutingInfo(Distance distToTarget, Distance distToTurn,
|
||||
// String currentStreet, String nextStreet, String nextNextStreet,
|
||||
// double completionPercent, int vehicleTurnOrdinal, int
|
||||
|
@ -1291,13 +1291,13 @@ Java_app_organicmaps_Framework_nativeGetRouteFollowingInfo(JNIEnv * env, jclass)
|
|||
jni::GetConstructorID(env, klass,
|
||||
"(Lapp/organicmaps/util/Distance;Lapp/organicmaps/util/Distance;"
|
||||
"Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;DIIIII"
|
||||
"[Lapp/organicmaps/routing/SingleLaneInfo;DZZ)V");
|
||||
"[Lapp/organicmaps/sdk/routing/SingleLaneInfo;DZZ)V");
|
||||
|
||||
vector<routing::FollowingInfo::SingleLaneInfoClient> const & lanes = info.m_lanes;
|
||||
jobjectArray jLanes = nullptr;
|
||||
if (!lanes.empty())
|
||||
{
|
||||
static jclass const laneClass = jni::GetGlobalClassRef(env, "app/organicmaps/routing/SingleLaneInfo");
|
||||
static jclass const laneClass = jni::GetGlobalClassRef(env, "app/organicmaps/sdk/routing/SingleLaneInfo");
|
||||
auto const lanesSize = static_cast<jsize>(lanes.size());
|
||||
jLanes = env->NewObjectArray(lanesSize, laneClass, nullptr);
|
||||
ASSERT(jLanes, (jni::DescribeException()));
|
||||
|
@ -1342,7 +1342,7 @@ Java_app_organicmaps_Framework_nativeGetRouteJunctionPoints(JNIEnv * env, jclass
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
static jclass const junctionClazz = jni::GetGlobalClassRef(env, "app/organicmaps/routing/JunctionInfo");
|
||||
static jclass const junctionClazz = jni::GetGlobalClassRef(env, "app/organicmaps/sdk/routing/JunctionInfo");
|
||||
// Java signature : JunctionInfo(double lat, double lon)
|
||||
static jmethodID const junctionConstructor = jni::GetConstructorID(env, junctionClazz, "(DD)V");
|
||||
|
||||
|
@ -1551,7 +1551,7 @@ Java_app_organicmaps_Framework_nativeGetRoutePoints(JNIEnv * env, jclass)
|
|||
auto const points = frm()->GetRoutingManager().GetRoutePoints();
|
||||
|
||||
static jclass const pointClazz = jni::GetGlobalClassRef(env,
|
||||
"app/organicmaps/routing/RouteMarkData");
|
||||
"app/organicmaps/sdk/routing/RouteMarkData");
|
||||
// Java signature : RouteMarkData(String title, String subtitle,
|
||||
// @RoutePointInfo.RouteMarkType int pointType,
|
||||
// int intermediateIndex, boolean isVisible, boolean isMyPosition,
|
||||
|
@ -1587,7 +1587,7 @@ Java_app_organicmaps_Framework_nativeGetTransitRouteInfo(JNIEnv * env, jclass)
|
|||
auto const routeInfo = frm()->GetRoutingManager().GetTransitRouteInfo();
|
||||
|
||||
static jclass const transitStepClass = jni::GetGlobalClassRef(env,
|
||||
"app/organicmaps/routing/TransitStepInfo");
|
||||
"app/organicmaps/sdk/routing/TransitStepInfo");
|
||||
// Java signature : TransitStepInfo(@TransitType int type, @Nullable String distance, @Nullable String distanceUnits,
|
||||
// int timeInSec, @Nullable String number, int color, int intermediateIndex)
|
||||
static jmethodID const transitStepConstructor = jni::GetConstructorID(env, transitStepClass,
|
||||
|
@ -1611,14 +1611,14 @@ Java_app_organicmaps_Framework_nativeGetTransitRouteInfo(JNIEnv * env, jclass)
|
|||
}));
|
||||
|
||||
static jclass const transitRouteInfoClass = jni::GetGlobalClassRef(env,
|
||||
"app/organicmaps/routing/TransitRouteInfo");
|
||||
"app/organicmaps/sdk/routing/TransitRouteInfo");
|
||||
// Java signature : TransitRouteInfo(@NonNull String totalDistance, @NonNull String totalDistanceUnits, int totalTimeInSec,
|
||||
// @NonNull String totalPedestrianDistance, @NonNull String totalPedestrianDistanceUnits,
|
||||
// int totalPedestrianTimeInSec, @NonNull TransitStepInfo[] steps)
|
||||
static jmethodID const transitRouteInfoConstructor = jni::GetConstructorID(env, transitRouteInfoClass,
|
||||
"(Ljava/lang/String;Ljava/lang/String;I"
|
||||
"Ljava/lang/String;Ljava/lang/String;I"
|
||||
"[Lapp/organicmaps/routing/TransitStepInfo;)V");
|
||||
"[Lapp/organicmaps/sdk/routing/TransitStepInfo;)V");
|
||||
jni::TScopedLocalRef const distance(env, jni::ToJavaString(env, routeInfo.m_totalDistanceStr));
|
||||
jni::TScopedLocalRef const distanceUnits(env, jni::ToJavaString(env, routeInfo.m_totalDistanceUnitsSuffix));
|
||||
jni::TScopedLocalRef const distancePedestrian(env, jni::ToJavaString(env, routeInfo.m_totalPedestrianDistanceStr));
|
||||
|
|
|
@ -47,7 +47,7 @@ jobject CreateMapObject(JNIEnv * env, place_page::Info const & info, int mapObje
|
|||
static jmethodID const ctorId = jni::GetConstructorID(
|
||||
env, g_mapObjectClazz,
|
||||
"("
|
||||
"Lapp/organicmaps/bookmarks/data/FeatureId;" // featureId
|
||||
"Lapp/organicmaps/bookmarks/data/FeatureId;" // featureId
|
||||
"I" // mapObjectType
|
||||
"Ljava/lang/String;" // title
|
||||
"Ljava/lang/String;" // secondaryTitle
|
||||
|
@ -55,7 +55,7 @@ jobject CreateMapObject(JNIEnv * env, place_page::Info const & info, int mapObje
|
|||
"Ljava/lang/String;" // address
|
||||
"DD" // lat, lon
|
||||
"Ljava/lang/String;" // appId
|
||||
"Lapp/organicmaps/routing/RoutePointInfo;" // routePointInfo
|
||||
"Lapp/organicmaps/sdk/routing/RoutePointInfo;" // routePointInfo
|
||||
"I" // openingMode
|
||||
"Lapp/organicmaps/sdk/search/Popularity;" // popularity
|
||||
"Ljava/lang/String;" // description
|
||||
|
@ -104,7 +104,7 @@ jobject CreateBookmark(JNIEnv *env, const place_page::Info &info,
|
|||
jni::GetConstructorID(env, g_bookmarkClazz,
|
||||
"(Lapp/organicmaps/bookmarks/data/FeatureId;JJLjava/lang/String;"
|
||||
"Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;"
|
||||
"Lapp/organicmaps/routing/RoutePointInfo;"
|
||||
"Lapp/organicmaps/sdk/routing/RoutePointInfo;"
|
||||
"ILapp/organicmaps/sdk/search/Popularity;Ljava/lang/String;"
|
||||
"[Ljava/lang/String;)V");
|
||||
static jmethodID const featureCtorId =
|
||||
|
@ -215,7 +215,7 @@ jobject CreateMapObject(JNIEnv * env, place_page::Info const & info)
|
|||
|
||||
jobject CreateRoutePointInfo(JNIEnv * env, place_page::Info const & info)
|
||||
{
|
||||
static jclass const clazz = jni::GetGlobalClassRef(env, "app/organicmaps/routing/RoutePointInfo");
|
||||
static jclass const clazz = jni::GetGlobalClassRef(env, "app/organicmaps/sdk/routing/RoutePointInfo");
|
||||
static jmethodID const ctorId = jni::GetConstructorID(env, clazz, "(II)V");
|
||||
int const markType = static_cast<int>(info.GetRouteMarkType());
|
||||
return env->NewObject(clazz, ctorId, markType, info.GetIntermediateIndex());
|
||||
|
|
|
@ -5,16 +5,15 @@
|
|||
|
||||
routing::RoutingOptions::Road makeValue(jint option)
|
||||
{
|
||||
uint8_t const road = static_cast<uint8_t>(1u << static_cast<int>(option));
|
||||
auto const road = static_cast<uint8_t>(1u << static_cast<int>(option));
|
||||
CHECK_LESS(road, static_cast<uint8_t>(routing::RoutingOptions::Road::Max), ());
|
||||
return static_cast<routing::RoutingOptions::Road>(road);
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_app_organicmaps_routing_RoutingOptions_nativeHasOption(JNIEnv * env, jclass clazz, jint option)
|
||||
JNIEXPORT jboolean JNICALL Java_app_organicmaps_sdk_routing_RoutingOptions_nativeHasOption(JNIEnv *, jclass,
|
||||
jint option)
|
||||
{
|
||||
CHECK(g_framework, ("Framework isn't created yet!"));
|
||||
routing::RoutingOptions routingOptions = routing::RoutingOptions::LoadCarOptionsFromSettings();
|
||||
|
@ -22,8 +21,7 @@ Java_app_organicmaps_routing_RoutingOptions_nativeHasOption(JNIEnv * env, jclass
|
|||
return static_cast<jboolean>(routingOptions.Has(road));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_routing_RoutingOptions_nativeAddOption(JNIEnv * env, jclass clazz, jint option)
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_routing_RoutingOptions_nativeAddOption(JNIEnv *, jclass, jint option)
|
||||
{
|
||||
CHECK(g_framework, ("Framework isn't created yet!"));
|
||||
routing::RoutingOptions routingOptions = routing::RoutingOptions::LoadCarOptionsFromSettings();
|
||||
|
@ -32,9 +30,7 @@ Java_app_organicmaps_routing_RoutingOptions_nativeAddOption(JNIEnv * env, jclass
|
|||
routing::RoutingOptions::SaveCarOptionsToSettings(routingOptions);
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_app_organicmaps_routing_RoutingOptions_nativeRemoveOption(JNIEnv * env, jclass clazz, jint option)
|
||||
JNIEXPORT void JNICALL Java_app_organicmaps_sdk_routing_RoutingOptions_nativeRemoveOption(JNIEnv *, jclass, jint option)
|
||||
{
|
||||
CHECK(g_framework, ("Framework isn't created yet!"));
|
||||
routing::RoutingOptions routingOptions = routing::RoutingOptions::LoadCarOptionsFromSettings();
|
|
@ -13,13 +13,12 @@ import app.organicmaps.api.RequestType;
|
|||
import app.organicmaps.bookmarks.data.DistanceAndAzimut;
|
||||
import app.organicmaps.bookmarks.data.FeatureId;
|
||||
import app.organicmaps.bookmarks.data.MapObject;
|
||||
import app.organicmaps.products.Product;
|
||||
import app.organicmaps.products.ProductsConfig;
|
||||
import app.organicmaps.routing.JunctionInfo;
|
||||
import app.organicmaps.routing.RouteMarkData;
|
||||
import app.organicmaps.routing.RoutePointInfo;
|
||||
import app.organicmaps.routing.RoutingInfo;
|
||||
import app.organicmaps.routing.TransitRouteInfo;
|
||||
import app.organicmaps.sdk.routing.JunctionInfo;
|
||||
import app.organicmaps.sdk.routing.RouteMarkData;
|
||||
import app.organicmaps.sdk.routing.RoutePointInfo;
|
||||
import app.organicmaps.sdk.routing.RoutingInfo;
|
||||
import app.organicmaps.sdk.routing.TransitRouteInfo;
|
||||
import app.organicmaps.sdk.PlacePageActivationListener;
|
||||
import app.organicmaps.sdk.routing.RoutingListener;
|
||||
import app.organicmaps.sdk.routing.RoutingLoadPointsListener;
|
||||
|
|
|
@ -79,11 +79,11 @@ import app.organicmaps.maplayer.isolines.IsolinesState;
|
|||
import app.organicmaps.routing.ManageRouteBottomSheet;
|
||||
import app.organicmaps.routing.NavigationController;
|
||||
import app.organicmaps.routing.NavigationService;
|
||||
import app.organicmaps.routing.RoutePointInfo;
|
||||
import app.organicmaps.sdk.routing.RoutePointInfo;
|
||||
import app.organicmaps.routing.RoutingBottomMenuListener;
|
||||
import app.organicmaps.routing.RoutingController;
|
||||
import app.organicmaps.routing.RoutingErrorDialogFragment;
|
||||
import app.organicmaps.routing.RoutingOptions;
|
||||
import app.organicmaps.sdk.routing.RoutingOptions;
|
||||
import app.organicmaps.routing.RoutingPlanFragment;
|
||||
import app.organicmaps.routing.RoutingPlanInplaceController;
|
||||
import app.organicmaps.sdk.ChoosePositionMode;
|
||||
|
|
|
@ -10,7 +10,7 @@ import androidx.annotation.Nullable;
|
|||
import androidx.core.os.ParcelCompat;
|
||||
|
||||
import app.organicmaps.Framework;
|
||||
import app.organicmaps.routing.RoutePointInfo;
|
||||
import app.organicmaps.sdk.routing.RoutePointInfo;
|
||||
import app.organicmaps.sdk.search.Popularity;
|
||||
import app.organicmaps.util.Constants;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import androidx.annotation.Nullable;
|
|||
import androidx.core.os.ParcelCompat;
|
||||
|
||||
import app.organicmaps.Framework;
|
||||
import app.organicmaps.routing.RoutePointInfo;
|
||||
import app.organicmaps.sdk.routing.RoutePointInfo;
|
||||
import app.organicmaps.sdk.search.Popularity;
|
||||
import app.organicmaps.util.Utils;
|
||||
import app.organicmaps.widget.placepage.PlacePageData;
|
||||
|
|
|
@ -30,10 +30,10 @@ import app.organicmaps.car.util.ThemeUtils;
|
|||
import app.organicmaps.car.util.UiHelpers;
|
||||
import app.organicmaps.location.LocationHelper;
|
||||
import app.organicmaps.location.LocationListener;
|
||||
import app.organicmaps.routing.JunctionInfo;
|
||||
import app.organicmaps.sdk.routing.JunctionInfo;
|
||||
import app.organicmaps.routing.NavigationService;
|
||||
import app.organicmaps.routing.RoutingController;
|
||||
import app.organicmaps.routing.RoutingInfo;
|
||||
import app.organicmaps.sdk.routing.RoutingInfo;
|
||||
import app.organicmaps.sound.TtsPlayer;
|
||||
import app.organicmaps.util.LocationUtils;
|
||||
import app.organicmaps.util.log.Logger;
|
||||
|
|
|
@ -41,7 +41,7 @@ import app.organicmaps.car.util.UiHelpers;
|
|||
import app.organicmaps.location.LocationHelper;
|
||||
import app.organicmaps.routing.ResultCodesHelper;
|
||||
import app.organicmaps.routing.RoutingController;
|
||||
import app.organicmaps.routing.RoutingInfo;
|
||||
import app.organicmaps.sdk.routing.RoutingInfo;
|
||||
import app.organicmaps.sdk.Router;
|
||||
import app.organicmaps.util.Config;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import app.organicmaps.car.SurfaceRenderer;
|
|||
import app.organicmaps.car.screens.base.BaseMapScreen;
|
||||
import app.organicmaps.car.util.Toggle;
|
||||
import app.organicmaps.car.util.UiHelpers;
|
||||
import app.organicmaps.routing.RoutingOptions;
|
||||
import app.organicmaps.sdk.routing.RoutingOptions;
|
||||
import app.organicmaps.settings.RoadType;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
|
|
@ -8,8 +8,8 @@ import androidx.car.app.navigation.model.LaneDirection;
|
|||
import androidx.car.app.navigation.model.Maneuver;
|
||||
import androidx.core.graphics.drawable.IconCompat;
|
||||
|
||||
import app.organicmaps.routing.RoutingInfo;
|
||||
import app.organicmaps.routing.SingleLaneInfo;
|
||||
import app.organicmaps.sdk.routing.RoutingInfo;
|
||||
import app.organicmaps.sdk.routing.SingleLaneInfo;
|
||||
|
||||
public final class RoutingHelpers
|
||||
{
|
||||
|
|
|
@ -15,8 +15,8 @@ import androidx.car.app.navigation.model.Trip;
|
|||
import androidx.core.graphics.drawable.IconCompat;
|
||||
|
||||
import app.organicmaps.bookmarks.data.MapObject;
|
||||
import app.organicmaps.routing.RoutingInfo;
|
||||
import app.organicmaps.routing.SingleLaneInfo;
|
||||
import app.organicmaps.sdk.routing.RoutingInfo;
|
||||
import app.organicmaps.sdk.routing.SingleLaneInfo;
|
||||
import app.organicmaps.util.Graphics;
|
||||
import app.organicmaps.widget.LanesDrawable;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import app.organicmaps.Map;
|
|||
import app.organicmaps.MwmApplication;
|
||||
import app.organicmaps.bookmarks.data.FeatureId;
|
||||
import app.organicmaps.bookmarks.data.MapObject;
|
||||
import app.organicmaps.routing.JunctionInfo;
|
||||
import app.organicmaps.sdk.routing.JunctionInfo;
|
||||
import app.organicmaps.routing.RoutingController;
|
||||
import app.organicmaps.util.Config;
|
||||
import app.organicmaps.util.LocationUtils;
|
||||
|
|
|
@ -5,7 +5,7 @@ import android.location.Location;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import app.organicmaps.routing.JunctionInfo;
|
||||
import app.organicmaps.sdk.routing.JunctionInfo;
|
||||
import app.organicmaps.util.LocationUtils;
|
||||
import app.organicmaps.util.concurrency.UiThread;
|
||||
import app.organicmaps.util.log.Logger;
|
||||
|
|
|
@ -17,6 +17,8 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.bookmarks.data.MapObject;
|
||||
import app.organicmaps.sdk.routing.RouteMarkData;
|
||||
import app.organicmaps.sdk.routing.RoutePointInfo;
|
||||
import app.organicmaps.util.StringUtils;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ import app.organicmaps.Framework;
|
|||
import app.organicmaps.MwmApplication;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.bookmarks.data.MapObject;
|
||||
import app.organicmaps.sdk.routing.RouteMarkData;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
|
|
|
@ -19,6 +19,7 @@ import app.organicmaps.location.LocationHelper;
|
|||
import app.organicmaps.maplayer.MapButtonsViewModel;
|
||||
import app.organicmaps.maplayer.traffic.TrafficManager;
|
||||
import app.organicmaps.sdk.Router;
|
||||
import app.organicmaps.sdk.routing.RoutingInfo;
|
||||
import app.organicmaps.util.StringUtils;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import app.organicmaps.util.Utils;
|
||||
|
|
|
@ -33,6 +33,7 @@ import app.organicmaps.Framework;
|
|||
import app.organicmaps.MwmActivity;
|
||||
import app.organicmaps.MwmApplication;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.routing.RoutingInfo;
|
||||
import app.organicmaps.sound.MediaPlayerWrapper;
|
||||
import app.organicmaps.location.LocationHelper;
|
||||
import app.organicmaps.location.LocationListener;
|
||||
|
|
|
@ -32,6 +32,11 @@ import app.organicmaps.Framework;
|
|||
import app.organicmaps.R;
|
||||
import app.organicmaps.bookmarks.data.DistanceAndAzimut;
|
||||
import app.organicmaps.location.LocationHelper;
|
||||
import app.organicmaps.sdk.routing.RouteMarkData;
|
||||
import app.organicmaps.sdk.routing.RoutePointInfo;
|
||||
import app.organicmaps.sdk.routing.RoutingInfo;
|
||||
import app.organicmaps.sdk.routing.TransitRouteInfo;
|
||||
import app.organicmaps.sdk.routing.TransitStepInfo;
|
||||
import app.organicmaps.util.Distance;
|
||||
import app.organicmaps.util.Graphics;
|
||||
import app.organicmaps.util.ThemeUtils;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package app.organicmaps.routing;
|
||||
|
||||
import app.organicmaps.sdk.routing.RoutePointInfo;
|
||||
|
||||
public interface RoutingBottomMenuListener
|
||||
{
|
||||
void onUseMyPositionAsStart();
|
||||
|
|
|
@ -17,10 +17,15 @@ import app.organicmaps.bookmarks.data.FeatureId;
|
|||
import app.organicmaps.bookmarks.data.MapObject;
|
||||
import app.organicmaps.location.LocationHelper;
|
||||
import app.organicmaps.sdk.Router;
|
||||
import app.organicmaps.sdk.routing.RouteMarkData;
|
||||
import app.organicmaps.sdk.routing.RoutePointInfo;
|
||||
import app.organicmaps.sdk.routing.RouteRecommendationType;
|
||||
import app.organicmaps.sdk.routing.RoutingInfo;
|
||||
import app.organicmaps.sdk.routing.RoutingListener;
|
||||
import app.organicmaps.sdk.routing.RoutingLoadPointsListener;
|
||||
import app.organicmaps.sdk.routing.RoutingOptions;
|
||||
import app.organicmaps.sdk.routing.RoutingProgressListener;
|
||||
import app.organicmaps.sdk.routing.TransitRouteInfo;
|
||||
import app.organicmaps.widget.placepage.CoordinatesFormat;
|
||||
import app.organicmaps.util.StringUtils;
|
||||
import app.organicmaps.util.Utils;
|
||||
|
|
|
@ -19,6 +19,9 @@ import app.organicmaps.Framework;
|
|||
import app.organicmaps.MwmApplication;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.Router;
|
||||
import app.organicmaps.sdk.routing.RoutingInfo;
|
||||
import app.organicmaps.sdk.routing.RoutingOptions;
|
||||
import app.organicmaps.sdk.routing.TransitRouteInfo;
|
||||
import app.organicmaps.settings.DrivingOptionsActivity;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import app.organicmaps.util.WindowInsetUtils.PaddingInsetsListener;
|
||||
|
|
|
@ -8,6 +8,7 @@ import androidx.annotation.NonNull;
|
|||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.routing.TransitStepInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -20,6 +20,8 @@ import androidx.annotation.Nullable;
|
|||
import androidx.core.content.res.ResourcesCompat;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.routing.TransitStepInfo;
|
||||
import app.organicmaps.sdk.routing.TransitStepType;
|
||||
import app.organicmaps.widget.recycler.MultilineLayoutManager;
|
||||
import app.organicmaps.util.ThemeUtils;
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package app.organicmaps.routing;
|
||||
package app.organicmaps.sdk.routing;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
|
||||
// Used by JNI.
|
||||
@Keep
|
||||
@SuppressWarnings("unused")
|
||||
public class JunctionInfo
|
||||
public final class JunctionInfo
|
||||
{
|
||||
public final double mLat;
|
||||
public final double mLon;
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.routing;
|
||||
package app.organicmaps.sdk.routing;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.Nullable;
|
||||
|
@ -9,7 +9,7 @@ import androidx.annotation.Nullable;
|
|||
// Called from JNI.
|
||||
@Keep
|
||||
@SuppressWarnings("unused")
|
||||
public class RouteMarkData
|
||||
public final class RouteMarkData
|
||||
{
|
||||
@Nullable
|
||||
public final String mTitle;
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.routing;
|
||||
package app.organicmaps.sdk.routing;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
@ -12,7 +12,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||
// Called from JNI.
|
||||
@Keep
|
||||
@SuppressWarnings("unused")
|
||||
public class RoutePointInfo implements Parcelable
|
||||
public final class RoutePointInfo implements Parcelable
|
||||
{
|
||||
public static final Creator<RoutePointInfo> CREATOR = new Creator<>()
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.routing;
|
||||
package app.organicmaps.sdk.routing;
|
||||
|
||||
import android.widget.ImageView;
|
||||
|
||||
|
@ -12,7 +12,7 @@ import app.organicmaps.util.Distance;
|
|||
// Called from JNI.
|
||||
@Keep
|
||||
@SuppressWarnings("unused")
|
||||
public class RoutingInfo
|
||||
public final class RoutingInfo
|
||||
{
|
||||
// Target (end point of route).
|
||||
public final Distance distToTarget;
|
||||
|
@ -105,7 +105,7 @@ public class RoutingInfo
|
|||
}
|
||||
}
|
||||
|
||||
enum PedestrianTurnDirection
|
||||
public enum PedestrianTurnDirection
|
||||
{
|
||||
NO_TURN(R.drawable.ic_turn_straight, 0),
|
||||
GO_STRAIGHT(R.drawable.ic_turn_straight, 0),
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.routing;
|
||||
package app.organicmaps.sdk.routing;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
|
@ -7,7 +7,7 @@ import app.organicmaps.settings.RoadType;
|
|||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class RoutingOptions
|
||||
public final class RoutingOptions
|
||||
{
|
||||
public static void addOption(@NonNull RoadType roadType)
|
||||
{
|
||||
|
@ -24,10 +24,6 @@ public class RoutingOptions
|
|||
return nativeHasOption(roadType.ordinal());
|
||||
}
|
||||
|
||||
private static native void nativeAddOption(int option);
|
||||
private static native void nativeRemoveOption(int option);
|
||||
private static native boolean nativeHasOption(int option);
|
||||
|
||||
public static boolean hasAnyOptions()
|
||||
{
|
||||
for (RoadType each : RoadType.values())
|
||||
|
@ -49,4 +45,10 @@ public class RoutingOptions
|
|||
}
|
||||
return roadTypes;
|
||||
}
|
||||
|
||||
private static native void nativeAddOption(int option);
|
||||
|
||||
private static native void nativeRemoveOption(int option);
|
||||
|
||||
private static native boolean nativeHasOption(int option);
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
package app.organicmaps.routing;
|
||||
package app.organicmaps.sdk.routing;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import app.organicmaps.R;
|
||||
|
||||
public class SingleLaneInfo
|
||||
public final class SingleLaneInfo
|
||||
{
|
||||
public LaneWay[] mLane;
|
||||
public boolean mIsActive;
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.routing;
|
||||
package app.organicmaps.sdk.routing;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -13,7 +13,7 @@ import java.util.List;
|
|||
// Used by JNI.
|
||||
@Keep
|
||||
@SuppressWarnings("unused")
|
||||
public class TransitRouteInfo
|
||||
public final class TransitRouteInfo
|
||||
{
|
||||
@NonNull
|
||||
private final String mTotalDistance;
|
||||
|
@ -42,29 +42,29 @@ public class TransitRouteInfo
|
|||
}
|
||||
|
||||
@NonNull
|
||||
String getTotalPedestrianDistance()
|
||||
public String getTotalPedestrianDistance()
|
||||
{
|
||||
return mTotalPedestrianDistance;
|
||||
}
|
||||
|
||||
int getTotalPedestrianTimeInSec()
|
||||
public int getTotalPedestrianTimeInSec()
|
||||
{
|
||||
return mTotalPedestrianTimeInSec;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
String getTotalPedestrianDistanceUnits()
|
||||
public String getTotalPedestrianDistanceUnits()
|
||||
{
|
||||
return mTotalPedestrianDistanceUnits;
|
||||
}
|
||||
|
||||
int getTotalTime()
|
||||
public int getTotalTime()
|
||||
{
|
||||
return mTotalTimeInSec;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
List<TransitStepInfo> getTransitSteps()
|
||||
public List<TransitStepInfo> getTransitSteps()
|
||||
{
|
||||
return new ArrayList<>(Arrays.asList(mSteps));
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.routing;
|
||||
package app.organicmaps.sdk.routing;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
import androidx.annotation.Keep;
|
||||
|
@ -14,7 +14,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||
// Used by JNI.
|
||||
@Keep
|
||||
@SuppressWarnings("unused")
|
||||
public class TransitStepInfo
|
||||
public final class TransitStepInfo
|
||||
{
|
||||
private static final int TRANSIT_TYPE_INTERMEDIATE_POINT = 0;
|
||||
private static final int TRANSIT_TYPE_PEDESTRIAN = 1;
|
|
@ -1,4 +1,4 @@
|
|||
package app.organicmaps.routing;
|
||||
package app.organicmaps.sdk.routing;
|
||||
|
||||
import androidx.annotation.DrawableRes;
|
||||
|
|
@ -14,7 +14,7 @@ import androidx.appcompat.widget.SwitchCompat;
|
|||
import app.organicmaps.R;
|
||||
import app.organicmaps.base.BaseMwmToolbarFragment;
|
||||
import app.organicmaps.routing.RoutingController;
|
||||
import app.organicmaps.routing.RoutingOptions;
|
||||
import app.organicmaps.sdk.routing.RoutingOptions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
|
|
@ -24,7 +24,7 @@ import app.organicmaps.editor.data.Language;
|
|||
import app.organicmaps.help.HelpActivity;
|
||||
import app.organicmaps.location.LocationHelper;
|
||||
import app.organicmaps.location.LocationProviderFactory;
|
||||
import app.organicmaps.routing.RoutingOptions;
|
||||
import app.organicmaps.sdk.routing.RoutingOptions;
|
||||
import app.organicmaps.util.Config;
|
||||
import app.organicmaps.util.NetworkPolicy;
|
||||
import app.organicmaps.util.PowerManagment;
|
||||
|
|
|
@ -15,7 +15,7 @@ import androidx.appcompat.content.res.AppCompatResources;
|
|||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.routing.SingleLaneInfo;
|
||||
import app.organicmaps.sdk.routing.SingleLaneInfo;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import androidx.annotation.Nullable;
|
|||
import androidx.annotation.StyleableRes;
|
||||
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.routing.SingleLaneInfo;
|
||||
import app.organicmaps.sdk.routing.SingleLaneInfo;
|
||||
|
||||
public class LanesView extends View
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ import androidx.core.content.ContextCompat;
|
|||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.location.LocationHelper;
|
||||
import app.organicmaps.routing.RoutingInfo;
|
||||
import app.organicmaps.sdk.routing.RoutingInfo;
|
||||
import app.organicmaps.sound.TtsPlayer;
|
||||
import app.organicmaps.util.Graphics;
|
||||
import app.organicmaps.util.StringUtils;
|
||||
|
|
Loading…
Add table
Reference in a new issue