Skip to content

Commit 5c952f7

Browse files
committed
Merge branch 'develop'
2 parents 39106b8 + ad49042 commit 5c952f7

File tree

54 files changed

+23460
-18097
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+23460
-18097
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ Video roadmap and changelog is available [here](https://github.com/GetStream/pro
142142

143143
### 0.5.0 milestone
144144

145+
- [X] Improve Compose UI SDK performance by marking WebRTC models as stable.
145146
- [X] Development token to support a development environment
146147
- [ ] H264 workaround on Samsung 23? (see https://github.com/livekit/client-sdk-android/blob/main/livekit-android-sdk/src/main/java/io/livekit/android/webrtc/SimulcastVideoEncoderFactoryWrapper.kt#L34 and
147148
- https://github.com/react-native-webrtc/react-native-webrtc/issues/983#issuecomment-975624906)

build-logic/convention/src/main/kotlin/io/getstream/video/AndroidCompose.kt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package io.getstream.video
22

33
import com.android.build.api.dsl.CommonExtension
4-
import java.io.File
54
import org.gradle.api.Project
65
import org.gradle.api.artifacts.VersionCatalogsExtension
76
import org.gradle.kotlin.dsl.dependencies
87
import org.gradle.kotlin.dsl.getByType
8+
import java.io.File
99

1010
/**
1111
* Configure Compose-specific options
@@ -26,7 +26,7 @@ internal fun Project.configureAndroidCompose(
2626
}
2727

2828
kotlinOptions {
29-
freeCompilerArgs = freeCompilerArgs + buildComposeMetricsParameters()
29+
freeCompilerArgs += buildComposeMetricsParameters() + configureComposeStabilityPath()
3030
}
3131
}
3232

@@ -40,9 +40,11 @@ internal fun Project.configureAndroidCompose(
4040
private fun Project.buildComposeMetricsParameters(): List<String> {
4141
val metricParameters = mutableListOf<String>()
4242
val enableMetricsProvider = project.providers.gradleProperty("enableComposeCompilerMetrics")
43+
val relativePath = projectDir.relativeTo(rootDir)
44+
val buildDir = layout.buildDirectory.get().asFile
4345
val enableMetrics = (enableMetricsProvider.orNull == "true")
4446
if (enableMetrics) {
45-
val metricsFolder = File(project.buildDir, "compose-metrics")
47+
val metricsFolder = buildDir.resolve("compose-metrics").resolve(relativePath)
4648
metricParameters.add("-P")
4749
metricParameters.add(
4850
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + metricsFolder.absolutePath
@@ -52,11 +54,21 @@ private fun Project.buildComposeMetricsParameters(): List<String> {
5254
val enableReportsProvider = project.providers.gradleProperty("enableComposeCompilerReports")
5355
val enableReports = (enableReportsProvider.orNull == "true")
5456
if (enableReports) {
55-
val reportsFolder = File(project.buildDir, "compose-reports")
57+
val reportsFolder = buildDir.resolve("compose-reports").resolve(relativePath)
5658
metricParameters.add("-P")
5759
metricParameters.add(
5860
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + reportsFolder.absolutePath
5961
)
6062
}
6163
return metricParameters.toList()
6264
}
65+
66+
private fun Project.configureComposeStabilityPath(): List<String> {
67+
val metricParameters = mutableListOf<String>()
68+
val stabilityConfigurationFile = rootDir.resolve("compose_compiler_config.conf")
69+
metricParameters.add("-P")
70+
metricParameters.add(
71+
"plugin:androidx.compose.compiler.plugins.kotlin:stabilityConfigurationPath=" + stabilityConfigurationFile.absolutePath
72+
)
73+
return metricParameters.toList()
74+
}

buildSrc/src/main/kotlin/io/getstream/video/android/Configuration.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ object Configuration {
66
const val minSdk = 24
77
const val majorVersion = 0
88
const val minorVersion = 5
9-
const val patchVersion = 0
9+
const val patchVersion = 1
1010
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
11-
const val versionCode = 14
11+
const val versionCode = 15
1212
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
1313
const val artifactGroup = "io.getstream"
14-
const val streamVideoCallGooglePlayVersion = "1.0.4"
14+
const val streamVideoCallGooglePlayVersion = "1.0.5"
1515
}

compose_compiler_config.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kotlin.collections.List
2+
org.threeten.bp.OffsetDateTime
3+
org.threeten.bp.LocalDateTime

demo-app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@
100100
android:exported="true"
101101
android:hardwareAccelerated="true"
102102
android:supportsPictureInPicture="true"
103-
android:windowSoftInputMode="adjustResize" />
103+
android:windowSoftInputMode="adjustResize">
104+
<intent-filter android:priority="1">
105+
<action android:name="io.getstream.video.android.action.OUTGOING_CALL" />
106+
</intent-filter>
107+
</activity>
104108

105109
<!-- Prevent firebase from using advertisement ID -->
106110
<meta-data

demo-app/src/main/generated/baselineProfiles/baseline-prof.txt

Lines changed: 10621 additions & 8264 deletions
Large diffs are not rendered by default.

demo-app/src/main/generated/baselineProfiles/startup-prof.txt

Lines changed: 10621 additions & 8264 deletions
Large diffs are not rendered by default.

demo-app/src/main/kotlin/io/getstream/video/android/DirectCallActivity.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,6 @@ class DirectCallActivity : ComponentActivity() {
171171
}
172172
}
173173

174-
override fun onStop() {
175-
super.onStop()
176-
if (::call.isInitialized) {
177-
reject(call)
178-
}
179-
}
180-
181174
private fun reject(call: Call) {
182175
lifecycleScope.launch(Dispatchers.IO) {
183176
call.reject()

demo-app/src/main/kotlin/io/getstream/video/android/MainActivity.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ import android.os.Bundle
2020
import android.util.Log
2121
import androidx.activity.ComponentActivity
2222
import androidx.activity.compose.setContent
23+
import androidx.lifecycle.Lifecycle
2324
import androidx.lifecycle.lifecycleScope
25+
import androidx.lifecycle.repeatOnLifecycle
2426
import com.google.firebase.analytics.FirebaseAnalytics
2527
import dagger.hilt.android.AndroidEntryPoint
2628
import io.getstream.video.android.analytics.FirebaseEvents
@@ -37,7 +39,8 @@ import javax.inject.Inject
3739

3840
@AndroidEntryPoint
3941
class MainActivity : ComponentActivity() {
40-
@Inject lateinit var dataStore: StreamUserDataStore
42+
@Inject
43+
lateinit var dataStore: StreamUserDataStore
4144
private val firebaseAnalytics by lazy { FirebaseAnalytics.getInstance(this) }
4245

4346
override fun onCreate(savedInstanceState: Bundle?) {
@@ -55,8 +58,10 @@ class MainActivity : ComponentActivity() {
5558
}
5659
}
5760

58-
lifecycleScope.launchWhenCreated {
59-
InAppUpdateHelper(this@MainActivity).checkForAppUpdates()
61+
lifecycleScope.launch {
62+
repeatOnLifecycle(Lifecycle.State.CREATED) {
63+
InAppUpdateHelper(this@MainActivity).checkForAppUpdates()
64+
}
6065
}
6166

6267
lifecycleScope.launch {

demo-app/src/main/kotlin/io/getstream/video/android/ui/call/CallScreen.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ fun CallScreen(
9494
var isShowingReactionsMenu by remember { mutableStateOf(false) }
9595
var isShowingAvailableDeviceMenu by remember { mutableStateOf(false) }
9696
var isBackgroundBlurEnabled by remember { mutableStateOf(false) }
97+
var isShowingStats by remember { mutableStateOf(false) }
9798
var layout by remember { mutableStateOf(LayoutType.DYNAMIC) }
9899
var unreadCount by remember { mutableIntStateOf(0) }
99100
val chatState = rememberModalBottomSheetState(
@@ -333,6 +334,7 @@ fun CallScreen(
333334
isBackgroundBlurEnabled = !isBackgroundBlurEnabled
334335
isShowingSettingMenu = false
335336
},
337+
onShowCallStats = { isShowingStats = true },
336338
)
337339
}
338340

@@ -355,6 +357,10 @@ fun CallScreen(
355357
)
356358
}
357359

360+
if (isShowingStats) {
361+
CallStatsDialog(call) { isShowingStats = false }
362+
}
363+
358364
if (isShowingAvailableDeviceMenu) {
359365
AvailableDeviceMenu(
360366
call = call,

0 commit comments

Comments
 (0)