From dd9e9ec9f21066c63a7d06dfb4c9a9745478d700 Mon Sep 17 00:00:00 2001 From: MadWasp79 Date: Tue, 28 Apr 2020 16:26:08 +0300 Subject: [PATCH] add native pt setting to dev plugin fix no result crash --- .../java/net/osmand/router/TransportRoutePlanner.java | 3 +++ OsmAnd/res/values/strings.xml | 2 -- OsmAnd/res/xml/development_settings.xml | 7 +++++++ OsmAnd/src/net/osmand/plus/AppInitializer.java | 1 - .../osmand/plus/activities/SettingsGeneralActivity.java | 5 ----- .../plus/development/DevelopmentSettingsFragment.java | 8 +++----- .../plus/development/SettingsDevelopmentActivity.java | 4 +--- 7 files changed, 14 insertions(+), 16 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutePlanner.java b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutePlanner.java index 0f43079c89..d55a7e8087 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutePlanner.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutePlanner.java @@ -972,6 +972,9 @@ public class TransportRoutePlanner { public static List convertToTransportRoutingResult(NativeTransportRoutingResult[] res, TransportRoutingConfiguration cfg) { + if (res.length == 0) { + return new ArrayList(); + } List convertedRes = new ArrayList(); for (NativeTransportRoutingResult ntrr : res) { TransportRouteResult trr = new TransportRouteResult(cfg); diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 0c21c1b494..7012075c66 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,8 +11,6 @@ Thx - Hardy --> - Native PT routing development - Switch to Java (safe) Public Transport routing calculation Unsupported action %1$s Extra maps Payment will be charged to your Google Play account at the confirmation of purchase.\n\nSubscription automatically renews unless it is canceled before the renewal date. Your account will be charged for renewal period(month/three month/year) only on the renewal date.\n\nYou can manage and cancel your subscriptions by going to your Google Play settings. diff --git a/OsmAnd/res/xml/development_settings.xml b/OsmAnd/res/xml/development_settings.xml index 6382759667..d01a1f169d 100644 --- a/OsmAnd/res/xml/development_settings.xml +++ b/OsmAnd/res/xml/development_settings.xml @@ -25,6 +25,13 @@ android:summaryOn="@string/shared_string_enabled" android:title="@string/safe_mode" /> + +