summaryrefslogtreecommitdiffhomepage
path: root/android/app/src
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2024-11-12 09:15:37 +0100
committerDavid Göransson <david.goransson@mullvad.net>2024-11-12 15:20:13 +0100
commite3661fa5605906b205332ff2cbad47c2699bec59 (patch)
treee63ceeee8ce6ea32505bbcfbfd5c933d8d08f10a /android/app/src
parentb73e60bc44fef951f151347be27c2af69adaa300 (diff)
downloadmullvadvpn-e3661fa5605906b205332ff2cbad47c2699bec59.tar.xz
mullvadvpn-e3661fa5605906b205332ff2cbad47c2699bec59.zip
Fix extra top bar showing up on some devices
After updating to core-ktx to 1.15.0 setDecorFitsSystemWindows needs to be called after installSplashScreen
Diffstat (limited to 'android/app/src')
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/MainActivity.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/MainActivity.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/MainActivity.kt
index a4ae131139..d6f8b08279 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/MainActivity.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/MainActivity.kt
@@ -51,9 +51,6 @@ class MainActivity : ComponentActivity(), AndroidScopeComponent {
override fun onCreate(savedInstanceState: Bundle?) {
loadKoinModules(listOf(uiModule, paymentModule))
- // Tell the system that we will draw behind the status bar and navigation bar
- WindowCompat.setDecorFitsSystemWindows(window, false)
-
lifecycle.addObserver(noDaemonViewModel)
installSplashScreen().setKeepOnScreenCondition {
@@ -61,6 +58,11 @@ class MainActivity : ComponentActivity(), AndroidScopeComponent {
isReadyNextDraw = splashCompleteRepository.isSplashComplete()
!isReady
}
+
+ // Tell the system that we will draw behind the status bar and navigation bar
+ // This needs to be called after installSplashScreen()
+ WindowCompat.setDecorFitsSystemWindows(window, false)
+
super.onCreate(savedInstanceState)
// Needs to be before set content since we want to access the intent in compose