pull/2729/head
kunfei 2 years ago
parent 7e6af77da1
commit 37ec4e4a1e
  1. 4
      app/src/main/java/io/legado/app/utils/ContextExtensions.kt

@ -186,7 +186,7 @@ val Context.sysScreenOffTime: Int
} }
val Context.statusBarHeight: Int val Context.statusBarHeight: Int
@SuppressLint("DiscouragedApi") @SuppressLint("DiscouragedApi", "InternalInsetResource")
get() { get() {
if (Build.BOARD == "windows") { if (Build.BOARD == "windows") {
return 0 return 0
@ -196,7 +196,7 @@ val Context.statusBarHeight: Int
} }
val Context.navigationBarHeight: Int val Context.navigationBarHeight: Int
@SuppressLint("DiscouragedApi") @SuppressLint("DiscouragedApi", "InternalInsetResource")
get() { get() {
val resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android") val resourceId = resources.getIdentifier("navigation_bar_height", "dimen", "android")
return resources.getDimensionPixelSize(resourceId) return resources.getDimensionPixelSize(resourceId)

Loading…
Cancel
Save