From 43bdbb97b1f0820950e30fbcd8d35d662ac909b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20de=20Souza?= Date: Fri, 24 May 2024 18:50:47 +0200 Subject: [PATCH] Do not set redundant `layoutInDisplayCutoutMode` --- CHANGELOG.md | 4 ++++ src/main/kotlin/MainActivity.kt | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9f3776..bc42118 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ - Provide audible or haptic feedback on click +### Note + +- Do not set redundant `layoutInDisplayCutoutMode` + ## [1.8.8](https://github.com/ldeso/blitz/releases/tag/v1.8.8) – 2024-05-21 This release improves the style of the text, enables hardware memory tagging on compatible devices and updates dependencies. diff --git a/src/main/kotlin/MainActivity.kt b/src/main/kotlin/MainActivity.kt index 26de910..546a351 100644 --- a/src/main/kotlin/MainActivity.kt +++ b/src/main/kotlin/MainActivity.kt @@ -5,11 +5,8 @@ package net.leodesouza.blitz import android.graphics.Color.BLACK import android.graphics.Color.TRANSPARENT -import android.os.Build import android.os.Bundle import android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON -import android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS -import android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES import androidx.activity.ComponentActivity import androidx.activity.SystemBarStyle import androidx.activity.compose.setContent @@ -24,11 +21,6 @@ class MainActivity : ComponentActivity() { statusBarStyle = SystemBarStyle.dark(scrim = TRANSPARENT), navigationBarStyle = SystemBarStyle.light(scrim = TRANSPARENT, darkScrim = BLACK), ) - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { - window.attributes.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS - } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { - window.attributes.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES - } setContent { ClockScreen(