Skip to content

Commit 6a4403e

Browse files
kediarovactions-user
authored andcommitted
Bump compile and target sdk 35 (#6184)
https://mapbox.atlassian.net/browse/MAPSAND-2272 Decided to do windowOptOutEdgeToEdgeEnforcement to not to overcomplicate examples. There is an issue otherwise when content is overlapped by default supportActionBar. Options would be to 1. handle viewTree to get action bar's height, somehow combine with window insets listener, update padding/margin. 2. Update each layout for every activity to use custom Toolbar. 3. Use methods from support library, it would require updating them, so as updating kotlin, so as updating ksp, scripts and the waterflow goes on. SDK 35 is the current requirement so SDK 36 is not yet enforced and there are some changes that would be considered as a separate task. cc @mapbox/maps-android cc @mapbox/core-sdk cc @mapbox/sdk-ci --------- Co-authored-by: Changelog autocreator bot <[email protected]> GitOrigin-RevId: e4bd8fb7405e5d7c594349c742c7db165ed0f0e2
1 parent 867aaf0 commit 6a4403e

File tree

18 files changed

+42
-34
lines changed

18 files changed

+42
-34
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Mapbox welcomes participation and contributions from everyone.
99
# 11.16.0-beta.1
1010

1111
## Features ✨ and improvements 🏁
12+
* Update target and compile SDK version to 35
1213
* Added support for `LandmarkIcons` featureset in Mapbox Standard Style. Query and interact with landmark building icons that appear on the map, accessing properties including landmark ID, name, type, and localized names through the `StandardLandmarkIconsFeature` class.
1314
* Enhanced `MapboxStandardStyle()` and `MapboxStandardSatelliteStyle()` Compose functions with comprehensive configuration options:
1415
- **Color customization**: Set custom colors for roads, motorways, water, greenspaces, administrative boundaries, and more

app/src/main/java/com/mapbox/maps/testapp/ExampleOverviewActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class ExampleOverviewActivity : AppCompatActivity() {
205205
// We use this activity package name in case the `applicationId`/`packageName` is different
206206
val packageName = ExampleOverviewActivity::class.java.`package`!!.name
207207
val categoryKey = getString(R.string.category)
208-
for (info in appPackageInfo.activities) {
208+
for (info in appPackageInfo.activities.orEmpty()) {
209209
if (info.labelRes != 0 && info.name.startsWith(packageName) &&
210210
info.name != ExampleOverviewActivity::class.java.name
211211
) {

app/src/main/java/com/mapbox/maps/testapp/examples/TintFillPatternActivity.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ class TintFillPatternActivity : AppCompatActivity() {
6969
}
7070

7171
private fun changeBitmapColor(sourceBitmap: Bitmap, @ColorInt color: Int): Bitmap {
72-
val resultBitmap: Bitmap = sourceBitmap.copy(sourceBitmap.config, true)
72+
val config = sourceBitmap.config ?: return sourceBitmap
73+
val resultBitmap: Bitmap = sourceBitmap.copy(config, true)
7374
val paint = Paint()
7475
paint.colorFilter = PorterDuffColorFilter(color, PorterDuff.Mode.SRC_IN)
7576
val canvas = Canvas(resultBitmap)

app/src/main/java/com/mapbox/maps/testapp/examples/geofence/ExtendedGeofencingActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ class ExtendedGeofencingActivity : AppCompatActivity() {
531531
) {
532532

533533
val intent = Intent(appContext, ExtendedGeofencingActivity::class.java).apply {
534+
action = Intent.ACTION_VIEW
534535
flags = Intent.FLAG_ACTIVITY_SINGLE_TOP
535536
putExtra(NOTIFICATION_FEATURE_ID, featureId)
536537
putExtra(NOTIFICATION_FEATURE_TYPE, featureType)

app/src/main/res/values/styles.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<resources>
1+
<resources xmlns:tools="http://schemas.android.com/tools">
22

33
<!-- Base application theme. -->
44
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
@@ -8,6 +8,7 @@
88
<item name="android:windowBackground">@color/white</item>
99
<item name="android:spinnerItemStyle">@style/MySpinnerStyle</item>
1010
<item name="android:spinnerDropDownItemStyle">@style/SpinnerItem.DropDownItem</item>
11+
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:ignore="NewApi">true</item>
1112
</style>
1213

1314
<style name="MySpinnerStyle">

build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ allprojects {
6969

7070
// hack to fix unit test, see https://github.com/robolectric/robolectric/issues/5131#issuecomment-509631890.
7171
subprojects {
72-
tasks.withType<Test>().configureEach {
72+
tasks.withType<Test> {
7373
maxParallelForks = 2
74-
setForkEvery(80)
75-
setMaxHeapSize("2048m")
76-
setMinHeapSize("1024m")
74+
forkEvery = 80
75+
maxHeapSize = "2048m"
76+
minHeapSize = "1024m"
7777
}
7878
}
7979

compose-app/src/main/java/com/mapbox/maps/compose/testapp/data/ExamplesProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public object ExamplesProvider {
2929
// We use this activity package name in case the `applicationId`/`packageName` is different
3030
val packageName = ExampleOverviewActivity::class.java.`package`!!.name
3131
val categoryKey = context.getString(R.string.category)
32-
return appPackageInfo.activities.filter { info ->
32+
return appPackageInfo.activities.orEmpty().filter { info ->
3333
info.labelRes != 0 && info.name.startsWith(packageName) && info.name != ExampleOverviewActivity::class.java.name
3434
}.mapNotNull { info ->
3535
info.metaData?.getString(categoryKey)?.let {

compose-app/src/main/res/values-night/themes.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
<item name="colorSecondary">@color/teal_200</item>
1010
<item name="colorSecondaryVariant">@color/teal_200</item>
1111
<item name="colorOnSecondary">@color/black</item>
12-
<!-- Status bar color. -->
13-
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
1412
<!-- Customize your theme here. -->
1513
</style>
1614
</resources>

compose-app/src/main/res/values/themes.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
<item name="colorSecondary">@color/teal_200</item>
1010
<item name="colorSecondaryVariant">@color/teal_700</item>
1111
<item name="colorOnSecondary">@color/black</item>
12-
<!-- Status bar color. -->
13-
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
1412
<!-- Customize your theme here. -->
1513
</style>
1614

extension-style/src/main/java/com/mapbox/maps/extension/style/types/Formatted.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Formatted : ArrayList<FormattedSection>() {
6767
fun fromProperty(list: ArrayList<*>): Formatted {
6868
val formatted = Formatted()
6969

70-
if (list.removeFirst() == "format") {
70+
if (list.removeAt(0) == "format") {
7171
list.forEachIndexed { index, element ->
7272
when (element) {
7373
is String -> {
@@ -77,7 +77,7 @@ class Formatted : ArrayList<FormattedSection>() {
7777
when (key) {
7878
"text-color" -> {
7979
val colorExpressionList = optionsMap[key] as ArrayList<*>
80-
if (colorExpressionList.removeFirst() == "rgba") {
80+
if (colorExpressionList.removeAt(0) == "rgba") {
8181
formattedSection.textColor = ColorUtils.rgbaExpressionToColorString(
8282
rgba {
8383
literal(colorExpressionList[0] as Double)
@@ -91,7 +91,7 @@ class Formatted : ArrayList<FormattedSection>() {
9191
"font-scale" -> formattedSection.fontScale = optionsMap[key] as Double
9292
"text-font" -> {
9393
val textFontExpressionList = optionsMap[key] as ArrayList<*>
94-
if (textFontExpressionList.removeFirst() == "literal") {
94+
if (textFontExpressionList.removeAt(0) == "literal") {
9595
@Suppress("UNCHECKED_CAST")
9696
formattedSection.fontStack =
9797
textFontExpressionList.last() as ArrayList<String>

0 commit comments

Comments
 (0)