Skip to content

Commit 54ade29

Browse files
committed
Adjust ReactContextBaseJavaModule Kotlin compat
1 parent ede037a commit 54ade29

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContextBaseJavaModule.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,11 @@ public abstract class ReactContextBaseJavaModule : BaseJavaModule {
3030
protected fun getCurrentActivity(): Activity? {
3131
return reactApplicationContext.currentActivity
3232
}
33+
34+
@Deprecated(
35+
"Deprecated in 0.80.0. Use getReactApplicationContext.getCurrentActivity() instead.",
36+
ReplaceWith("reactApplicationContext.currentActivity"))
37+
@get:JvmName("_internal_getCurrentActivity") // Prevent method clash
38+
protected val currentActivity: Activity?
39+
get() = reactApplicationContext.currentActivity
3340
}

0 commit comments

Comments
 (0)