From 00e35a199dc25e25cebfb7fbc045a338ee337a72 Mon Sep 17 00:00:00 2001 From: NikitaKorshak Date: Thu, 30 May 2024 16:27:50 +0300 Subject: [PATCH] bump nn and common --- gradle/dependencies.gradle | 4 ++-- libnavigation-core/api/current.txt | 3 +++ .../AdasisConfigProfileShortTypeOptions.kt | 20 +++++++++++++++++-- ...AdasisConfigProfileShortTypeOptionsTest.kt | 1 + 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index d4d885dc4dc..26289438271 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -13,7 +13,7 @@ ext { // version which we should use in this build def mapboxNavigatorVersion = System.getenv("FORCE_MAPBOX_NAVIGATION_NATIVE_VERSION") if (mapboxNavigatorVersion == null || mapboxNavigatorVersion == '') { - mapboxNavigatorVersion = '203.0.0' + mapboxNavigatorVersion = '205.0.0' } println("Navigation Native version: " + mapboxNavigatorVersion) def androidXWorkManagerVersion = project.hasProperty('WORK_MANAGER_VERSION') ? project.property('WORK_MANAGER_VERSION') : '2.7.0' @@ -25,7 +25,7 @@ ext { mapboxMapSdk : '10.16.6', mapboxSdkServices : '6.15.0', mapboxNavigator : "${mapboxNavigatorVersion}", - mapboxCommonNative : '23.9.1', + mapboxCommonNative : '23.9.3', mapboxCrashMonitor : '2.0.0', mapboxAnnotationPlugin : '0.8.0', mapboxBaseAndroid : '0.8.0', diff --git a/libnavigation-core/api/current.txt b/libnavigation-core/api/current.txt index 7fccbf09291..24c2af4317f 100644 --- a/libnavigation-core/api/current.txt +++ b/libnavigation-core/api/current.txt @@ -341,12 +341,14 @@ package com.mapbox.navigation.core.adas { @com.mapbox.navigation.base.ExperimentalPreviewMapboxNavigationAPI public final class AdasisConfigProfileShortTypeOptions { method public boolean getCurvature(); method public boolean getHeadingChange(); + method public boolean getHistoryAverageSpeed(); method public boolean getRoadCondition(); method public boolean getSlopeStep(); method public boolean getVariableSpeedSign(); method public com.mapbox.navigation.core.adas.AdasisConfigProfileShortTypeOptions.Builder toBuilder(); property public final boolean curvature; property public final boolean headingChange; + property public final boolean historyAverageSpeed; property public final boolean roadCondition; property public final boolean slopeStep; property public final boolean variableSpeedSign; @@ -357,6 +359,7 @@ package com.mapbox.navigation.core.adas { method public com.mapbox.navigation.core.adas.AdasisConfigProfileShortTypeOptions build(); method public com.mapbox.navigation.core.adas.AdasisConfigProfileShortTypeOptions.Builder curvature(boolean curvature); method public com.mapbox.navigation.core.adas.AdasisConfigProfileShortTypeOptions.Builder headingChange(boolean headingChange); + method public com.mapbox.navigation.core.adas.AdasisConfigProfileShortTypeOptions.Builder historyAverageSpeed(boolean historyAverageSpeed); method public com.mapbox.navigation.core.adas.AdasisConfigProfileShortTypeOptions.Builder roadCondition(boolean roadCondition); method public com.mapbox.navigation.core.adas.AdasisConfigProfileShortTypeOptions.Builder slopeStep(boolean slopeStep); method public com.mapbox.navigation.core.adas.AdasisConfigProfileShortTypeOptions.Builder variableSpeedSign(boolean variableSpeedSign); diff --git a/libnavigation-core/src/main/java/com/mapbox/navigation/core/adas/AdasisConfigProfileShortTypeOptions.kt b/libnavigation-core/src/main/java/com/mapbox/navigation/core/adas/AdasisConfigProfileShortTypeOptions.kt index 25537be4436..f1b84105820 100644 --- a/libnavigation-core/src/main/java/com/mapbox/navigation/core/adas/AdasisConfigProfileShortTypeOptions.kt +++ b/libnavigation-core/src/main/java/com/mapbox/navigation/core/adas/AdasisConfigProfileShortTypeOptions.kt @@ -10,6 +10,7 @@ import com.mapbox.navigation.base.ExperimentalPreviewMapboxNavigationAPI * @param roadCondition if true, roadCondition type will be generated * @param variableSpeedSign if true, variableSpeedSign type will be generated * @param headingChange if true, headingChange type will be generated + * @param historyAverageSpeed if true, headingChange type will be generated */ @ExperimentalPreviewMapboxNavigationAPI class AdasisConfigProfileShortTypeOptions private constructor( @@ -18,6 +19,7 @@ class AdasisConfigProfileShortTypeOptions private constructor( val roadCondition: Boolean, val variableSpeedSign: Boolean, val headingChange: Boolean, + val historyAverageSpeed: Boolean, ) { /** @@ -29,6 +31,7 @@ class AdasisConfigProfileShortTypeOptions private constructor( .roadCondition(roadCondition) .variableSpeedSign(variableSpeedSign) .headingChange(headingChange) + .historyAverageSpeed(historyAverageSpeed) @JvmSynthetic internal fun toNativeAdasisConfigProfileShortTypeOptions(): @@ -38,7 +41,8 @@ class AdasisConfigProfileShortTypeOptions private constructor( curvature, roadCondition, variableSpeedSign, - headingChange + headingChange, + historyAverageSpeed, ) } @@ -55,7 +59,8 @@ class AdasisConfigProfileShortTypeOptions private constructor( if (curvature != other.curvature) return false if (roadCondition != other.roadCondition) return false if (variableSpeedSign != other.variableSpeedSign) return false - return headingChange == other.headingChange + if (headingChange != other.headingChange) return false + return historyAverageSpeed == other.historyAverageSpeed } /** @@ -67,6 +72,7 @@ class AdasisConfigProfileShortTypeOptions private constructor( result = 31 * result + roadCondition.hashCode() result = 31 * result + variableSpeedSign.hashCode() result = 31 * result + headingChange.hashCode() + result = 31 * result + historyAverageSpeed.hashCode() return result } @@ -80,6 +86,7 @@ class AdasisConfigProfileShortTypeOptions private constructor( "roadCondition=$roadCondition, " + "variableSpeedSign=$variableSpeedSign, " + "headingChange=$headingChange" + + "historyAverageSpeed=$historyAverageSpeed" + ")" } @@ -93,6 +100,7 @@ class AdasisConfigProfileShortTypeOptions private constructor( private var roadCondition: Boolean = true private var variableSpeedSign: Boolean = false private var headingChange: Boolean = true + private var historyAverageSpeed: Boolean = false /** * If true, slopeStep type will be generated @@ -129,6 +137,13 @@ class AdasisConfigProfileShortTypeOptions private constructor( this.headingChange = headingChange } + /** + * If true, historyAverageSpeed type will be generated + */ + fun historyAverageSpeed(historyAverageSpeed: Boolean) = apply { + this.historyAverageSpeed = historyAverageSpeed + } + /** * Build the [AdasisConfigProfileShortTypeOptions] */ @@ -138,6 +153,7 @@ class AdasisConfigProfileShortTypeOptions private constructor( roadCondition = roadCondition, variableSpeedSign = variableSpeedSign, headingChange = headingChange, + historyAverageSpeed = historyAverageSpeed, ) } } diff --git a/libnavigation-core/src/test/java/com/mapbox/navigation/core/adas/AdasisConfigProfileShortTypeOptionsTest.kt b/libnavigation-core/src/test/java/com/mapbox/navigation/core/adas/AdasisConfigProfileShortTypeOptionsTest.kt index 4c064a52408..7bcb4e08480 100644 --- a/libnavigation-core/src/test/java/com/mapbox/navigation/core/adas/AdasisConfigProfileShortTypeOptionsTest.kt +++ b/libnavigation-core/src/test/java/com/mapbox/navigation/core/adas/AdasisConfigProfileShortTypeOptionsTest.kt @@ -17,6 +17,7 @@ class AdasisConfigProfileShortTypeOptionsTest : .roadCondition(false) .variableSpeedSign(true) .headingChange(false) + .historyAverageSpeed(true) } override fun trigger() {