Skip to content

Commit 58e0bc4

Browse files
authored
fix: compatibility with RN 0.80+ (#1950)
Follow-up to #1840. Fixes a compatibility issue with RN 0.80+.
1 parent 847dd30 commit 58e0bc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-native-sdk/android/src/main/java/com/streamvideo/reactnative/callmanager/StreamInCallManagerModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class StreamInCallManagerModule(reactContext: ReactApplicationContext) :
8282
fun start() {
8383
AudioDeviceManager.runInAudioThread {
8484
if (!audioManagerActivated) {
85-
currentActivity?.let {
85+
reactApplicationContext.currentActivity?.let {
8686
Log.d(TAG, "start() mAudioDeviceManager")
8787
mAudioDeviceManager.start(it)
8888
setKeepScreenOn(true)
@@ -108,7 +108,7 @@ class StreamInCallManagerModule(reactContext: ReactApplicationContext) :
108108
private fun setKeepScreenOn(enable: Boolean) {
109109
Log.d(TAG, "setKeepScreenOn() $enable")
110110
UiThreadUtil.runOnUiThread {
111-
currentActivity?.let {
111+
reactApplicationContext.currentActivity?.let {
112112
val window = it.window
113113
if (enable) {
114114
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)

0 commit comments

Comments
 (0)