From 70e8472c6b9447e12c679b91e24675285e0d0fcc Mon Sep 17 00:00:00 2001 From: max-klaus Date: Wed, 3 Feb 2021 14:44:21 +0300 Subject: [PATCH] Added annotations --- OsmAnd/src/net/osmand/plus/OsmandApplication.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 6b9aa4d0a4..b794a5bc0a 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -24,6 +24,8 @@ import android.view.View; import android.view.accessibility.AccessibilityManager; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AppCompatDelegate; import androidx.multidex.MultiDex; @@ -910,6 +912,7 @@ public class OsmandApplication extends MultiDexApplication { return customRoutingConfigs.get(key); } + @NonNull public RoutingConfiguration.Builder getRoutingConfigForMode(ApplicationMode mode) { RoutingConfiguration.Builder builder = null; String routingProfileKey = mode.getRoutingProfile(); @@ -923,11 +926,13 @@ public class OsmandApplication extends MultiDexApplication { return builder != null ? builder : getDefaultRoutingConfig(); } + @Nullable public GeneralRouter getRouter(ApplicationMode mode) { Builder builder = getRoutingConfigForMode(mode); return getRouter(builder, mode); } + @Nullable public GeneralRouter getRouter(Builder builder, ApplicationMode am) { GeneralRouter router = builder.getRouter(am.getRoutingProfile()); if (router == null && am.getParent() != null) {