Android phones. Screen.safeArea not works correctly

Safearea works correctly in Unity 2019.4.29 but after switch to 2021.3.7 (or 2021.3.8, 2021.3.4) safearea stopped working only on android.
ios devices and device simulator work correctly with the same code.

On all our android devices:

  1. “safeArea.x” and “safeArea.y” is zero
  2. “safeArea.width” is equal to Screen.width

Info:

  • only landscape orientation

  • tried android api 30, and 31

  • tried different andoird OS versions (10,12) and different devices

If it did work in an older version make a bug report.

Fixed it, If you have the same problem you should check your android manifest and compare with Unity generated manifest

What we did:

  • Added the “android:theme”

  • Changed “screenOrientation” to actual

  • In “UnityPlayerNativeActivity → android:configChanges” we added layoutDirection and density

Interesting, could you make a bug report for this?