Skip to content

Commit 35d27f7

Browse files
natiginfogithub-actions[bot]
authored andcommitted
add default MapboxLifecycleObserver#onResume implementation (#5265)
GitOrigin-RevId: c2b02dc30de8e72ed559a853b3bcb8f748011bfa
1 parent 44e4d36 commit 35d27f7

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

maps-sdk/api/maps-sdk.api

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public abstract interface class com/mapbox/maps/MapControllable : com/mapbox/map
1616
}
1717

1818
public final class com/mapbox/maps/MapControllable$DefaultImpls {
19+
public static fun onResume (Lcom/mapbox/maps/MapControllable;)V
1920
public static synthetic fun queueEvent$default (Lcom/mapbox/maps/MapControllable;Ljava/lang/Runnable;ZILjava/lang/Object;)V
2021
}
2122

sdk-base/api/Release/metalava.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ package com.mapbox.maps {
121121
public interface MapboxLifecycleObserver {
122122
method public void onDestroy();
123123
method public void onLowMemory();
124-
method public void onResume();
124+
method public default void onResume();
125125
method public void onStart();
126126
method public void onStop();
127127
}

sdk-base/api/sdk-base.api

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ public abstract interface class com/mapbox/maps/MapboxLifecycleObserver {
146146
public abstract fun onStop ()V
147147
}
148148

149+
public final class com/mapbox/maps/MapboxLifecycleObserver$DefaultImpls {
150+
public static fun onResume (Lcom/mapbox/maps/MapboxLifecycleObserver;)V
151+
}
152+
149153
public final class com/mapbox/maps/MapboxLocationComponentException : java/lang/RuntimeException {
150154
public fun <init> (Ljava/lang/String;)V
151155
}

sdk-base/src/main/java/com/mapbox/maps/MapboxLifecycleObserver.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@ interface MapboxLifecycleObserver {
2727
/**
2828
* Called when the activity is resumed
2929
*/
30-
fun onResume()
30+
fun onResume() {
31+
// Default empty implementation for backward compatibility
32+
}
3133
}

0 commit comments

Comments
 (0)