Skip to content

Commit 06d017a

Browse files
committed
Merge tag 'v152.2'
2 parents a5d4e99 + 8d3f84b commit 06d017a

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

backends/backend-android/src/arc/backend/android/AndroidGraphics.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -403,17 +403,12 @@ protected void updateSafeAreaInsets(){
403403
safeInsetBottom = 0;
404404

405405
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P){
406-
try{
407-
DisplayCutout displayCutout = app.getWindow().getDecorView().getRootWindowInsets().getDisplayCutout();
408-
if(displayCutout != null){
409-
safeInsetRight = displayCutout.getSafeInsetRight();
410-
safeInsetBottom = displayCutout.getSafeInsetBottom();
411-
safeInsetTop = displayCutout.getSafeInsetTop();
412-
safeInsetLeft = displayCutout.getSafeInsetLeft();
413-
}
414-
} // Some Application implementations (such as Live Wallpapers) do not implement Application#getApplicationWindow()
415-
catch(UnsupportedOperationException e){
416-
Log.err("AndroidGraphics", "Unable to get safe area insets", e);
406+
DisplayCutout displayCutout = app.getWindow().getDecorView().getRootWindowInsets().getDisplayCutout();
407+
if(displayCutout != null){
408+
safeInsetRight = displayCutout.getSafeInsetRight();
409+
safeInsetBottom = displayCutout.getSafeInsetBottom();
410+
safeInsetTop = displayCutout.getSafeInsetTop();
411+
safeInsetLeft = displayCutout.getSafeInsetLeft();
417412
}
418413
}
419414
}

0 commit comments

Comments
 (0)