File tree 2 files changed +14
-8
lines changed
core/core-splashscreen/src/main/java/androidx/core/splashscreen
2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -425,9 +425,11 @@ class SplashScreen private constructor(activity: Activity) {
425
425
426
426
override fun install () {
427
427
setPostSplashScreenTheme(activity.theme, TypedValue ())
428
- (activity.window.decorView as ViewGroup ).setOnHierarchyChangeListener(
429
- hierarchyListener
430
- )
428
+ if (SDK_INT < 33 ) {
429
+ (activity.window.decorView as ViewGroup ).setOnHierarchyChangeListener(
430
+ hierarchyListener
431
+ )
432
+ }
431
433
}
432
434
433
435
override fun setKeepOnScreenCondition (keepOnScreenCondition : KeepOnScreenCondition ) {
@@ -454,7 +456,9 @@ class SplashScreen private constructor(activity: Activity) {
454
456
exitAnimationListener : OnExitAnimationListener
455
457
) {
456
458
activity.splashScreen.setOnExitAnimationListener { splashScreenView ->
457
- applyAppSystemUiTheme()
459
+ if (SDK_INT < 33 ) {
460
+ applyAppSystemUiTheme()
461
+ }
458
462
val splashScreenViewProvider = SplashScreenViewProvider (splashScreenView, activity)
459
463
exitAnimationListener.onSplashScreenExit(splashScreenViewProvider)
460
464
}
Original file line number Diff line number Diff line change @@ -133,10 +133,12 @@ public class SplashScreenViewProvider internal constructor(ctx: Activity) {
133
133
134
134
override fun remove () {
135
135
platformView.remove()
136
- ThemeUtils .Api31 .applyThemesSystemBarAppearance(
137
- activity.theme,
138
- activity.window.decorView
139
- )
136
+ if (Build .VERSION .SDK_INT < 33 ) {
137
+ ThemeUtils .Api31 .applyThemesSystemBarAppearance(
138
+ activity.theme,
139
+ activity.window.decorView
140
+ )
141
+ }
140
142
}
141
143
}
142
144
}
You can’t perform that action at this time.
0 commit comments