Skip to content

Commit b2b6f8b

Browse files
committed
fix: Android 16 beta 4 window split crash
Signed-off-by: Hu Shenghao <[email protected]>
1 parent 66e7f69 commit b2b6f8b

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

feature/embedding-splits/src/main/java/com/dede/android_eggs/embedding_splits/SplitInitializer.kt

+9-11
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ package com.dede.android_eggs.embedding_splits
22

33
import android.content.Context
44
import androidx.startup.Initializer
5-
import androidx.window.WindowSdkExtensions
6-
import androidx.window.embedding.ActivityEmbeddingController
7-
import androidx.window.embedding.EmbeddingConfiguration
85
import androidx.window.embedding.RuleController
96

107
class SplitInitializer : Initializer<Unit> {
@@ -16,14 +13,15 @@ class SplitInitializer : Initializer<Unit> {
1613
ruleController.setRules(rules)
1714
} catch (ignore: RuntimeException) {
1815
}
19-
if (WindowSdkExtensions.getInstance().extensionVersion >= 5) {
20-
ActivityEmbeddingController.getInstance(context)
21-
.setEmbeddingConfiguration(
22-
EmbeddingConfiguration.Builder()
23-
.setDimAreaBehavior(EmbeddingConfiguration.DimAreaBehavior.ON_TASK)
24-
.build()
25-
)
26-
}
16+
// todo fix androidx.window:window:1.4.0-rc02, android 16 beta 4 crash
17+
// if (WindowSdkExtensions.getInstance().extensionVersion >= 5) {
18+
// ActivityEmbeddingController.getInstance(context)
19+
// .setEmbeddingConfiguration(
20+
// EmbeddingConfiguration.Builder()
21+
// .setDimAreaBehavior(EmbeddingConfiguration.DimAreaBehavior.ON_TASK)
22+
// .build()
23+
// )
24+
// }
2725
}
2826

2927
override fun dependencies(): List<Class<out Initializer<*>>> = emptyList()

gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ androidx-recyclerview = "androidx.recyclerview:recyclerview:1.4.0"
3333
androidx-dynamicanimation = "androidx.dynamicanimation:dynamicanimation:1.1.0"
3434
androidx-annotation = "androidx.annotation:annotation:1.9.1"
3535
androidx-browser = "androidx.browser:browser:1.8.0"
36-
androidx-window = "androidx.window:window:1.4.0-rc02"
36+
androidx-window = "androidx.window:window:1.3.0"
3737
google-material = "com.google.android.material:material:1.12.0"
3838
androidx-startup = "androidx.startup:startup-runtime:1.2.0"
3939
androidx-shapes = "androidx.graphics:graphics-shapes:1.0.1"

0 commit comments

Comments
 (0)