Skip to content

Commit

Permalink
Do not set redundant layoutInDisplayCutoutMode
Browse files Browse the repository at this point in the history
  • Loading branch information
ldeso committed May 24, 2024
1 parent c2b2206 commit 43bdbb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 0 additions & 8 deletions src/main/kotlin/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down

0 comments on commit 43bdbb9

Please sign in to comment.