@onekeyfe/react-native-device-utils 6.7.0-alpha.342 → 6.7.0-alpha.344

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,6 @@ import android.app.Activity
4
4
  import android.content.Context
5
5
  import android.content.pm.PackageManager
6
6
  import android.graphics.Color
7
- import android.graphics.drawable.GradientDrawable
8
7
  import android.graphics.Rect
9
8
  import android.os.Build
10
9
  import android.view.Gravity
@@ -917,13 +916,9 @@ class ReactNativeDeviceUtils : HybridReactNativeDeviceUtilsSpec(), LifecycleEven
917
916
  window.isNavigationBarContrastEnforced = false
918
917
  }
919
918
 
920
- if (
921
- Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM ||
922
- com.facebook.react.views.view.isEdgeToEdgeFeatureFlagOn
923
- ) {
924
- // Edge-to-edge windows (enforced on Android 15, opted in below it) keep
925
- // the platform bar transparent and draw the requested color only
926
- // behind three-button navigation.
919
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
920
+ // Android 15 enforces edge-to-edge. Keep the platform bar transparent
921
+ // and draw the requested color only behind three-button navigation.
927
922
  window.navigationBarColor = Color.TRANSPARENT
928
923
  installNavigationBarProtection(decorView, appearance.color)
929
924
  } else {
@@ -958,6 +953,7 @@ class ReactNativeDeviceUtils : HybridReactNativeDeviceUtilsSpec(), LifecycleEven
958
953
  )
959
954
  }
960
955
 
956
+ protectionView.setBackgroundColor(color)
961
957
  protectionView.visibility = View.VISIBLE
962
958
  protectionView.bringToFront()
963
959
  ViewCompat.setOnApplyWindowInsetsListener(protectionView) { view, windowInsets ->
@@ -989,17 +985,6 @@ class ReactNativeDeviceUtils : HybridReactNativeDeviceUtilsSpec(), LifecycleEven
989
985
  )
990
986
  else -> Triple(0, 0, Gravity.BOTTOM)
991
987
  }
992
- // Fade in from the content edge so the protection never draws a hard line
993
- // against the page; the solid half keeps the buttons legible.
994
- val fadeOrientation = when (gravity) {
995
- Gravity.LEFT -> GradientDrawable.Orientation.RIGHT_LEFT
996
- Gravity.RIGHT -> GradientDrawable.Orientation.LEFT_RIGHT
997
- else -> GradientDrawable.Orientation.TOP_BOTTOM
998
- }
999
- view.background = GradientDrawable(
1000
- fadeOrientation,
1001
- intArrayOf(color and 0x00FFFFFF, color, color),
1002
- )
1003
988
  if (
1004
989
  layoutParams.width != width ||
1005
990
  layoutParams.height != height ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-device-utils",
3
- "version": "6.7.0-alpha.342",
3
+ "version": "6.7.0-alpha.344",
4
4
  "description": "Native device, launch, system appearance and boot recovery utilities for OneKey",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",