Skip to content

Commit

Permalink
Allow floating button to cover camera hole cutout (fix for Android be…
Browse files Browse the repository at this point in the history
…low 12)

#453
  • Loading branch information
cvzi committed Oct 28, 2023
1 parent 86cc099 commit 8bdcdec
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,12 @@ class ScreenshotAccessibilityService : AccessibilityService() {
this.x = x
this.y = y
// Allow the floating button to cover the camera notch/cutout
layoutInDisplayCutoutMode =
flags = flags or WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
layoutInDisplayCutoutMode = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
} else {
WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES

}
}
}

Expand Down

0 comments on commit 8bdcdec

Please sign in to comment.