File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
OneSignalSDK/onesignal/src/main/java/com/onesignal Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,9 @@ static int[] getCutoutAndStatusBarInsets(@NonNull Activity activity) {
83
83
float leftInset = 0 ;
84
84
float topInset = (frame .top - contentView .getTop ()) / Resources .getSystem ().getDisplayMetrics ().density ;
85
85
float bottomInset = (contentView .getBottom () - frame .bottom ) / Resources .getSystem ().getDisplayMetrics ().density ;
86
- if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .Q ) {
86
+ // API 29 is the only version where the IAM bleeds under cutouts in immersize mode
87
+ // All other versions will not need left and right insets.
88
+ if (Build .VERSION .SDK_INT == Build .VERSION_CODES .Q ) {
87
89
DisplayCutout cutout = activity .getWindowManager ().getDefaultDisplay ().getCutout ();
88
90
if (cutout != null ) {
89
91
rightInset = cutout .getSafeInsetRight () / Resources .getSystem ().getDisplayMetrics ().density ;
You can’t perform that action at this time.
0 commit comments